You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

v1_json.tmpl 278KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321
  1. {
  2. "consumes": [
  3. "application/json",
  4. "text/plain"
  5. ],
  6. "produces": [
  7. "application/json",
  8. "text/html"
  9. ],
  10. "schemes": [
  11. "http",
  12. "https"
  13. ],
  14. "swagger": "2.0",
  15. "info": {
  16. "description": "This documentation describes the Gitea API.",
  17. "title": "Gitea API.",
  18. "license": {
  19. "name": "MIT",
  20. "url": "http://opensource.org/licenses/MIT"
  21. },
  22. "version": "1.1.1"
  23. },
  24. "basePath": "{{AppSubUrl}}/api/v1",
  25. "paths": {
  26. "/admin/orgs": {
  27. "get": {
  28. "produces": [
  29. "application/json"
  30. ],
  31. "tags": [
  32. "admin"
  33. ],
  34. "summary": "List all organizations",
  35. "operationId": "adminGetAllOrgs",
  36. "parameters": [
  37. {
  38. "type": "integer",
  39. "description": "page number of results to return (1-based)",
  40. "name": "page",
  41. "in": "query"
  42. },
  43. {
  44. "type": "integer",
  45. "description": "page size of results, maximum page size is 50",
  46. "name": "limit",
  47. "in": "query"
  48. }
  49. ],
  50. "responses": {
  51. "200": {
  52. "$ref": "#/responses/OrganizationList"
  53. },
  54. "403": {
  55. "$ref": "#/responses/forbidden"
  56. }
  57. }
  58. }
  59. },
  60. "/admin/users": {
  61. "get": {
  62. "produces": [
  63. "application/json"
  64. ],
  65. "tags": [
  66. "admin"
  67. ],
  68. "summary": "List all users",
  69. "operationId": "adminGetAllUsers",
  70. "responses": {
  71. "200": {
  72. "$ref": "#/responses/UserList"
  73. },
  74. "403": {
  75. "$ref": "#/responses/forbidden"
  76. }
  77. }
  78. },
  79. "post": {
  80. "consumes": [
  81. "application/json"
  82. ],
  83. "produces": [
  84. "application/json"
  85. ],
  86. "tags": [
  87. "admin"
  88. ],
  89. "summary": "Create a user",
  90. "operationId": "adminCreateUser",
  91. "parameters": [
  92. {
  93. "name": "body",
  94. "in": "body",
  95. "schema": {
  96. "$ref": "#/definitions/CreateUserOption"
  97. }
  98. }
  99. ],
  100. "responses": {
  101. "201": {
  102. "$ref": "#/responses/User"
  103. },
  104. "403": {
  105. "$ref": "#/responses/forbidden"
  106. },
  107. "422": {
  108. "$ref": "#/responses/validationError"
  109. }
  110. }
  111. }
  112. },
  113. "/admin/users/{username}": {
  114. "delete": {
  115. "produces": [
  116. "application/json"
  117. ],
  118. "tags": [
  119. "admin"
  120. ],
  121. "summary": "Delete a user",
  122. "operationId": "adminDeleteUser",
  123. "parameters": [
  124. {
  125. "type": "string",
  126. "description": "username of user to delete",
  127. "name": "username",
  128. "in": "path",
  129. "required": true
  130. }
  131. ],
  132. "responses": {
  133. "204": {
  134. "$ref": "#/responses/empty"
  135. },
  136. "403": {
  137. "$ref": "#/responses/forbidden"
  138. },
  139. "422": {
  140. "$ref": "#/responses/validationError"
  141. }
  142. }
  143. },
  144. "patch": {
  145. "consumes": [
  146. "application/json"
  147. ],
  148. "produces": [
  149. "application/json"
  150. ],
  151. "tags": [
  152. "admin"
  153. ],
  154. "summary": "Edit an existing user",
  155. "operationId": "adminEditUser",
  156. "parameters": [
  157. {
  158. "type": "string",
  159. "description": "username of user to edit",
  160. "name": "username",
  161. "in": "path",
  162. "required": true
  163. },
  164. {
  165. "name": "body",
  166. "in": "body",
  167. "schema": {
  168. "$ref": "#/definitions/EditUserOption"
  169. }
  170. }
  171. ],
  172. "responses": {
  173. "200": {
  174. "$ref": "#/responses/User"
  175. },
  176. "403": {
  177. "$ref": "#/responses/forbidden"
  178. },
  179. "422": {
  180. "$ref": "#/responses/validationError"
  181. }
  182. }
  183. }
  184. },
  185. "/admin/users/{username}/keys": {
  186. "post": {
  187. "consumes": [
  188. "application/json"
  189. ],
  190. "produces": [
  191. "application/json"
  192. ],
  193. "tags": [
  194. "admin"
  195. ],
  196. "summary": "Add a public key on behalf of a user",
  197. "operationId": "adminCreatePublicKey",
  198. "parameters": [
  199. {
  200. "type": "string",
  201. "description": "username of the user",
  202. "name": "username",
  203. "in": "path",
  204. "required": true
  205. },
  206. {
  207. "name": "key",
  208. "in": "body",
  209. "schema": {
  210. "$ref": "#/definitions/CreateKeyOption"
  211. }
  212. }
  213. ],
  214. "responses": {
  215. "201": {
  216. "$ref": "#/responses/PublicKey"
  217. },
  218. "403": {
  219. "$ref": "#/responses/forbidden"
  220. },
  221. "422": {
  222. "$ref": "#/responses/validationError"
  223. }
  224. }
  225. }
  226. },
  227. "/admin/users/{username}/keys/{id}": {
  228. "delete": {
  229. "produces": [
  230. "application/json"
  231. ],
  232. "tags": [
  233. "admin"
  234. ],
  235. "summary": "Delete a user's public key",
  236. "operationId": "adminDeleteUserPublicKey",
  237. "parameters": [
  238. {
  239. "type": "string",
  240. "description": "username of user",
  241. "name": "username",
  242. "in": "path",
  243. "required": true
  244. },
  245. {
  246. "type": "integer",
  247. "format": "int64",
  248. "description": "id of the key to delete",
  249. "name": "id",
  250. "in": "path",
  251. "required": true
  252. }
  253. ],
  254. "responses": {
  255. "204": {
  256. "$ref": "#/responses/empty"
  257. },
  258. "403": {
  259. "$ref": "#/responses/forbidden"
  260. },
  261. "404": {
  262. "$ref": "#/responses/notFound"
  263. }
  264. }
  265. }
  266. },
  267. "/admin/users/{username}/orgs": {
  268. "post": {
  269. "consumes": [
  270. "application/json"
  271. ],
  272. "produces": [
  273. "application/json"
  274. ],
  275. "tags": [
  276. "admin"
  277. ],
  278. "summary": "Create an organization",
  279. "operationId": "adminCreateOrg",
  280. "parameters": [
  281. {
  282. "type": "string",
  283. "description": "username of the user that will own the created organization",
  284. "name": "username",
  285. "in": "path",
  286. "required": true
  287. },
  288. {
  289. "name": "organization",
  290. "in": "body",
  291. "required": true,
  292. "schema": {
  293. "$ref": "#/definitions/CreateOrgOption"
  294. }
  295. }
  296. ],
  297. "responses": {
  298. "201": {
  299. "$ref": "#/responses/Organization"
  300. },
  301. "403": {
  302. "$ref": "#/responses/forbidden"
  303. },
  304. "422": {
  305. "$ref": "#/responses/validationError"
  306. }
  307. }
  308. }
  309. },
  310. "/admin/users/{username}/repos": {
  311. "post": {
  312. "consumes": [
  313. "application/json"
  314. ],
  315. "produces": [
  316. "application/json"
  317. ],
  318. "tags": [
  319. "admin"
  320. ],
  321. "summary": "Create a repository on behalf a user",
  322. "operationId": "adminCreateRepo",
  323. "parameters": [
  324. {
  325. "type": "string",
  326. "description": "username of the user. This user will own the created repository",
  327. "name": "username",
  328. "in": "path",
  329. "required": true
  330. },
  331. {
  332. "name": "repository",
  333. "in": "body",
  334. "required": true,
  335. "schema": {
  336. "$ref": "#/definitions/CreateRepoOption"
  337. }
  338. }
  339. ],
  340. "responses": {
  341. "201": {
  342. "$ref": "#/responses/Repository"
  343. },
  344. "403": {
  345. "$ref": "#/responses/forbidden"
  346. },
  347. "422": {
  348. "$ref": "#/responses/validationError"
  349. }
  350. }
  351. }
  352. },
  353. "/markdown": {
  354. "post": {
  355. "consumes": [
  356. "application/json"
  357. ],
  358. "produces": [
  359. "text/html"
  360. ],
  361. "tags": [
  362. "miscellaneous"
  363. ],
  364. "summary": "Render a markdown document as HTML",
  365. "operationId": "renderMarkdown",
  366. "parameters": [
  367. {
  368. "name": "body",
  369. "in": "body",
  370. "schema": {
  371. "$ref": "#/definitions/MarkdownOption"
  372. }
  373. }
  374. ],
  375. "responses": {
  376. "200": {
  377. "$ref": "#/responses/MarkdownRender"
  378. },
  379. "422": {
  380. "$ref": "#/responses/validationError"
  381. }
  382. }
  383. }
  384. },
  385. "/markdown/raw": {
  386. "post": {
  387. "consumes": [
  388. "text/plain"
  389. ],
  390. "produces": [
  391. "text/html"
  392. ],
  393. "tags": [
  394. "miscellaneous"
  395. ],
  396. "summary": "Render raw markdown as HTML",
  397. "operationId": "renderMarkdownRaw",
  398. "parameters": [
  399. {
  400. "description": "Request body to render",
  401. "name": "body",
  402. "in": "body",
  403. "required": true,
  404. "schema": {
  405. "type": "string"
  406. }
  407. }
  408. ],
  409. "responses": {
  410. "200": {
  411. "$ref": "#/responses/MarkdownRender"
  412. },
  413. "422": {
  414. "$ref": "#/responses/validationError"
  415. }
  416. }
  417. }
  418. },
  419. "/org/{org}/repos": {
  420. "post": {
  421. "consumes": [
  422. "application/json"
  423. ],
  424. "produces": [
  425. "application/json"
  426. ],
  427. "tags": [
  428. "organization"
  429. ],
  430. "summary": "Create a repository in an organization",
  431. "operationId": "createOrgRepo",
  432. "parameters": [
  433. {
  434. "type": "string",
  435. "description": "name of organization",
  436. "name": "org",
  437. "in": "path",
  438. "required": true
  439. },
  440. {
  441. "name": "body",
  442. "in": "body",
  443. "schema": {
  444. "$ref": "#/definitions/CreateRepoOption"
  445. }
  446. }
  447. ],
  448. "responses": {
  449. "201": {
  450. "$ref": "#/responses/Repository"
  451. },
  452. "403": {
  453. "$ref": "#/responses/forbidden"
  454. },
  455. "422": {
  456. "$ref": "#/responses/validationError"
  457. }
  458. }
  459. }
  460. },
  461. "/orgs": {
  462. "post": {
  463. "consumes": [
  464. "application/json"
  465. ],
  466. "produces": [
  467. "application/json"
  468. ],
  469. "tags": [
  470. "organization"
  471. ],
  472. "summary": "Create an organization",
  473. "operationId": "orgCreate",
  474. "parameters": [
  475. {
  476. "name": "organization",
  477. "in": "body",
  478. "required": true,
  479. "schema": {
  480. "$ref": "#/definitions/CreateOrgOption"
  481. }
  482. }
  483. ],
  484. "responses": {
  485. "201": {
  486. "$ref": "#/responses/Organization"
  487. },
  488. "403": {
  489. "$ref": "#/responses/forbidden"
  490. },
  491. "422": {
  492. "$ref": "#/responses/validationError"
  493. }
  494. }
  495. }
  496. },
  497. "/orgs/{org}": {
  498. "get": {
  499. "produces": [
  500. "application/json"
  501. ],
  502. "tags": [
  503. "organization"
  504. ],
  505. "summary": "Get an organization",
  506. "operationId": "orgGet",
  507. "parameters": [
  508. {
  509. "type": "string",
  510. "description": "name of the organization to get",
  511. "name": "org",
  512. "in": "path",
  513. "required": true
  514. }
  515. ],
  516. "responses": {
  517. "200": {
  518. "$ref": "#/responses/Organization"
  519. }
  520. }
  521. },
  522. "delete": {
  523. "produces": [
  524. "application/json"
  525. ],
  526. "tags": [
  527. "organization"
  528. ],
  529. "summary": "Delete an organization",
  530. "operationId": "orgDelete",
  531. "parameters": [
  532. {
  533. "type": "string",
  534. "description": "organization that is to be deleted",
  535. "name": "org",
  536. "in": "path",
  537. "required": true
  538. }
  539. ],
  540. "responses": {
  541. "204": {
  542. "$ref": "#/responses/empty"
  543. }
  544. }
  545. },
  546. "patch": {
  547. "consumes": [
  548. "application/json"
  549. ],
  550. "produces": [
  551. "application/json"
  552. ],
  553. "tags": [
  554. "organization"
  555. ],
  556. "summary": "Edit an organization",
  557. "operationId": "orgEdit",
  558. "parameters": [
  559. {
  560. "type": "string",
  561. "description": "name of the organization to edit",
  562. "name": "org",
  563. "in": "path",
  564. "required": true
  565. },
  566. {
  567. "name": "body",
  568. "in": "body",
  569. "required": true,
  570. "schema": {
  571. "$ref": "#/definitions/EditOrgOption"
  572. }
  573. }
  574. ],
  575. "responses": {
  576. "200": {
  577. "$ref": "#/responses/Organization"
  578. }
  579. }
  580. }
  581. },
  582. "/orgs/{org}/hooks": {
  583. "get": {
  584. "produces": [
  585. "application/json"
  586. ],
  587. "tags": [
  588. "organization"
  589. ],
  590. "summary": "List an organization's webhooks",
  591. "operationId": "orgListHooks",
  592. "parameters": [
  593. {
  594. "type": "string",
  595. "description": "name of the organization",
  596. "name": "org",
  597. "in": "path",
  598. "required": true
  599. }
  600. ],
  601. "responses": {
  602. "200": {
  603. "$ref": "#/responses/HookList"
  604. }
  605. }
  606. }
  607. },
  608. "/orgs/{org}/hooks/": {
  609. "post": {
  610. "consumes": [
  611. "application/json"
  612. ],
  613. "produces": [
  614. "application/json"
  615. ],
  616. "tags": [
  617. "organization"
  618. ],
  619. "summary": "Create a hook",
  620. "operationId": "orgCreateHook",
  621. "parameters": [
  622. {
  623. "type": "string",
  624. "description": "name of the organization",
  625. "name": "org",
  626. "in": "path",
  627. "required": true
  628. },
  629. {
  630. "name": "body",
  631. "in": "body",
  632. "required": true,
  633. "schema": {
  634. "$ref": "#/definitions/CreateHookOption"
  635. }
  636. }
  637. ],
  638. "responses": {
  639. "201": {
  640. "$ref": "#/responses/Hook"
  641. }
  642. }
  643. }
  644. },
  645. "/orgs/{org}/hooks/{id}": {
  646. "get": {
  647. "produces": [
  648. "application/json"
  649. ],
  650. "tags": [
  651. "organization"
  652. ],
  653. "summary": "Get a hook",
  654. "operationId": "orgGetHook",
  655. "parameters": [
  656. {
  657. "type": "string",
  658. "description": "name of the organization",
  659. "name": "org",
  660. "in": "path",
  661. "required": true
  662. },
  663. {
  664. "type": "integer",
  665. "format": "int64",
  666. "description": "id of the hook to get",
  667. "name": "id",
  668. "in": "path",
  669. "required": true
  670. }
  671. ],
  672. "responses": {
  673. "200": {
  674. "$ref": "#/responses/Hook"
  675. }
  676. }
  677. },
  678. "delete": {
  679. "produces": [
  680. "application/json"
  681. ],
  682. "tags": [
  683. "organization"
  684. ],
  685. "summary": "Delete a hook",
  686. "operationId": "orgDeleteHook",
  687. "parameters": [
  688. {
  689. "type": "string",
  690. "description": "name of the organization",
  691. "name": "org",
  692. "in": "path",
  693. "required": true
  694. },
  695. {
  696. "type": "integer",
  697. "format": "int64",
  698. "description": "id of the hook to delete",
  699. "name": "id",
  700. "in": "path",
  701. "required": true
  702. }
  703. ],
  704. "responses": {
  705. "204": {
  706. "$ref": "#/responses/empty"
  707. }
  708. }
  709. },
  710. "patch": {
  711. "consumes": [
  712. "application/json"
  713. ],
  714. "produces": [
  715. "application/json"
  716. ],
  717. "tags": [
  718. "organization"
  719. ],
  720. "summary": "Update a hook",
  721. "operationId": "orgEditHook",
  722. "parameters": [
  723. {
  724. "type": "string",
  725. "description": "name of the organization",
  726. "name": "org",
  727. "in": "path",
  728. "required": true
  729. },
  730. {
  731. "type": "integer",
  732. "format": "int64",
  733. "description": "id of the hook to update",
  734. "name": "id",
  735. "in": "path",
  736. "required": true
  737. },
  738. {
  739. "name": "body",
  740. "in": "body",
  741. "schema": {
  742. "$ref": "#/definitions/EditHookOption"
  743. }
  744. }
  745. ],
  746. "responses": {
  747. "200": {
  748. "$ref": "#/responses/Hook"
  749. }
  750. }
  751. }
  752. },
  753. "/orgs/{org}/members": {
  754. "get": {
  755. "produces": [
  756. "application/json"
  757. ],
  758. "tags": [
  759. "organization"
  760. ],
  761. "summary": "List an organization's members",
  762. "operationId": "orgListMembers",
  763. "parameters": [
  764. {
  765. "type": "string",
  766. "description": "name of the organization",
  767. "name": "org",
  768. "in": "path",
  769. "required": true
  770. }
  771. ],
  772. "responses": {
  773. "200": {
  774. "$ref": "#/responses/UserList"
  775. }
  776. }
  777. }
  778. },
  779. "/orgs/{org}/members/{username}": {
  780. "get": {
  781. "tags": [
  782. "organization"
  783. ],
  784. "summary": "Check if a user is a member of an organization",
  785. "operationId": "orgIsMember",
  786. "parameters": [
  787. {
  788. "type": "string",
  789. "description": "name of the organization",
  790. "name": "org",
  791. "in": "path",
  792. "required": true
  793. },
  794. {
  795. "type": "string",
  796. "description": "username of the user",
  797. "name": "username",
  798. "in": "path",
  799. "required": true
  800. }
  801. ],
  802. "responses": {
  803. "204": {
  804. "description": "user is a member"
  805. },
  806. "404": {
  807. "description": "user is not a member"
  808. }
  809. }
  810. },
  811. "delete": {
  812. "produces": [
  813. "application/json"
  814. ],
  815. "tags": [
  816. "organization"
  817. ],
  818. "summary": "Remove a member from an organization",
  819. "operationId": "orgDeleteMember",
  820. "parameters": [
  821. {
  822. "type": "string",
  823. "description": "name of the organization",
  824. "name": "org",
  825. "in": "path",
  826. "required": true
  827. },
  828. {
  829. "type": "string",
  830. "description": "username of the user",
  831. "name": "username",
  832. "in": "path",
  833. "required": true
  834. }
  835. ],
  836. "responses": {
  837. "204": {
  838. "description": "member removed"
  839. }
  840. }
  841. }
  842. },
  843. "/orgs/{org}/public_members": {
  844. "get": {
  845. "produces": [
  846. "application/json"
  847. ],
  848. "tags": [
  849. "organization"
  850. ],
  851. "summary": "List an organization's public members",
  852. "operationId": "orgListPublicMembers",
  853. "parameters": [
  854. {
  855. "type": "string",
  856. "description": "name of the organization",
  857. "name": "org",
  858. "in": "path",
  859. "required": true
  860. }
  861. ],
  862. "responses": {
  863. "200": {
  864. "$ref": "#/responses/UserList"
  865. }
  866. }
  867. }
  868. },
  869. "/orgs/{org}/public_members/{username}": {
  870. "get": {
  871. "tags": [
  872. "organization"
  873. ],
  874. "summary": "Check if a user is a public member of an organization",
  875. "operationId": "orgIsPublicMember",
  876. "parameters": [
  877. {
  878. "type": "string",
  879. "description": "name of the organization",
  880. "name": "org",
  881. "in": "path",
  882. "required": true
  883. },
  884. {
  885. "type": "string",
  886. "description": "username of the user",
  887. "name": "username",
  888. "in": "path",
  889. "required": true
  890. }
  891. ],
  892. "responses": {
  893. "204": {
  894. "description": "user is a public member"
  895. },
  896. "404": {
  897. "description": "user is not a public member"
  898. }
  899. }
  900. },
  901. "put": {
  902. "produces": [
  903. "application/json"
  904. ],
  905. "tags": [
  906. "organization"
  907. ],
  908. "summary": "Publicize a user's membership",
  909. "operationId": "orgPublicizeMember",
  910. "parameters": [
  911. {
  912. "type": "string",
  913. "description": "name of the organization",
  914. "name": "org",
  915. "in": "path",
  916. "required": true
  917. },
  918. {
  919. "type": "string",
  920. "description": "username of the user",
  921. "name": "username",
  922. "in": "path",
  923. "required": true
  924. }
  925. ],
  926. "responses": {
  927. "204": {
  928. "description": "membership publicized"
  929. }
  930. }
  931. },
  932. "delete": {
  933. "produces": [
  934. "application/json"
  935. ],
  936. "tags": [
  937. "organization"
  938. ],
  939. "summary": "Conceal a user's membership",
  940. "operationId": "orgConcealMember",
  941. "parameters": [
  942. {
  943. "type": "string",
  944. "description": "name of the organization",
  945. "name": "org",
  946. "in": "path",
  947. "required": true
  948. },
  949. {
  950. "type": "string",
  951. "description": "username of the user",
  952. "name": "username",
  953. "in": "path",
  954. "required": true
  955. }
  956. ],
  957. "responses": {
  958. "204": {
  959. "$ref": "#/responses/empty"
  960. }
  961. }
  962. }
  963. },
  964. "/orgs/{org}/repos": {
  965. "get": {
  966. "produces": [
  967. "application/json"
  968. ],
  969. "tags": [
  970. "organization"
  971. ],
  972. "summary": "List an organization's repos",
  973. "operationId": "orgListRepos",
  974. "parameters": [
  975. {
  976. "type": "string",
  977. "description": "name of the organization",
  978. "name": "org",
  979. "in": "path",
  980. "required": true
  981. }
  982. ],
  983. "responses": {
  984. "200": {
  985. "$ref": "#/responses/RepositoryList"
  986. }
  987. }
  988. }
  989. },
  990. "/orgs/{org}/teams": {
  991. "get": {
  992. "produces": [
  993. "application/json"
  994. ],
  995. "tags": [
  996. "organization"
  997. ],
  998. "summary": "List an organization's teams",
  999. "operationId": "orgListTeams",
  1000. "parameters": [
  1001. {
  1002. "type": "string",
  1003. "description": "name of the organization",
  1004. "name": "org",
  1005. "in": "path",
  1006. "required": true
  1007. }
  1008. ],
  1009. "responses": {
  1010. "200": {
  1011. "$ref": "#/responses/TeamList"
  1012. }
  1013. }
  1014. },
  1015. "post": {
  1016. "consumes": [
  1017. "application/json"
  1018. ],
  1019. "produces": [
  1020. "application/json"
  1021. ],
  1022. "tags": [
  1023. "organization"
  1024. ],
  1025. "summary": "Create a team",
  1026. "operationId": "orgCreateTeam",
  1027. "parameters": [
  1028. {
  1029. "type": "string",
  1030. "description": "name of the organization",
  1031. "name": "org",
  1032. "in": "path",
  1033. "required": true
  1034. },
  1035. {
  1036. "name": "body",
  1037. "in": "body",
  1038. "schema": {
  1039. "$ref": "#/definitions/CreateTeamOption"
  1040. }
  1041. }
  1042. ],
  1043. "responses": {
  1044. "201": {
  1045. "$ref": "#/responses/Team"
  1046. }
  1047. }
  1048. }
  1049. },
  1050. "/orgs/{org}/teams/search": {
  1051. "get": {
  1052. "produces": [
  1053. "application/json"
  1054. ],
  1055. "tags": [
  1056. "organization"
  1057. ],
  1058. "summary": "Search for teams within an organization",
  1059. "operationId": "teamSearch",
  1060. "parameters": [
  1061. {
  1062. "type": "string",
  1063. "description": "name of the organization",
  1064. "name": "org",
  1065. "in": "path",
  1066. "required": true
  1067. },
  1068. {
  1069. "type": "string",
  1070. "description": "keywords to search",
  1071. "name": "q",
  1072. "in": "query"
  1073. },
  1074. {
  1075. "type": "boolean",
  1076. "description": "include search within team description (defaults to true)",
  1077. "name": "include_desc",
  1078. "in": "query"
  1079. },
  1080. {
  1081. "type": "integer",
  1082. "description": "limit size of results",
  1083. "name": "limit",
  1084. "in": "query"
  1085. },
  1086. {
  1087. "type": "integer",
  1088. "description": "page number of results to return (1-based)",
  1089. "name": "page",
  1090. "in": "query"
  1091. }
  1092. ],
  1093. "responses": {
  1094. "200": {
  1095. "description": "SearchResults of a successful search",
  1096. "schema": {
  1097. "type": "object",
  1098. "properties": {
  1099. "data": {
  1100. "type": "array",
  1101. "items": {
  1102. "$ref": "#/definitions/Team"
  1103. }
  1104. },
  1105. "ok": {
  1106. "type": "boolean"
  1107. }
  1108. }
  1109. }
  1110. }
  1111. }
  1112. }
  1113. },
  1114. "/repos/issues/search": {
  1115. "get": {
  1116. "produces": [
  1117. "application/json"
  1118. ],
  1119. "tags": [
  1120. "issue"
  1121. ],
  1122. "summary": "Search for issues across the repositories that the user has access to",
  1123. "operationId": "issueSearchIssues",
  1124. "parameters": [
  1125. {
  1126. "type": "string",
  1127. "description": "whether issue is open or closed",
  1128. "name": "state",
  1129. "in": "query"
  1130. },
  1131. {
  1132. "type": "string",
  1133. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  1134. "name": "labels",
  1135. "in": "query"
  1136. },
  1137. {
  1138. "type": "integer",
  1139. "description": "page number of requested issues",
  1140. "name": "page",
  1141. "in": "query"
  1142. },
  1143. {
  1144. "type": "string",
  1145. "description": "search string",
  1146. "name": "q",
  1147. "in": "query"
  1148. },
  1149. {
  1150. "type": "integer",
  1151. "format": "int64",
  1152. "description": "repository to prioritize in the results",
  1153. "name": "priority_repo_id",
  1154. "in": "query"
  1155. }
  1156. ],
  1157. "responses": {
  1158. "200": {
  1159. "$ref": "#/responses/IssueList"
  1160. }
  1161. }
  1162. }
  1163. },
  1164. "/repos/migrate": {
  1165. "post": {
  1166. "consumes": [
  1167. "application/json"
  1168. ],
  1169. "produces": [
  1170. "application/json"
  1171. ],
  1172. "tags": [
  1173. "repository"
  1174. ],
  1175. "summary": "Migrate a remote git repository",
  1176. "operationId": "repoMigrate",
  1177. "parameters": [
  1178. {
  1179. "name": "body",
  1180. "in": "body",
  1181. "schema": {
  1182. "$ref": "#/definitions/MigrateRepoForm"
  1183. }
  1184. }
  1185. ],
  1186. "responses": {
  1187. "201": {
  1188. "$ref": "#/responses/Repository"
  1189. }
  1190. }
  1191. }
  1192. },
  1193. "/repos/search": {
  1194. "get": {
  1195. "produces": [
  1196. "application/json"
  1197. ],
  1198. "tags": [
  1199. "repository"
  1200. ],
  1201. "summary": "Search for repositories",
  1202. "operationId": "repoSearch",
  1203. "parameters": [
  1204. {
  1205. "type": "string",
  1206. "description": "keyword",
  1207. "name": "q",
  1208. "in": "query"
  1209. },
  1210. {
  1211. "type": "boolean",
  1212. "description": "Limit search to repositories with keyword as topic",
  1213. "name": "topic",
  1214. "in": "query"
  1215. },
  1216. {
  1217. "type": "boolean",
  1218. "description": "include search of keyword within repository description",
  1219. "name": "includeDesc",
  1220. "in": "query"
  1221. },
  1222. {
  1223. "type": "integer",
  1224. "format": "int64",
  1225. "description": "search only for repos that the user with the given id owns or contributes to",
  1226. "name": "uid",
  1227. "in": "query"
  1228. },
  1229. {
  1230. "type": "integer",
  1231. "format": "int64",
  1232. "description": "search only for repos that the user with the given id has starred",
  1233. "name": "starredBy",
  1234. "in": "query"
  1235. },
  1236. {
  1237. "type": "boolean",
  1238. "description": "include private repositories this user has access to (defaults to true)",
  1239. "name": "private",
  1240. "in": "query"
  1241. },
  1242. {
  1243. "type": "integer",
  1244. "description": "page number of results to return (1-based)",
  1245. "name": "page",
  1246. "in": "query"
  1247. },
  1248. {
  1249. "type": "integer",
  1250. "description": "page size of results, maximum page size is 50",
  1251. "name": "limit",
  1252. "in": "query"
  1253. },
  1254. {
  1255. "type": "string",
  1256. "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"",
  1257. "name": "mode",
  1258. "in": "query"
  1259. },
  1260. {
  1261. "type": "boolean",
  1262. "description": "if `uid` is given, search only for repos that the user owns",
  1263. "name": "exclusive",
  1264. "in": "query"
  1265. },
  1266. {
  1267. "type": "string",
  1268. "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"",
  1269. "name": "sort",
  1270. "in": "query"
  1271. },
  1272. {
  1273. "type": "string",
  1274. "description": "sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.",
  1275. "name": "order",
  1276. "in": "query"
  1277. }
  1278. ],
  1279. "responses": {
  1280. "200": {
  1281. "$ref": "#/responses/SearchResults"
  1282. },
  1283. "422": {
  1284. "$ref": "#/responses/validationError"
  1285. }
  1286. }
  1287. }
  1288. },
  1289. "/repos/{owner}/{repo}": {
  1290. "get": {
  1291. "produces": [
  1292. "application/json"
  1293. ],
  1294. "tags": [
  1295. "repository"
  1296. ],
  1297. "summary": "Get a repository",
  1298. "operationId": "repoGet",
  1299. "parameters": [
  1300. {
  1301. "type": "string",
  1302. "description": "owner of the repo",
  1303. "name": "owner",
  1304. "in": "path",
  1305. "required": true
  1306. },
  1307. {
  1308. "type": "string",
  1309. "description": "name of the repo",
  1310. "name": "repo",
  1311. "in": "path",
  1312. "required": true
  1313. }
  1314. ],
  1315. "responses": {
  1316. "200": {
  1317. "$ref": "#/responses/Repository"
  1318. }
  1319. }
  1320. },
  1321. "delete": {
  1322. "produces": [
  1323. "application/json"
  1324. ],
  1325. "tags": [
  1326. "repository"
  1327. ],
  1328. "summary": "Delete a repository",
  1329. "operationId": "repoDelete",
  1330. "parameters": [
  1331. {
  1332. "type": "string",
  1333. "description": "owner of the repo to delete",
  1334. "name": "owner",
  1335. "in": "path",
  1336. "required": true
  1337. },
  1338. {
  1339. "type": "string",
  1340. "description": "name of the repo to delete",
  1341. "name": "repo",
  1342. "in": "path",
  1343. "required": true
  1344. }
  1345. ],
  1346. "responses": {
  1347. "204": {
  1348. "$ref": "#/responses/empty"
  1349. },
  1350. "403": {
  1351. "$ref": "#/responses/forbidden"
  1352. }
  1353. }
  1354. },
  1355. "patch": {
  1356. "produces": [
  1357. "application/json"
  1358. ],
  1359. "tags": [
  1360. "repository"
  1361. ],
  1362. "summary": "Edit a repository's properties. Only fields that are set will be changed.",
  1363. "operationId": "repoEdit",
  1364. "parameters": [
  1365. {
  1366. "type": "string",
  1367. "description": "owner of the repo to edit",
  1368. "name": "owner",
  1369. "in": "path",
  1370. "required": true
  1371. },
  1372. {
  1373. "type": "string",
  1374. "description": "name of the repo to edit",
  1375. "name": "repo",
  1376. "in": "path",
  1377. "required": true
  1378. },
  1379. {
  1380. "description": "Properties of a repo that you can edit",
  1381. "name": "body",
  1382. "in": "body",
  1383. "schema": {
  1384. "$ref": "#/definitions/EditRepoOption"
  1385. }
  1386. }
  1387. ],
  1388. "responses": {
  1389. "200": {
  1390. "$ref": "#/responses/Repository"
  1391. },
  1392. "403": {
  1393. "$ref": "#/responses/forbidden"
  1394. },
  1395. "422": {
  1396. "$ref": "#/responses/validationError"
  1397. }
  1398. }
  1399. }
  1400. },
  1401. "/repos/{owner}/{repo}/archive/{archive}": {
  1402. "get": {
  1403. "produces": [
  1404. "application/json"
  1405. ],
  1406. "tags": [
  1407. "repository"
  1408. ],
  1409. "summary": "Get an archive of a repository",
  1410. "operationId": "repoGetArchive",
  1411. "parameters": [
  1412. {
  1413. "type": "string",
  1414. "description": "owner of the repo",
  1415. "name": "owner",
  1416. "in": "path",
  1417. "required": true
  1418. },
  1419. {
  1420. "type": "string",
  1421. "description": "name of the repo",
  1422. "name": "repo",
  1423. "in": "path",
  1424. "required": true
  1425. },
  1426. {
  1427. "type": "string",
  1428. "description": "archive to download, consisting of a git reference and archive",
  1429. "name": "archive",
  1430. "in": "path",
  1431. "required": true
  1432. }
  1433. ],
  1434. "responses": {
  1435. "200": {
  1436. "description": "success"
  1437. }
  1438. }
  1439. }
  1440. },
  1441. "/repos/{owner}/{repo}/branches": {
  1442. "get": {
  1443. "produces": [
  1444. "application/json"
  1445. ],
  1446. "tags": [
  1447. "repository"
  1448. ],
  1449. "summary": "List a repository's branches",
  1450. "operationId": "repoListBranches",
  1451. "parameters": [
  1452. {
  1453. "type": "string",
  1454. "description": "owner of the repo",
  1455. "name": "owner",
  1456. "in": "path",
  1457. "required": true
  1458. },
  1459. {
  1460. "type": "string",
  1461. "description": "name of the repo",
  1462. "name": "repo",
  1463. "in": "path",
  1464. "required": true
  1465. }
  1466. ],
  1467. "responses": {
  1468. "200": {
  1469. "$ref": "#/responses/BranchList"
  1470. }
  1471. }
  1472. }
  1473. },
  1474. "/repos/{owner}/{repo}/branches/{branch}": {
  1475. "get": {
  1476. "produces": [
  1477. "application/json"
  1478. ],
  1479. "tags": [
  1480. "repository"
  1481. ],
  1482. "summary": "Retrieve a specific branch from a repository",
  1483. "operationId": "repoGetBranch",
  1484. "parameters": [
  1485. {
  1486. "type": "string",
  1487. "description": "owner of the repo",
  1488. "name": "owner",
  1489. "in": "path",
  1490. "required": true
  1491. },
  1492. {
  1493. "type": "string",
  1494. "description": "name of the repo",
  1495. "name": "repo",
  1496. "in": "path",
  1497. "required": true
  1498. },
  1499. {
  1500. "type": "string",
  1501. "description": "branch to get",
  1502. "name": "branch",
  1503. "in": "path",
  1504. "required": true
  1505. }
  1506. ],
  1507. "responses": {
  1508. "200": {
  1509. "$ref": "#/responses/Branch"
  1510. }
  1511. }
  1512. }
  1513. },
  1514. "/repos/{owner}/{repo}/collaborators": {
  1515. "get": {
  1516. "produces": [
  1517. "application/json"
  1518. ],
  1519. "tags": [
  1520. "repository"
  1521. ],
  1522. "summary": "List a repository's collaborators",
  1523. "operationId": "repoListCollaborators",
  1524. "parameters": [
  1525. {
  1526. "type": "string",
  1527. "description": "owner of the repo",
  1528. "name": "owner",
  1529. "in": "path",
  1530. "required": true
  1531. },
  1532. {
  1533. "type": "string",
  1534. "description": "name of the repo",
  1535. "name": "repo",
  1536. "in": "path",
  1537. "required": true
  1538. }
  1539. ],
  1540. "responses": {
  1541. "200": {
  1542. "$ref": "#/responses/UserList"
  1543. }
  1544. }
  1545. }
  1546. },
  1547. "/repos/{owner}/{repo}/collaborators/{collaborator}": {
  1548. "get": {
  1549. "produces": [
  1550. "application/json"
  1551. ],
  1552. "tags": [
  1553. "repository"
  1554. ],
  1555. "summary": "Check if a user is a collaborator of a repository",
  1556. "operationId": "repoCheckCollaborator",
  1557. "parameters": [
  1558. {
  1559. "type": "string",
  1560. "description": "owner of the repo",
  1561. "name": "owner",
  1562. "in": "path",
  1563. "required": true
  1564. },
  1565. {
  1566. "type": "string",
  1567. "description": "name of the repo",
  1568. "name": "repo",
  1569. "in": "path",
  1570. "required": true
  1571. },
  1572. {
  1573. "type": "string",
  1574. "description": "username of the collaborator",
  1575. "name": "collaborator",
  1576. "in": "path",
  1577. "required": true
  1578. }
  1579. ],
  1580. "responses": {
  1581. "204": {
  1582. "$ref": "#/responses/empty"
  1583. },
  1584. "404": {
  1585. "$ref": "#/responses/empty"
  1586. }
  1587. }
  1588. },
  1589. "put": {
  1590. "produces": [
  1591. "application/json"
  1592. ],
  1593. "tags": [
  1594. "repository"
  1595. ],
  1596. "summary": "Add a collaborator to a repository",
  1597. "operationId": "repoAddCollaborator",
  1598. "parameters": [
  1599. {
  1600. "type": "string",
  1601. "description": "owner of the repo",
  1602. "name": "owner",
  1603. "in": "path",
  1604. "required": true
  1605. },
  1606. {
  1607. "type": "string",
  1608. "description": "name of the repo",
  1609. "name": "repo",
  1610. "in": "path",
  1611. "required": true
  1612. },
  1613. {
  1614. "type": "string",
  1615. "description": "username of the collaborator to add",
  1616. "name": "collaborator",
  1617. "in": "path",
  1618. "required": true
  1619. },
  1620. {
  1621. "name": "body",
  1622. "in": "body",
  1623. "schema": {
  1624. "$ref": "#/definitions/AddCollaboratorOption"
  1625. }
  1626. }
  1627. ],
  1628. "responses": {
  1629. "204": {
  1630. "$ref": "#/responses/empty"
  1631. }
  1632. }
  1633. },
  1634. "delete": {
  1635. "produces": [
  1636. "application/json"
  1637. ],
  1638. "tags": [
  1639. "repository"
  1640. ],
  1641. "summary": "Delete a collaborator from a repository",
  1642. "operationId": "repoDeleteCollaborator",
  1643. "parameters": [
  1644. {
  1645. "type": "string",
  1646. "description": "owner of the repo",
  1647. "name": "owner",
  1648. "in": "path",
  1649. "required": true
  1650. },
  1651. {
  1652. "type": "string",
  1653. "description": "name of the repo",
  1654. "name": "repo",
  1655. "in": "path",
  1656. "required": true
  1657. },
  1658. {
  1659. "type": "string",
  1660. "description": "username of the collaborator to delete",
  1661. "name": "collaborator",
  1662. "in": "path",
  1663. "required": true
  1664. }
  1665. ],
  1666. "responses": {
  1667. "204": {
  1668. "$ref": "#/responses/empty"
  1669. }
  1670. }
  1671. }
  1672. },
  1673. "/repos/{owner}/{repo}/commits": {
  1674. "get": {
  1675. "produces": [
  1676. "application/json"
  1677. ],
  1678. "tags": [
  1679. "repository"
  1680. ],
  1681. "summary": "Get a list of all commits from a repository",
  1682. "operationId": "repoGetAllCommits",
  1683. "parameters": [
  1684. {
  1685. "type": "string",
  1686. "description": "owner of the repo",
  1687. "name": "owner",
  1688. "in": "path",
  1689. "required": true
  1690. },
  1691. {
  1692. "type": "string",
  1693. "description": "name of the repo",
  1694. "name": "repo",
  1695. "in": "path",
  1696. "required": true
  1697. },
  1698. {
  1699. "type": "string",
  1700. "description": "SHA or branch to start listing commits from (usually 'master')",
  1701. "name": "sha",
  1702. "in": "query"
  1703. },
  1704. {
  1705. "type": "integer",
  1706. "description": "page number of requested commits",
  1707. "name": "page",
  1708. "in": "query"
  1709. }
  1710. ],
  1711. "responses": {
  1712. "200": {
  1713. "$ref": "#/responses/CommitList"
  1714. },
  1715. "404": {
  1716. "$ref": "#/responses/notFound"
  1717. },
  1718. "409": {
  1719. "$ref": "#/responses/EmptyRepository"
  1720. }
  1721. }
  1722. }
  1723. },
  1724. "/repos/{owner}/{repo}/commits/{ref}/statuses": {
  1725. "get": {
  1726. "produces": [
  1727. "application/json"
  1728. ],
  1729. "tags": [
  1730. "repository"
  1731. ],
  1732. "summary": "Get a commit's combined status, by branch/tag/commit reference",
  1733. "operationId": "repoGetCombinedStatusByRef",
  1734. "parameters": [
  1735. {
  1736. "type": "string",
  1737. "description": "owner of the repo",
  1738. "name": "owner",
  1739. "in": "path",
  1740. "required": true
  1741. },
  1742. {
  1743. "type": "string",
  1744. "description": "name of the repo",
  1745. "name": "repo",
  1746. "in": "path",
  1747. "required": true
  1748. },
  1749. {
  1750. "type": "string",
  1751. "description": "name of branch/tag/commit",
  1752. "name": "ref",
  1753. "in": "path",
  1754. "required": true
  1755. },
  1756. {
  1757. "type": "integer",
  1758. "description": "page number of results",
  1759. "name": "page",
  1760. "in": "query"
  1761. }
  1762. ],
  1763. "responses": {
  1764. "200": {
  1765. "$ref": "#/responses/Status"
  1766. }
  1767. }
  1768. }
  1769. },
  1770. "/repos/{owner}/{repo}/contents": {
  1771. "get": {
  1772. "produces": [
  1773. "application/json"
  1774. ],
  1775. "tags": [
  1776. "repository"
  1777. ],
  1778. "summary": "Gets the metadata of all the entries of the root dir",
  1779. "operationId": "repoGetContentsList",
  1780. "parameters": [
  1781. {
  1782. "type": "string",
  1783. "description": "owner of the repo",
  1784. "name": "owner",
  1785. "in": "path",
  1786. "required": true
  1787. },
  1788. {
  1789. "type": "string",
  1790. "description": "name of the repo",
  1791. "name": "repo",
  1792. "in": "path",
  1793. "required": true
  1794. },
  1795. {
  1796. "type": "string",
  1797. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  1798. "name": "ref",
  1799. "in": "query"
  1800. }
  1801. ],
  1802. "responses": {
  1803. "200": {
  1804. "$ref": "#/responses/ContentsListResponse"
  1805. }
  1806. }
  1807. }
  1808. },
  1809. "/repos/{owner}/{repo}/contents/{filepath}": {
  1810. "get": {
  1811. "produces": [
  1812. "application/json"
  1813. ],
  1814. "tags": [
  1815. "repository"
  1816. ],
  1817. "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir",
  1818. "operationId": "repoGetContents",
  1819. "parameters": [
  1820. {
  1821. "type": "string",
  1822. "description": "owner of the repo",
  1823. "name": "owner",
  1824. "in": "path",
  1825. "required": true
  1826. },
  1827. {
  1828. "type": "string",
  1829. "description": "name of the repo",
  1830. "name": "repo",
  1831. "in": "path",
  1832. "required": true
  1833. },
  1834. {
  1835. "type": "string",
  1836. "description": "path of the dir, file, symlink or submodule in the repo",
  1837. "name": "filepath",
  1838. "in": "path",
  1839. "required": true
  1840. },
  1841. {
  1842. "type": "string",
  1843. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  1844. "name": "ref",
  1845. "in": "query"
  1846. }
  1847. ],
  1848. "responses": {
  1849. "200": {
  1850. "$ref": "#/responses/ContentsResponse"
  1851. }
  1852. }
  1853. },
  1854. "put": {
  1855. "consumes": [
  1856. "application/json"
  1857. ],
  1858. "produces": [
  1859. "application/json"
  1860. ],
  1861. "tags": [
  1862. "repository"
  1863. ],
  1864. "summary": "Update a file in a repository",
  1865. "operationId": "repoUpdateFile",
  1866. "parameters": [
  1867. {
  1868. "type": "string",
  1869. "description": "owner of the repo",
  1870. "name": "owner",
  1871. "in": "path",
  1872. "required": true
  1873. },
  1874. {
  1875. "type": "string",
  1876. "description": "name of the repo",
  1877. "name": "repo",
  1878. "in": "path",
  1879. "required": true
  1880. },
  1881. {
  1882. "type": "string",
  1883. "description": "path of the file to update",
  1884. "name": "filepath",
  1885. "in": "path",
  1886. "required": true
  1887. },
  1888. {
  1889. "name": "body",
  1890. "in": "body",
  1891. "required": true,
  1892. "schema": {
  1893. "$ref": "#/definitions/UpdateFileOptions"
  1894. }
  1895. }
  1896. ],
  1897. "responses": {
  1898. "200": {
  1899. "$ref": "#/responses/FileResponse"
  1900. }
  1901. }
  1902. },
  1903. "post": {
  1904. "consumes": [
  1905. "application/json"
  1906. ],
  1907. "produces": [
  1908. "application/json"
  1909. ],
  1910. "tags": [
  1911. "repository"
  1912. ],
  1913. "summary": "Create a file in a repository",
  1914. "operationId": "repoCreateFile",
  1915. "parameters": [
  1916. {
  1917. "type": "string",
  1918. "description": "owner of the repo",
  1919. "name": "owner",
  1920. "in": "path",
  1921. "required": true
  1922. },
  1923. {
  1924. "type": "string",
  1925. "description": "name of the repo",
  1926. "name": "repo",
  1927. "in": "path",
  1928. "required": true
  1929. },
  1930. {
  1931. "type": "string",
  1932. "description": "path of the file to create",
  1933. "name": "filepath",
  1934. "in": "path",
  1935. "required": true
  1936. },
  1937. {
  1938. "name": "body",
  1939. "in": "body",
  1940. "required": true,
  1941. "schema": {
  1942. "$ref": "#/definitions/CreateFileOptions"
  1943. }
  1944. }
  1945. ],
  1946. "responses": {
  1947. "201": {
  1948. "$ref": "#/responses/FileResponse"
  1949. }
  1950. }
  1951. },
  1952. "delete": {
  1953. "consumes": [
  1954. "application/json"
  1955. ],
  1956. "produces": [
  1957. "application/json"
  1958. ],
  1959. "tags": [
  1960. "repository"
  1961. ],
  1962. "summary": "Delete a file in a repository",
  1963. "operationId": "repoDeleteFile",
  1964. "parameters": [
  1965. {
  1966. "type": "string",
  1967. "description": "owner of the repo",
  1968. "name": "owner",
  1969. "in": "path",
  1970. "required": true
  1971. },
  1972. {
  1973. "type": "string",
  1974. "description": "name of the repo",
  1975. "name": "repo",
  1976. "in": "path",
  1977. "required": true
  1978. },
  1979. {
  1980. "type": "string",
  1981. "description": "path of the file to delete",
  1982. "name": "filepath",
  1983. "in": "path",
  1984. "required": true
  1985. },
  1986. {
  1987. "name": "body",
  1988. "in": "body",
  1989. "required": true,
  1990. "schema": {
  1991. "$ref": "#/definitions/DeleteFileOptions"
  1992. }
  1993. }
  1994. ],
  1995. "responses": {
  1996. "200": {
  1997. "$ref": "#/responses/FileDeleteResponse"
  1998. }
  1999. }
  2000. }
  2001. },
  2002. "/repos/{owner}/{repo}/editorconfig/{filepath}": {
  2003. "get": {
  2004. "produces": [
  2005. "application/json"
  2006. ],
  2007. "tags": [
  2008. "repository"
  2009. ],
  2010. "summary": "Get the EditorConfig definitions of a file in a repository",
  2011. "operationId": "repoGetEditorConfig",
  2012. "parameters": [
  2013. {
  2014. "type": "string",
  2015. "description": "owner of the repo",
  2016. "name": "owner",
  2017. "in": "path",
  2018. "required": true
  2019. },
  2020. {
  2021. "type": "string",
  2022. "description": "name of the repo",
  2023. "name": "repo",
  2024. "in": "path",
  2025. "required": true
  2026. },
  2027. {
  2028. "type": "string",
  2029. "description": "filepath of file to get",
  2030. "name": "filepath",
  2031. "in": "path",
  2032. "required": true
  2033. }
  2034. ],
  2035. "responses": {
  2036. "200": {
  2037. "description": "success"
  2038. }
  2039. }
  2040. }
  2041. },
  2042. "/repos/{owner}/{repo}/forks": {
  2043. "get": {
  2044. "produces": [
  2045. "application/json"
  2046. ],
  2047. "tags": [
  2048. "repository"
  2049. ],
  2050. "summary": "List a repository's forks",
  2051. "operationId": "listForks",
  2052. "parameters": [
  2053. {
  2054. "type": "string",
  2055. "description": "owner of the repo",
  2056. "name": "owner",
  2057. "in": "path",
  2058. "required": true
  2059. },
  2060. {
  2061. "type": "string",
  2062. "description": "name of the repo",
  2063. "name": "repo",
  2064. "in": "path",
  2065. "required": true
  2066. }
  2067. ],
  2068. "responses": {
  2069. "200": {
  2070. "$ref": "#/responses/RepositoryList"
  2071. }
  2072. }
  2073. },
  2074. "post": {
  2075. "produces": [
  2076. "application/json"
  2077. ],
  2078. "tags": [
  2079. "repository"
  2080. ],
  2081. "summary": "Fork a repository",
  2082. "operationId": "createFork",
  2083. "parameters": [
  2084. {
  2085. "type": "string",
  2086. "description": "owner of the repo to fork",
  2087. "name": "owner",
  2088. "in": "path",
  2089. "required": true
  2090. },
  2091. {
  2092. "type": "string",
  2093. "description": "name of the repo to fork",
  2094. "name": "repo",
  2095. "in": "path",
  2096. "required": true
  2097. },
  2098. {
  2099. "name": "body",
  2100. "in": "body",
  2101. "schema": {
  2102. "$ref": "#/definitions/CreateForkOption"
  2103. }
  2104. }
  2105. ],
  2106. "responses": {
  2107. "202": {
  2108. "$ref": "#/responses/Repository"
  2109. }
  2110. }
  2111. }
  2112. },
  2113. "/repos/{owner}/{repo}/git/blobs/{sha}": {
  2114. "get": {
  2115. "produces": [
  2116. "application/json"
  2117. ],
  2118. "tags": [
  2119. "repository"
  2120. ],
  2121. "summary": "Gets the blob of a repository.",
  2122. "operationId": "GetBlob",
  2123. "parameters": [
  2124. {
  2125. "type": "string",
  2126. "description": "owner of the repo",
  2127. "name": "owner",
  2128. "in": "path",
  2129. "required": true
  2130. },
  2131. {
  2132. "type": "string",
  2133. "description": "name of the repo",
  2134. "name": "repo",
  2135. "in": "path",
  2136. "required": true
  2137. },
  2138. {
  2139. "type": "string",
  2140. "description": "sha of the commit",
  2141. "name": "sha",
  2142. "in": "path",
  2143. "required": true
  2144. }
  2145. ],
  2146. "responses": {
  2147. "200": {
  2148. "$ref": "#/responses/GitBlobResponse"
  2149. }
  2150. }
  2151. }
  2152. },
  2153. "/repos/{owner}/{repo}/git/commits/{sha}": {
  2154. "get": {
  2155. "produces": [
  2156. "application/json"
  2157. ],
  2158. "tags": [
  2159. "repository"
  2160. ],
  2161. "summary": "Get a single commit from a repository",
  2162. "operationId": "repoGetSingleCommit",
  2163. "parameters": [
  2164. {
  2165. "type": "string",
  2166. "description": "owner of the repo",
  2167. "name": "owner",
  2168. "in": "path",
  2169. "required": true
  2170. },
  2171. {
  2172. "type": "string",
  2173. "description": "name of the repo",
  2174. "name": "repo",
  2175. "in": "path",
  2176. "required": true
  2177. },
  2178. {
  2179. "type": "string",
  2180. "description": "the commit hash",
  2181. "name": "sha",
  2182. "in": "path",
  2183. "required": true
  2184. }
  2185. ],
  2186. "responses": {
  2187. "200": {
  2188. "$ref": "#/responses/Commit"
  2189. },
  2190. "404": {
  2191. "$ref": "#/responses/notFound"
  2192. }
  2193. }
  2194. }
  2195. },
  2196. "/repos/{owner}/{repo}/git/refs": {
  2197. "get": {
  2198. "produces": [
  2199. "application/json"
  2200. ],
  2201. "tags": [
  2202. "repository"
  2203. ],
  2204. "summary": "Get specified ref or filtered repository's refs",
  2205. "operationId": "repoListAllGitRefs",
  2206. "parameters": [
  2207. {
  2208. "type": "string",
  2209. "description": "owner of the repo",
  2210. "name": "owner",
  2211. "in": "path",
  2212. "required": true
  2213. },
  2214. {
  2215. "type": "string",
  2216. "description": "name of the repo",
  2217. "name": "repo",
  2218. "in": "path",
  2219. "required": true
  2220. }
  2221. ],
  2222. "responses": {
  2223. "200": {
  2224. "$ref": "#/responses/ReferenceList"
  2225. },
  2226. "404": {
  2227. "$ref": "#/responses/notFound"
  2228. }
  2229. }
  2230. }
  2231. },
  2232. "/repos/{owner}/{repo}/git/refs/{ref}": {
  2233. "get": {
  2234. "produces": [
  2235. "application/json"
  2236. ],
  2237. "tags": [
  2238. "repository"
  2239. ],
  2240. "summary": "Get specified ref or filtered repository's refs",
  2241. "operationId": "repoListGitRefs",
  2242. "parameters": [
  2243. {
  2244. "type": "string",
  2245. "description": "owner of the repo",
  2246. "name": "owner",
  2247. "in": "path",
  2248. "required": true
  2249. },
  2250. {
  2251. "type": "string",
  2252. "description": "name of the repo",
  2253. "name": "repo",
  2254. "in": "path",
  2255. "required": true
  2256. },
  2257. {
  2258. "type": "string",
  2259. "description": "part or full name of the ref",
  2260. "name": "ref",
  2261. "in": "path",
  2262. "required": true
  2263. }
  2264. ],
  2265. "responses": {
  2266. "200": {
  2267. "$ref": "#/responses/ReferenceList"
  2268. },
  2269. "404": {
  2270. "$ref": "#/responses/notFound"
  2271. }
  2272. }
  2273. }
  2274. },
  2275. "/repos/{owner}/{repo}/git/tags/{sha}": {
  2276. "get": {
  2277. "produces": [
  2278. "application/json"
  2279. ],
  2280. "tags": [
  2281. "repository"
  2282. ],
  2283. "summary": "Gets the tag object of an annotated tag (not lightweight tags)",
  2284. "operationId": "GetTag",
  2285. "parameters": [
  2286. {
  2287. "type": "string",
  2288. "description": "owner of the repo",
  2289. "name": "owner",
  2290. "in": "path",
  2291. "required": true
  2292. },
  2293. {
  2294. "type": "string",
  2295. "description": "name of the repo",
  2296. "name": "repo",
  2297. "in": "path",
  2298. "required": true
  2299. },
  2300. {
  2301. "type": "string",
  2302. "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.",
  2303. "name": "sha",
  2304. "in": "path",
  2305. "required": true
  2306. }
  2307. ],
  2308. "responses": {
  2309. "200": {
  2310. "$ref": "#/responses/AnnotatedTag"
  2311. }
  2312. }
  2313. }
  2314. },
  2315. "/repos/{owner}/{repo}/git/trees/{sha}": {
  2316. "get": {
  2317. "produces": [
  2318. "application/json"
  2319. ],
  2320. "tags": [
  2321. "repository"
  2322. ],
  2323. "summary": "Gets the tree of a repository.",
  2324. "operationId": "GetTree",
  2325. "parameters": [
  2326. {
  2327. "type": "string",
  2328. "description": "owner of the repo",
  2329. "name": "owner",
  2330. "in": "path",
  2331. "required": true
  2332. },
  2333. {
  2334. "type": "string",
  2335. "description": "name of the repo",
  2336. "name": "repo",
  2337. "in": "path",
  2338. "required": true
  2339. },
  2340. {
  2341. "type": "string",
  2342. "description": "sha of the commit",
  2343. "name": "sha",
  2344. "in": "path",
  2345. "required": true
  2346. },
  2347. {
  2348. "type": "boolean",
  2349. "description": "show all directories and files",
  2350. "name": "recursive",
  2351. "in": "query"
  2352. },
  2353. {
  2354. "type": "integer",
  2355. "description": "page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page",
  2356. "name": "page",
  2357. "in": "query"
  2358. },
  2359. {
  2360. "type": "integer",
  2361. "description": "number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE",
  2362. "name": "per_page",
  2363. "in": "query"
  2364. }
  2365. ],
  2366. "responses": {
  2367. "200": {
  2368. "$ref": "#/responses/GitTreeResponse"
  2369. }
  2370. }
  2371. }
  2372. },
  2373. "/repos/{owner}/{repo}/hooks": {
  2374. "get": {
  2375. "produces": [
  2376. "application/json"
  2377. ],
  2378. "tags": [
  2379. "repository"
  2380. ],
  2381. "summary": "List the hooks in a repository",
  2382. "operationId": "repoListHooks",
  2383. "parameters": [
  2384. {
  2385. "type": "string",
  2386. "description": "owner of the repo",
  2387. "name": "owner",
  2388. "in": "path",
  2389. "required": true
  2390. },
  2391. {
  2392. "type": "string",
  2393. "description": "name of the repo",
  2394. "name": "repo",
  2395. "in": "path",
  2396. "required": true
  2397. }
  2398. ],
  2399. "responses": {
  2400. "200": {
  2401. "$ref": "#/responses/HookList"
  2402. }
  2403. }
  2404. },
  2405. "post": {
  2406. "consumes": [
  2407. "application/json"
  2408. ],
  2409. "produces": [
  2410. "application/json"
  2411. ],
  2412. "tags": [
  2413. "repository"
  2414. ],
  2415. "summary": "Create a hook",
  2416. "operationId": "repoCreateHook",
  2417. "parameters": [
  2418. {
  2419. "type": "string",
  2420. "description": "owner of the repo",
  2421. "name": "owner",
  2422. "in": "path",
  2423. "required": true
  2424. },
  2425. {
  2426. "type": "string",
  2427. "description": "name of the repo",
  2428. "name": "repo",
  2429. "in": "path",
  2430. "required": true
  2431. },
  2432. {
  2433. "name": "body",
  2434. "in": "body",
  2435. "schema": {
  2436. "$ref": "#/definitions/CreateHookOption"
  2437. }
  2438. }
  2439. ],
  2440. "responses": {
  2441. "201": {
  2442. "$ref": "#/responses/Hook"
  2443. }
  2444. }
  2445. }
  2446. },
  2447. "/repos/{owner}/{repo}/hooks/git": {
  2448. "get": {
  2449. "produces": [
  2450. "application/json"
  2451. ],
  2452. "tags": [
  2453. "repository"
  2454. ],
  2455. "summary": "List the Git hooks in a repository",
  2456. "operationId": "repoListGitHooks",
  2457. "parameters": [
  2458. {
  2459. "type": "string",
  2460. "description": "owner of the repo",
  2461. "name": "owner",
  2462. "in": "path",
  2463. "required": true
  2464. },
  2465. {
  2466. "type": "string",
  2467. "description": "name of the repo",
  2468. "name": "repo",
  2469. "in": "path",
  2470. "required": true
  2471. }
  2472. ],
  2473. "responses": {
  2474. "200": {
  2475. "$ref": "#/responses/GitHookList"
  2476. }
  2477. }
  2478. }
  2479. },
  2480. "/repos/{owner}/{repo}/hooks/git/{id}": {
  2481. "get": {
  2482. "produces": [
  2483. "application/json"
  2484. ],
  2485. "tags": [
  2486. "repository"
  2487. ],
  2488. "summary": "Get a Git hook",
  2489. "operationId": "repoGetGitHook",
  2490. "parameters": [
  2491. {
  2492. "type": "string",
  2493. "description": "owner of the repo",
  2494. "name": "owner",
  2495. "in": "path",
  2496. "required": true
  2497. },
  2498. {
  2499. "type": "string",
  2500. "description": "name of the repo",
  2501. "name": "repo",
  2502. "in": "path",
  2503. "required": true
  2504. },
  2505. {
  2506. "type": "string",
  2507. "description": "id of the hook to get",
  2508. "name": "id",
  2509. "in": "path",
  2510. "required": true
  2511. }
  2512. ],
  2513. "responses": {
  2514. "200": {
  2515. "$ref": "#/responses/GitHook"
  2516. },
  2517. "404": {
  2518. "$ref": "#/responses/notFound"
  2519. }
  2520. }
  2521. },
  2522. "delete": {
  2523. "produces": [
  2524. "application/json"
  2525. ],
  2526. "tags": [
  2527. "repository"
  2528. ],
  2529. "summary": "Delete a Git hook in a repository",
  2530. "operationId": "repoDeleteGitHook",
  2531. "parameters": [
  2532. {
  2533. "type": "string",
  2534. "description": "owner of the repo",
  2535. "name": "owner",
  2536. "in": "path",
  2537. "required": true
  2538. },
  2539. {
  2540. "type": "string",
  2541. "description": "name of the repo",
  2542. "name": "repo",
  2543. "in": "path",
  2544. "required": true
  2545. },
  2546. {
  2547. "type": "string",
  2548. "description": "id of the hook to get",
  2549. "name": "id",
  2550. "in": "path",
  2551. "required": true
  2552. }
  2553. ],
  2554. "responses": {
  2555. "204": {
  2556. "$ref": "#/responses/empty"
  2557. },
  2558. "404": {
  2559. "$ref": "#/responses/notFound"
  2560. }
  2561. }
  2562. },
  2563. "patch": {
  2564. "produces": [
  2565. "application/json"
  2566. ],
  2567. "tags": [
  2568. "repository"
  2569. ],
  2570. "summary": "Edit a Git hook in a repository",
  2571. "operationId": "repoEditGitHook",
  2572. "parameters": [
  2573. {
  2574. "type": "string",
  2575. "description": "owner of the repo",
  2576. "name": "owner",
  2577. "in": "path",
  2578. "required": true
  2579. },
  2580. {
  2581. "type": "string",
  2582. "description": "name of the repo",
  2583. "name": "repo",
  2584. "in": "path",
  2585. "required": true
  2586. },
  2587. {
  2588. "type": "string",
  2589. "description": "id of the hook to get",
  2590. "name": "id",
  2591. "in": "path",
  2592. "required": true
  2593. },
  2594. {
  2595. "name": "body",
  2596. "in": "body",
  2597. "schema": {
  2598. "$ref": "#/definitions/EditGitHookOption"
  2599. }
  2600. }
  2601. ],
  2602. "responses": {
  2603. "200": {
  2604. "$ref": "#/responses/GitHook"
  2605. },
  2606. "404": {
  2607. "$ref": "#/responses/notFound"
  2608. }
  2609. }
  2610. }
  2611. },
  2612. "/repos/{owner}/{repo}/hooks/{id}": {
  2613. "get": {
  2614. "produces": [
  2615. "application/json"
  2616. ],
  2617. "tags": [
  2618. "repository"
  2619. ],
  2620. "summary": "Get a hook",
  2621. "operationId": "repoGetHook",
  2622. "parameters": [
  2623. {
  2624. "type": "string",
  2625. "description": "owner of the repo",
  2626. "name": "owner",
  2627. "in": "path",
  2628. "required": true
  2629. },
  2630. {
  2631. "type": "string",
  2632. "description": "name of the repo",
  2633. "name": "repo",
  2634. "in": "path",
  2635. "required": true
  2636. },
  2637. {
  2638. "type": "integer",
  2639. "format": "int64",
  2640. "description": "id of the hook to get",
  2641. "name": "id",
  2642. "in": "path",
  2643. "required": true
  2644. }
  2645. ],
  2646. "responses": {
  2647. "200": {
  2648. "$ref": "#/responses/Hook"
  2649. }
  2650. }
  2651. },
  2652. "delete": {
  2653. "produces": [
  2654. "application/json"
  2655. ],
  2656. "tags": [
  2657. "repository"
  2658. ],
  2659. "summary": "Delete a hook in a repository",
  2660. "operationId": "repoDeleteHook",
  2661. "parameters": [
  2662. {
  2663. "type": "string",
  2664. "description": "owner of the repo",
  2665. "name": "owner",
  2666. "in": "path",
  2667. "required": true
  2668. },
  2669. {
  2670. "type": "string",
  2671. "description": "name of the repo",
  2672. "name": "repo",
  2673. "in": "path",
  2674. "required": true
  2675. },
  2676. {
  2677. "type": "integer",
  2678. "format": "int64",
  2679. "description": "id of the hook to delete",
  2680. "name": "id",
  2681. "in": "path",
  2682. "required": true
  2683. }
  2684. ],
  2685. "responses": {
  2686. "204": {
  2687. "$ref": "#/responses/empty"
  2688. },
  2689. "404": {
  2690. "$ref": "#/responses/notFound"
  2691. }
  2692. }
  2693. },
  2694. "patch": {
  2695. "produces": [
  2696. "application/json"
  2697. ],
  2698. "tags": [
  2699. "repository"
  2700. ],
  2701. "summary": "Edit a hook in a repository",
  2702. "operationId": "repoEditHook",
  2703. "parameters": [
  2704. {
  2705. "type": "string",
  2706. "description": "owner of the repo",
  2707. "name": "owner",
  2708. "in": "path",
  2709. "required": true
  2710. },
  2711. {
  2712. "type": "string",
  2713. "description": "name of the repo",
  2714. "name": "repo",
  2715. "in": "path",
  2716. "required": true
  2717. },
  2718. {
  2719. "type": "integer",
  2720. "format": "int64",
  2721. "description": "index of the hook",
  2722. "name": "id",
  2723. "in": "path",
  2724. "required": true
  2725. },
  2726. {
  2727. "name": "body",
  2728. "in": "body",
  2729. "schema": {
  2730. "$ref": "#/definitions/EditHookOption"
  2731. }
  2732. }
  2733. ],
  2734. "responses": {
  2735. "200": {
  2736. "$ref": "#/responses/Hook"
  2737. }
  2738. }
  2739. }
  2740. },
  2741. "/repos/{owner}/{repo}/hooks/{id}/tests": {
  2742. "post": {
  2743. "produces": [
  2744. "application/json"
  2745. ],
  2746. "tags": [
  2747. "repository"
  2748. ],
  2749. "summary": "Test a push webhook",
  2750. "operationId": "repoTestHook",
  2751. "parameters": [
  2752. {
  2753. "type": "string",
  2754. "description": "owner of the repo",
  2755. "name": "owner",
  2756. "in": "path",
  2757. "required": true
  2758. },
  2759. {
  2760. "type": "string",
  2761. "description": "name of the repo",
  2762. "name": "repo",
  2763. "in": "path",
  2764. "required": true
  2765. },
  2766. {
  2767. "type": "integer",
  2768. "format": "int64",
  2769. "description": "id of the hook to test",
  2770. "name": "id",
  2771. "in": "path",
  2772. "required": true
  2773. }
  2774. ],
  2775. "responses": {
  2776. "204": {
  2777. "$ref": "#/responses/empty"
  2778. }
  2779. }
  2780. }
  2781. },
  2782. "/repos/{owner}/{repo}/issues": {
  2783. "get": {
  2784. "produces": [
  2785. "application/json"
  2786. ],
  2787. "tags": [
  2788. "issue"
  2789. ],
  2790. "summary": "List a repository's issues",
  2791. "operationId": "issueListIssues",
  2792. "parameters": [
  2793. {
  2794. "type": "string",
  2795. "description": "owner of the repo",
  2796. "name": "owner",
  2797. "in": "path",
  2798. "required": true
  2799. },
  2800. {
  2801. "type": "string",
  2802. "description": "name of the repo",
  2803. "name": "repo",
  2804. "in": "path",
  2805. "required": true
  2806. },
  2807. {
  2808. "type": "string",
  2809. "description": "whether issue is open or closed",
  2810. "name": "state",
  2811. "in": "query"
  2812. },
  2813. {
  2814. "type": "string",
  2815. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  2816. "name": "labels",
  2817. "in": "query"
  2818. },
  2819. {
  2820. "type": "integer",
  2821. "description": "page number of requested issues",
  2822. "name": "page",
  2823. "in": "query"
  2824. },
  2825. {
  2826. "type": "string",
  2827. "description": "search string",
  2828. "name": "q",
  2829. "in": "query"
  2830. }
  2831. ],
  2832. "responses": {
  2833. "200": {
  2834. "$ref": "#/responses/IssueList"
  2835. }
  2836. }
  2837. },
  2838. "post": {
  2839. "consumes": [
  2840. "application/json"
  2841. ],
  2842. "produces": [
  2843. "application/json"
  2844. ],
  2845. "tags": [
  2846. "issue"
  2847. ],
  2848. "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  2849. "operationId": "issueCreateIssue",
  2850. "parameters": [
  2851. {
  2852. "type": "string",
  2853. "description": "owner of the repo",
  2854. "name": "owner",
  2855. "in": "path",
  2856. "required": true
  2857. },
  2858. {
  2859. "type": "string",
  2860. "description": "name of the repo",
  2861. "name": "repo",
  2862. "in": "path",
  2863. "required": true
  2864. },
  2865. {
  2866. "name": "body",
  2867. "in": "body",
  2868. "schema": {
  2869. "$ref": "#/definitions/CreateIssueOption"
  2870. }
  2871. }
  2872. ],
  2873. "responses": {
  2874. "201": {
  2875. "$ref": "#/responses/Issue"
  2876. }
  2877. }
  2878. }
  2879. },
  2880. "/repos/{owner}/{repo}/issues/comments": {
  2881. "get": {
  2882. "produces": [
  2883. "application/json"
  2884. ],
  2885. "tags": [
  2886. "issue"
  2887. ],
  2888. "summary": "List all comments in a repository",
  2889. "operationId": "issueGetRepoComments",
  2890. "parameters": [
  2891. {
  2892. "type": "string",
  2893. "description": "owner of the repo",
  2894. "name": "owner",
  2895. "in": "path",
  2896. "required": true
  2897. },
  2898. {
  2899. "type": "string",
  2900. "description": "name of the repo",
  2901. "name": "repo",
  2902. "in": "path",
  2903. "required": true
  2904. },
  2905. {
  2906. "type": "string",
  2907. "description": "if provided, only comments updated since the provided time are returned.",
  2908. "name": "since",
  2909. "in": "query"
  2910. }
  2911. ],
  2912. "responses": {
  2913. "200": {
  2914. "$ref": "#/responses/CommentList"
  2915. }
  2916. }
  2917. }
  2918. },
  2919. "/repos/{owner}/{repo}/issues/comments/{id}": {
  2920. "delete": {
  2921. "tags": [
  2922. "issue"
  2923. ],
  2924. "summary": "Delete a comment",
  2925. "operationId": "issueDeleteComment",
  2926. "parameters": [
  2927. {
  2928. "type": "string",
  2929. "description": "owner of the repo",
  2930. "name": "owner",
  2931. "in": "path",
  2932. "required": true
  2933. },
  2934. {
  2935. "type": "string",
  2936. "description": "name of the repo",
  2937. "name": "repo",
  2938. "in": "path",
  2939. "required": true
  2940. },
  2941. {
  2942. "type": "integer",
  2943. "format": "int64",
  2944. "description": "id of comment to delete",
  2945. "name": "id",
  2946. "in": "path",
  2947. "required": true
  2948. }
  2949. ],
  2950. "responses": {
  2951. "204": {
  2952. "$ref": "#/responses/empty"
  2953. }
  2954. }
  2955. },
  2956. "patch": {
  2957. "consumes": [
  2958. "application/json"
  2959. ],
  2960. "produces": [
  2961. "application/json"
  2962. ],
  2963. "tags": [
  2964. "issue"
  2965. ],
  2966. "summary": "Edit a comment",
  2967. "operationId": "issueEditComment",
  2968. "parameters": [
  2969. {
  2970. "type": "string",
  2971. "description": "owner of the repo",
  2972. "name": "owner",
  2973. "in": "path",
  2974. "required": true
  2975. },
  2976. {
  2977. "type": "string",
  2978. "description": "name of the repo",
  2979. "name": "repo",
  2980. "in": "path",
  2981. "required": true
  2982. },
  2983. {
  2984. "type": "integer",
  2985. "format": "int64",
  2986. "description": "id of the comment to edit",
  2987. "name": "id",
  2988. "in": "path",
  2989. "required": true
  2990. },
  2991. {
  2992. "name": "body",
  2993. "in": "body",
  2994. "schema": {
  2995. "$ref": "#/definitions/EditIssueCommentOption"
  2996. }
  2997. }
  2998. ],
  2999. "responses": {
  3000. "200": {
  3001. "$ref": "#/responses/Comment"
  3002. }
  3003. }
  3004. }
  3005. },
  3006. "/repos/{owner}/{repo}/issues/{id}/times": {
  3007. "get": {
  3008. "produces": [
  3009. "application/json"
  3010. ],
  3011. "tags": [
  3012. "issue"
  3013. ],
  3014. "summary": "List an issue's tracked times",
  3015. "operationId": "issueTrackedTimes",
  3016. "parameters": [
  3017. {
  3018. "type": "string",
  3019. "description": "owner of the repo",
  3020. "name": "owner",
  3021. "in": "path",
  3022. "required": true
  3023. },
  3024. {
  3025. "type": "string",
  3026. "description": "name of the repo",
  3027. "name": "repo",
  3028. "in": "path",
  3029. "required": true
  3030. },
  3031. {
  3032. "type": "integer",
  3033. "format": "int64",
  3034. "description": "index of the issue",
  3035. "name": "id",
  3036. "in": "path",
  3037. "required": true
  3038. }
  3039. ],
  3040. "responses": {
  3041. "200": {
  3042. "$ref": "#/responses/TrackedTimeList"
  3043. }
  3044. }
  3045. },
  3046. "post": {
  3047. "consumes": [
  3048. "application/json"
  3049. ],
  3050. "produces": [
  3051. "application/json"
  3052. ],
  3053. "tags": [
  3054. "issue"
  3055. ],
  3056. "summary": "Add a tracked time to a issue",
  3057. "operationId": "issueAddTime",
  3058. "parameters": [
  3059. {
  3060. "type": "string",
  3061. "description": "owner of the repo",
  3062. "name": "owner",
  3063. "in": "path",
  3064. "required": true
  3065. },
  3066. {
  3067. "type": "string",
  3068. "description": "name of the repo",
  3069. "name": "repo",
  3070. "in": "path",
  3071. "required": true
  3072. },
  3073. {
  3074. "type": "integer",
  3075. "format": "int64",
  3076. "description": "index of the issue to add tracked time to",
  3077. "name": "id",
  3078. "in": "path",
  3079. "required": true
  3080. },
  3081. {
  3082. "name": "body",
  3083. "in": "body",
  3084. "schema": {
  3085. "$ref": "#/definitions/AddTimeOption"
  3086. }
  3087. }
  3088. ],
  3089. "responses": {
  3090. "200": {
  3091. "$ref": "#/responses/TrackedTime"
  3092. },
  3093. "400": {
  3094. "$ref": "#/responses/error"
  3095. },
  3096. "403": {
  3097. "$ref": "#/responses/error"
  3098. }
  3099. }
  3100. }
  3101. },
  3102. "/repos/{owner}/{repo}/issues/{index}": {
  3103. "get": {
  3104. "produces": [
  3105. "application/json"
  3106. ],
  3107. "tags": [
  3108. "issue"
  3109. ],
  3110. "summary": "Get an issue",
  3111. "operationId": "issueGetIssue",
  3112. "parameters": [
  3113. {
  3114. "type": "string",
  3115. "description": "owner of the repo",
  3116. "name": "owner",
  3117. "in": "path",
  3118. "required": true
  3119. },
  3120. {
  3121. "type": "string",
  3122. "description": "name of the repo",
  3123. "name": "repo",
  3124. "in": "path",
  3125. "required": true
  3126. },
  3127. {
  3128. "type": "integer",
  3129. "format": "int64",
  3130. "description": "index of the issue to get",
  3131. "name": "index",
  3132. "in": "path",
  3133. "required": true
  3134. }
  3135. ],
  3136. "responses": {
  3137. "200": {
  3138. "$ref": "#/responses/Issue"
  3139. }
  3140. }
  3141. },
  3142. "patch": {
  3143. "consumes": [
  3144. "application/json"
  3145. ],
  3146. "produces": [
  3147. "application/json"
  3148. ],
  3149. "tags": [
  3150. "issue"
  3151. ],
  3152. "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  3153. "operationId": "issueEditIssue",
  3154. "parameters": [
  3155. {
  3156. "type": "string",
  3157. "description": "owner of the repo",
  3158. "name": "owner",
  3159. "in": "path",
  3160. "required": true
  3161. },
  3162. {
  3163. "type": "string",
  3164. "description": "name of the repo",
  3165. "name": "repo",
  3166. "in": "path",
  3167. "required": true
  3168. },
  3169. {
  3170. "type": "integer",
  3171. "format": "int64",
  3172. "description": "index of the issue to edit",
  3173. "name": "index",
  3174. "in": "path",
  3175. "required": true
  3176. },
  3177. {
  3178. "name": "body",
  3179. "in": "body",
  3180. "schema": {
  3181. "$ref": "#/definitions/EditIssueOption"
  3182. }
  3183. }
  3184. ],
  3185. "responses": {
  3186. "201": {
  3187. "$ref": "#/responses/Issue"
  3188. }
  3189. }
  3190. }
  3191. },
  3192. "/repos/{owner}/{repo}/issues/{index}/comments": {
  3193. "get": {
  3194. "produces": [
  3195. "application/json"
  3196. ],
  3197. "tags": [
  3198. "issue"
  3199. ],
  3200. "summary": "List all comments on an issue",
  3201. "operationId": "issueGetComments",
  3202. "parameters": [
  3203. {
  3204. "type": "string",
  3205. "description": "owner of the repo",
  3206. "name": "owner",
  3207. "in": "path",
  3208. "required": true
  3209. },
  3210. {
  3211. "type": "string",
  3212. "description": "name of the repo",
  3213. "name": "repo",
  3214. "in": "path",
  3215. "required": true
  3216. },
  3217. {
  3218. "type": "integer",
  3219. "format": "int64",
  3220. "description": "index of the issue",
  3221. "name": "index",
  3222. "in": "path",
  3223. "required": true
  3224. },
  3225. {
  3226. "type": "string",
  3227. "description": "if provided, only comments updated since the specified time are returned.",
  3228. "name": "since",
  3229. "in": "query"
  3230. }
  3231. ],
  3232. "responses": {
  3233. "200": {
  3234. "$ref": "#/responses/CommentList"
  3235. }
  3236. }
  3237. },
  3238. "post": {
  3239. "consumes": [
  3240. "application/json"
  3241. ],
  3242. "produces": [
  3243. "application/json"
  3244. ],
  3245. "tags": [
  3246. "issue"
  3247. ],
  3248. "summary": "Add a comment to an issue",
  3249. "operationId": "issueCreateComment",
  3250. "parameters": [
  3251. {
  3252. "type": "string",
  3253. "description": "owner of the repo",
  3254. "name": "owner",
  3255. "in": "path",
  3256. "required": true
  3257. },
  3258. {
  3259. "type": "string",
  3260. "description": "name of the repo",
  3261. "name": "repo",
  3262. "in": "path",
  3263. "required": true
  3264. },
  3265. {
  3266. "type": "integer",
  3267. "format": "int64",
  3268. "description": "index of the issue",
  3269. "name": "index",
  3270. "in": "path",
  3271. "required": true
  3272. },
  3273. {
  3274. "name": "body",
  3275. "in": "body",
  3276. "schema": {
  3277. "$ref": "#/definitions/CreateIssueCommentOption"
  3278. }
  3279. }
  3280. ],
  3281. "responses": {
  3282. "201": {
  3283. "$ref": "#/responses/Comment"
  3284. }
  3285. }
  3286. }
  3287. },
  3288. "/repos/{owner}/{repo}/issues/{index}/comments/{id}": {
  3289. "delete": {
  3290. "tags": [
  3291. "issue"
  3292. ],
  3293. "summary": "Delete a comment",
  3294. "operationId": "issueDeleteCommentDeprecated",
  3295. "deprecated": true,
  3296. "parameters": [
  3297. {
  3298. "type": "string",
  3299. "description": "owner of the repo",
  3300. "name": "owner",
  3301. "in": "path",
  3302. "required": true
  3303. },
  3304. {
  3305. "type": "string",
  3306. "description": "name of the repo",
  3307. "name": "repo",
  3308. "in": "path",
  3309. "required": true
  3310. },
  3311. {
  3312. "type": "integer",
  3313. "description": "this parameter is ignored",
  3314. "name": "index",
  3315. "in": "path",
  3316. "required": true
  3317. },
  3318. {
  3319. "type": "integer",
  3320. "format": "int64",
  3321. "description": "id of comment to delete",
  3322. "name": "id",
  3323. "in": "path",
  3324. "required": true
  3325. }
  3326. ],
  3327. "responses": {
  3328. "204": {
  3329. "$ref": "#/responses/empty"
  3330. }
  3331. }
  3332. },
  3333. "patch": {
  3334. "consumes": [
  3335. "application/json"
  3336. ],
  3337. "produces": [
  3338. "application/json"
  3339. ],
  3340. "tags": [
  3341. "issue"
  3342. ],
  3343. "summary": "Edit a comment",
  3344. "operationId": "issueEditCommentDeprecated",
  3345. "deprecated": true,
  3346. "parameters": [
  3347. {
  3348. "type": "string",
  3349. "description": "owner of the repo",
  3350. "name": "owner",
  3351. "in": "path",
  3352. "required": true
  3353. },
  3354. {
  3355. "type": "string",
  3356. "description": "name of the repo",
  3357. "name": "repo",
  3358. "in": "path",
  3359. "required": true
  3360. },
  3361. {
  3362. "type": "integer",
  3363. "description": "this parameter is ignored",
  3364. "name": "index",
  3365. "in": "path",
  3366. "required": true
  3367. },
  3368. {
  3369. "type": "integer",
  3370. "format": "int64",
  3371. "description": "id of the comment to edit",
  3372. "name": "id",
  3373. "in": "path",
  3374. "required": true
  3375. },
  3376. {
  3377. "name": "body",
  3378. "in": "body",
  3379. "schema": {
  3380. "$ref": "#/definitions/EditIssueCommentOption"
  3381. }
  3382. }
  3383. ],
  3384. "responses": {
  3385. "200": {
  3386. "$ref": "#/responses/Comment"
  3387. }
  3388. }
  3389. }
  3390. },
  3391. "/repos/{owner}/{repo}/issues/{index}/deadline": {
  3392. "post": {
  3393. "consumes": [
  3394. "application/json"
  3395. ],
  3396. "produces": [
  3397. "application/json"
  3398. ],
  3399. "tags": [
  3400. "issue"
  3401. ],
  3402. "summary": "Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.",
  3403. "operationId": "issueEditIssueDeadline",
  3404. "parameters": [
  3405. {
  3406. "type": "string",
  3407. "description": "owner of the repo",
  3408. "name": "owner",
  3409. "in": "path",
  3410. "required": true
  3411. },
  3412. {
  3413. "type": "string",
  3414. "description": "name of the repo",
  3415. "name": "repo",
  3416. "in": "path",
  3417. "required": true
  3418. },
  3419. {
  3420. "type": "integer",
  3421. "format": "int64",
  3422. "description": "index of the issue to create or update a deadline on",
  3423. "name": "index",
  3424. "in": "path",
  3425. "required": true
  3426. },
  3427. {
  3428. "name": "body",
  3429. "in": "body",
  3430. "schema": {
  3431. "$ref": "#/definitions/EditDeadlineOption"
  3432. }
  3433. }
  3434. ],
  3435. "responses": {
  3436. "201": {
  3437. "$ref": "#/responses/IssueDeadline"
  3438. },
  3439. "403": {
  3440. "description": "Not repo writer"
  3441. },
  3442. "404": {
  3443. "description": "Issue not found"
  3444. }
  3445. }
  3446. }
  3447. },
  3448. "/repos/{owner}/{repo}/issues/{index}/labels": {
  3449. "get": {
  3450. "produces": [
  3451. "application/json"
  3452. ],
  3453. "tags": [
  3454. "issue"
  3455. ],
  3456. "summary": "Get an issue's labels",
  3457. "operationId": "issueGetLabels",
  3458. "parameters": [
  3459. {
  3460. "type": "string",
  3461. "description": "owner of the repo",
  3462. "name": "owner",
  3463. "in": "path",
  3464. "required": true
  3465. },
  3466. {
  3467. "type": "string",
  3468. "description": "name of the repo",
  3469. "name": "repo",
  3470. "in": "path",
  3471. "required": true
  3472. },
  3473. {
  3474. "type": "integer",
  3475. "format": "int64",
  3476. "description": "index of the issue",
  3477. "name": "index",
  3478. "in": "path",
  3479. "required": true
  3480. }
  3481. ],
  3482. "responses": {
  3483. "200": {
  3484. "$ref": "#/responses/LabelList"
  3485. },
  3486. "404": {
  3487. "$ref": "#/responses/notFound"
  3488. }
  3489. }
  3490. },
  3491. "put": {
  3492. "consumes": [
  3493. "application/json"
  3494. ],
  3495. "produces": [
  3496. "application/json"
  3497. ],
  3498. "tags": [
  3499. "issue"
  3500. ],
  3501. "summary": "Replace an issue's labels",
  3502. "operationId": "issueReplaceLabels",
  3503. "parameters": [
  3504. {
  3505. "type": "string",
  3506. "description": "owner of the repo",
  3507. "name": "owner",
  3508. "in": "path",
  3509. "required": true
  3510. },
  3511. {
  3512. "type": "string",
  3513. "description": "name of the repo",
  3514. "name": "repo",
  3515. "in": "path",
  3516. "required": true
  3517. },
  3518. {
  3519. "type": "integer",
  3520. "format": "int64",
  3521. "description": "index of the issue",
  3522. "name": "index",
  3523. "in": "path",
  3524. "required": true
  3525. },
  3526. {
  3527. "name": "body",
  3528. "in": "body",
  3529. "schema": {
  3530. "$ref": "#/definitions/IssueLabelsOption"
  3531. }
  3532. }
  3533. ],
  3534. "responses": {
  3535. "200": {
  3536. "$ref": "#/responses/LabelList"
  3537. }
  3538. }
  3539. },
  3540. "post": {
  3541. "consumes": [
  3542. "application/json"
  3543. ],
  3544. "produces": [
  3545. "application/json"
  3546. ],
  3547. "tags": [
  3548. "issue"
  3549. ],
  3550. "summary": "Add a label to an issue",
  3551. "operationId": "issueAddLabel",
  3552. "parameters": [
  3553. {
  3554. "type": "string",
  3555. "description": "owner of the repo",
  3556. "name": "owner",
  3557. "in": "path",
  3558. "required": true
  3559. },
  3560. {
  3561. "type": "string",
  3562. "description": "name of the repo",
  3563. "name": "repo",
  3564. "in": "path",
  3565. "required": true
  3566. },
  3567. {
  3568. "type": "integer",
  3569. "format": "int64",
  3570. "description": "index of the issue",
  3571. "name": "index",
  3572. "in": "path",
  3573. "required": true
  3574. },
  3575. {
  3576. "name": "body",
  3577. "in": "body",
  3578. "schema": {
  3579. "$ref": "#/definitions/IssueLabelsOption"
  3580. }
  3581. }
  3582. ],
  3583. "responses": {
  3584. "200": {
  3585. "$ref": "#/responses/LabelList"
  3586. }
  3587. }
  3588. },
  3589. "delete": {
  3590. "produces": [
  3591. "application/json"
  3592. ],
  3593. "tags": [
  3594. "issue"
  3595. ],
  3596. "summary": "Remove all labels from an issue",
  3597. "operationId": "issueClearLabels",
  3598. "parameters": [
  3599. {
  3600. "type": "string",
  3601. "description": "owner of the repo",
  3602. "name": "owner",
  3603. "in": "path",
  3604. "required": true
  3605. },
  3606. {
  3607. "type": "string",
  3608. "description": "name of the repo",
  3609. "name": "repo",
  3610. "in": "path",
  3611. "required": true
  3612. },
  3613. {
  3614. "type": "integer",
  3615. "format": "int64",
  3616. "description": "index of the issue",
  3617. "name": "index",
  3618. "in": "path",
  3619. "required": true
  3620. }
  3621. ],
  3622. "responses": {
  3623. "204": {
  3624. "$ref": "#/responses/empty"
  3625. }
  3626. }
  3627. }
  3628. },
  3629. "/repos/{owner}/{repo}/issues/{index}/labels/{id}": {
  3630. "delete": {
  3631. "produces": [
  3632. "application/json"
  3633. ],
  3634. "tags": [
  3635. "issue"
  3636. ],
  3637. "summary": "Remove a label from an issue",
  3638. "operationId": "issueRemoveLabel",
  3639. "parameters": [
  3640. {
  3641. "type": "string",
  3642. "description": "owner of the repo",
  3643. "name": "owner",
  3644. "in": "path",
  3645. "required": true
  3646. },
  3647. {
  3648. "type": "string",
  3649. "description": "name of the repo",
  3650. "name": "repo",
  3651. "in": "path",
  3652. "required": true
  3653. },
  3654. {
  3655. "type": "integer",
  3656. "format": "int64",
  3657. "description": "index of the issue",
  3658. "name": "index",
  3659. "in": "path",
  3660. "required": true
  3661. },
  3662. {
  3663. "type": "integer",
  3664. "format": "int64",
  3665. "description": "id of the label to remove",
  3666. "name": "id",
  3667. "in": "path",
  3668. "required": true
  3669. }
  3670. ],
  3671. "responses": {
  3672. "204": {
  3673. "$ref": "#/responses/empty"
  3674. }
  3675. }
  3676. }
  3677. },
  3678. "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": {
  3679. "post": {
  3680. "consumes": [
  3681. "application/json"
  3682. ],
  3683. "produces": [
  3684. "application/json"
  3685. ],
  3686. "tags": [
  3687. "issue"
  3688. ],
  3689. "summary": "Start stopwatch on an issue.",
  3690. "operationId": "issueStartStopWatch",
  3691. "parameters": [
  3692. {
  3693. "type": "string",
  3694. "description": "owner of the repo",
  3695. "name": "owner",
  3696. "in": "path",
  3697. "required": true
  3698. },
  3699. {
  3700. "type": "string",
  3701. "description": "name of the repo",
  3702. "name": "repo",
  3703. "in": "path",
  3704. "required": true
  3705. },
  3706. {
  3707. "type": "integer",
  3708. "format": "int64",
  3709. "description": "index of the issue to create the stopwatch on",
  3710. "name": "index",
  3711. "in": "path",
  3712. "required": true
  3713. }
  3714. ],
  3715. "responses": {
  3716. "201": {
  3717. "$ref": "#/responses/empty"
  3718. },
  3719. "403": {
  3720. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  3721. },
  3722. "404": {
  3723. "description": "Issue not found"
  3724. },
  3725. "409": {
  3726. "description": "Cannot start a stopwatch again if it already exists"
  3727. }
  3728. }
  3729. }
  3730. },
  3731. "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": {
  3732. "post": {
  3733. "consumes": [
  3734. "application/json"
  3735. ],
  3736. "produces": [
  3737. "application/json"
  3738. ],
  3739. "tags": [
  3740. "issue"
  3741. ],
  3742. "summary": "Stop an issue's existing stopwatch.",
  3743. "operationId": "issueStopWatch",
  3744. "parameters": [
  3745. {
  3746. "type": "string",
  3747. "description": "owner of the repo",
  3748. "name": "owner",
  3749. "in": "path",
  3750. "required": true
  3751. },
  3752. {
  3753. "type": "string",
  3754. "description": "name of the repo",
  3755. "name": "repo",
  3756. "in": "path",
  3757. "required": true
  3758. },
  3759. {
  3760. "type": "integer",
  3761. "format": "int64",
  3762. "description": "index of the issue to stop the stopwatch on",
  3763. "name": "index",
  3764. "in": "path",
  3765. "required": true
  3766. }
  3767. ],
  3768. "responses": {
  3769. "201": {
  3770. "$ref": "#/responses/empty"
  3771. },
  3772. "403": {
  3773. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  3774. },
  3775. "404": {
  3776. "description": "Issue not found"
  3777. },
  3778. "409": {
  3779. "description": "Cannot stop a non existent stopwatch"
  3780. }
  3781. }
  3782. }
  3783. },
  3784. "/repos/{owner}/{repo}/issues/{index}/subscriptions": {
  3785. "get": {
  3786. "consumes": [
  3787. "application/json"
  3788. ],
  3789. "produces": [
  3790. "application/json"
  3791. ],
  3792. "tags": [
  3793. "issue"
  3794. ],
  3795. "summary": "Get users who subscribed on an issue.",
  3796. "operationId": "issueSubscriptions",
  3797. "parameters": [
  3798. {
  3799. "type": "string",
  3800. "description": "owner of the repo",
  3801. "name": "owner",
  3802. "in": "path",
  3803. "required": true
  3804. },
  3805. {
  3806. "type": "string",
  3807. "description": "name of the repo",
  3808. "name": "repo",
  3809. "in": "path",
  3810. "required": true
  3811. },
  3812. {
  3813. "type": "integer",
  3814. "format": "int64",
  3815. "description": "index of the issue",
  3816. "name": "index",
  3817. "in": "path",
  3818. "required": true
  3819. }
  3820. ],
  3821. "responses": {
  3822. "201": {
  3823. "$ref": "#/responses/empty"
  3824. },
  3825. "404": {
  3826. "description": "Issue not found"
  3827. }
  3828. }
  3829. }
  3830. },
  3831. "/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}": {
  3832. "put": {
  3833. "consumes": [
  3834. "application/json"
  3835. ],
  3836. "produces": [
  3837. "application/json"
  3838. ],
  3839. "tags": [
  3840. "issue"
  3841. ],
  3842. "summary": "Subscribe user to issue",
  3843. "operationId": "issueAddSubscription",
  3844. "parameters": [
  3845. {
  3846. "type": "string",
  3847. "description": "owner of the repo",
  3848. "name": "owner",
  3849. "in": "path",
  3850. "required": true
  3851. },
  3852. {
  3853. "type": "string",
  3854. "description": "name of the repo",
  3855. "name": "repo",
  3856. "in": "path",
  3857. "required": true
  3858. },
  3859. {
  3860. "type": "integer",
  3861. "format": "int64",
  3862. "description": "index of the issue",
  3863. "name": "index",
  3864. "in": "path",
  3865. "required": true
  3866. },
  3867. {
  3868. "type": "string",
  3869. "description": "user to subscribe",
  3870. "name": "user",
  3871. "in": "path",
  3872. "required": true
  3873. }
  3874. ],
  3875. "responses": {
  3876. "201": {
  3877. "$ref": "#/responses/empty"
  3878. },
  3879. "304": {
  3880. "description": "User can only subscribe itself if he is no admin"
  3881. },
  3882. "404": {
  3883. "description": "Issue not found"
  3884. }
  3885. }
  3886. },
  3887. "delete": {
  3888. "consumes": [
  3889. "application/json"
  3890. ],
  3891. "produces": [
  3892. "application/json"
  3893. ],
  3894. "tags": [
  3895. "issue"
  3896. ],
  3897. "summary": "Unsubscribe user from issue",
  3898. "operationId": "issueDeleteSubscription",
  3899. "parameters": [
  3900. {
  3901. "type": "string",
  3902. "description": "owner of the repo",
  3903. "name": "owner",
  3904. "in": "path",
  3905. "required": true
  3906. },
  3907. {
  3908. "type": "string",
  3909. "description": "name of the repo",
  3910. "name": "repo",
  3911. "in": "path",
  3912. "required": true
  3913. },
  3914. {
  3915. "type": "integer",
  3916. "format": "int64",
  3917. "description": "index of the issue",
  3918. "name": "index",
  3919. "in": "path",
  3920. "required": true
  3921. },
  3922. {
  3923. "type": "string",
  3924. "description": "user witch unsubscribe",
  3925. "name": "user",
  3926. "in": "path",
  3927. "required": true
  3928. }
  3929. ],
  3930. "responses": {
  3931. "201": {
  3932. "$ref": "#/responses/empty"
  3933. },
  3934. "304": {
  3935. "description": "User can only subscribe itself if he is no admin"
  3936. },
  3937. "404": {
  3938. "description": "Issue not found"
  3939. }
  3940. }
  3941. }
  3942. },
  3943. "/repos/{owner}/{repo}/keys": {
  3944. "get": {
  3945. "produces": [
  3946. "application/json"
  3947. ],
  3948. "tags": [
  3949. "repository"
  3950. ],
  3951. "summary": "List a repository's keys",
  3952. "operationId": "repoListKeys",
  3953. "parameters": [
  3954. {
  3955. "type": "string",
  3956. "description": "owner of the repo",
  3957. "name": "owner",
  3958. "in": "path",
  3959. "required": true
  3960. },
  3961. {
  3962. "type": "string",
  3963. "description": "name of the repo",
  3964. "name": "repo",
  3965. "in": "path",
  3966. "required": true
  3967. },
  3968. {
  3969. "type": "integer",
  3970. "description": "the key_id to search for",
  3971. "name": "key_id",
  3972. "in": "query"
  3973. },
  3974. {
  3975. "type": "string",
  3976. "description": "fingerprint of the key",
  3977. "name": "fingerprint",
  3978. "in": "query"
  3979. }
  3980. ],
  3981. "responses": {
  3982. "200": {
  3983. "$ref": "#/responses/DeployKeyList"
  3984. }
  3985. }
  3986. },
  3987. "post": {
  3988. "consumes": [
  3989. "application/json"
  3990. ],
  3991. "produces": [
  3992. "application/json"
  3993. ],
  3994. "tags": [
  3995. "repository"
  3996. ],
  3997. "summary": "Add a key to a repository",
  3998. "operationId": "repoCreateKey",
  3999. "parameters": [
  4000. {
  4001. "type": "string",
  4002. "description": "owner of the repo",
  4003. "name": "owner",
  4004. "in": "path",
  4005. "required": true
  4006. },
  4007. {
  4008. "type": "string",
  4009. "description": "name of the repo",
  4010. "name": "repo",
  4011. "in": "path",
  4012. "required": true
  4013. },
  4014. {
  4015. "name": "body",
  4016. "in": "body",
  4017. "schema": {
  4018. "$ref": "#/definitions/CreateKeyOption"
  4019. }
  4020. }
  4021. ],
  4022. "responses": {
  4023. "201": {
  4024. "$ref": "#/responses/DeployKey"
  4025. }
  4026. }
  4027. }
  4028. },
  4029. "/repos/{owner}/{repo}/keys/{id}": {
  4030. "get": {
  4031. "produces": [
  4032. "application/json"
  4033. ],
  4034. "tags": [
  4035. "repository"
  4036. ],
  4037. "summary": "Get a repository's key by id",
  4038. "operationId": "repoGetKey",
  4039. "parameters": [
  4040. {
  4041. "type": "string",
  4042. "description": "owner of the repo",
  4043. "name": "owner",
  4044. "in": "path",
  4045. "required": true
  4046. },
  4047. {
  4048. "type": "string",
  4049. "description": "name of the repo",
  4050. "name": "repo",
  4051. "in": "path",
  4052. "required": true
  4053. },
  4054. {
  4055. "type": "integer",
  4056. "format": "int64",
  4057. "description": "id of the key to get",
  4058. "name": "id",
  4059. "in": "path",
  4060. "required": true
  4061. }
  4062. ],
  4063. "responses": {
  4064. "200": {
  4065. "$ref": "#/responses/DeployKey"
  4066. }
  4067. }
  4068. },
  4069. "delete": {
  4070. "tags": [
  4071. "repository"
  4072. ],
  4073. "summary": "Delete a key from a repository",
  4074. "operationId": "repoDeleteKey",
  4075. "parameters": [
  4076. {
  4077. "type": "string",
  4078. "description": "owner of the repo",
  4079. "name": "owner",
  4080. "in": "path",
  4081. "required": true
  4082. },
  4083. {
  4084. "type": "string",
  4085. "description": "name of the repo",
  4086. "name": "repo",
  4087. "in": "path",
  4088. "required": true
  4089. },
  4090. {
  4091. "type": "integer",
  4092. "format": "int64",
  4093. "description": "id of the key to delete",
  4094. "name": "id",
  4095. "in": "path",
  4096. "required": true
  4097. }
  4098. ],
  4099. "responses": {
  4100. "204": {
  4101. "$ref": "#/responses/empty"
  4102. }
  4103. }
  4104. }
  4105. },
  4106. "/repos/{owner}/{repo}/labels": {
  4107. "get": {
  4108. "produces": [
  4109. "application/json"
  4110. ],
  4111. "tags": [
  4112. "issue"
  4113. ],
  4114. "summary": "Get all of a repository's labels",
  4115. "operationId": "issueListLabels",
  4116. "parameters": [
  4117. {
  4118. "type": "string",
  4119. "description": "owner of the repo",
  4120. "name": "owner",
  4121. "in": "path",
  4122. "required": true
  4123. },
  4124. {
  4125. "type": "string",
  4126. "description": "name of the repo",
  4127. "name": "repo",
  4128. "in": "path",
  4129. "required": true
  4130. }
  4131. ],
  4132. "responses": {
  4133. "200": {
  4134. "$ref": "#/responses/LabelList"
  4135. }
  4136. }
  4137. },
  4138. "post": {
  4139. "consumes": [
  4140. "application/json"
  4141. ],
  4142. "produces": [
  4143. "application/json"
  4144. ],
  4145. "tags": [
  4146. "issue"
  4147. ],
  4148. "summary": "Create a label",
  4149. "operationId": "issueCreateLabel",
  4150. "parameters": [
  4151. {
  4152. "type": "string",
  4153. "description": "owner of the repo",
  4154. "name": "owner",
  4155. "in": "path",
  4156. "required": true
  4157. },
  4158. {
  4159. "type": "string",
  4160. "description": "name of the repo",
  4161. "name": "repo",
  4162. "in": "path",
  4163. "required": true
  4164. },
  4165. {
  4166. "name": "body",
  4167. "in": "body",
  4168. "schema": {
  4169. "$ref": "#/definitions/CreateLabelOption"
  4170. }
  4171. }
  4172. ],
  4173. "responses": {
  4174. "201": {
  4175. "$ref": "#/responses/Label"
  4176. }
  4177. }
  4178. }
  4179. },
  4180. "/repos/{owner}/{repo}/labels/{id}": {
  4181. "get": {
  4182. "produces": [
  4183. "application/json"
  4184. ],
  4185. "tags": [
  4186. "issue"
  4187. ],
  4188. "summary": "Get a single label",
  4189. "operationId": "issueGetLabel",
  4190. "parameters": [
  4191. {
  4192. "type": "string",
  4193. "description": "owner of the repo",
  4194. "name": "owner",
  4195. "in": "path",
  4196. "required": true
  4197. },
  4198. {
  4199. "type": "string",
  4200. "description": "name of the repo",
  4201. "name": "repo",
  4202. "in": "path",
  4203. "required": true
  4204. },
  4205. {
  4206. "type": "integer",
  4207. "format": "int64",
  4208. "description": "id of the label to get",
  4209. "name": "id",
  4210. "in": "path",
  4211. "required": true
  4212. }
  4213. ],
  4214. "responses": {
  4215. "200": {
  4216. "$ref": "#/responses/Label"
  4217. }
  4218. }
  4219. },
  4220. "delete": {
  4221. "tags": [
  4222. "issue"
  4223. ],
  4224. "summary": "Delete a label",
  4225. "operationId": "issueDeleteLabel",
  4226. "parameters": [
  4227. {
  4228. "type": "string",
  4229. "description": "owner of the repo",
  4230. "name": "owner",
  4231. "in": "path",
  4232. "required": true
  4233. },
  4234. {
  4235. "type": "string",
  4236. "description": "name of the repo",
  4237. "name": "repo",
  4238. "in": "path",
  4239. "required": true
  4240. },
  4241. {
  4242. "type": "integer",
  4243. "format": "int64",
  4244. "description": "id of the label to delete",
  4245. "name": "id",
  4246. "in": "path",
  4247. "required": true
  4248. }
  4249. ],
  4250. "responses": {
  4251. "204": {
  4252. "$ref": "#/responses/empty"
  4253. }
  4254. }
  4255. },
  4256. "patch": {
  4257. "consumes": [
  4258. "application/json"
  4259. ],
  4260. "produces": [
  4261. "application/json"
  4262. ],
  4263. "tags": [
  4264. "issue"
  4265. ],
  4266. "summary": "Update a label",
  4267. "operationId": "issueEditLabel",
  4268. "parameters": [
  4269. {
  4270. "type": "string",
  4271. "description": "owner of the repo",
  4272. "name": "owner",
  4273. "in": "path",
  4274. "required": true
  4275. },
  4276. {
  4277. "type": "string",
  4278. "description": "name of the repo",
  4279. "name": "repo",
  4280. "in": "path",
  4281. "required": true
  4282. },
  4283. {
  4284. "type": "integer",
  4285. "format": "int64",
  4286. "description": "id of the label to edit",
  4287. "name": "id",
  4288. "in": "path",
  4289. "required": true
  4290. },
  4291. {
  4292. "name": "body",
  4293. "in": "body",
  4294. "schema": {
  4295. "$ref": "#/definitions/EditLabelOption"
  4296. }
  4297. }
  4298. ],
  4299. "responses": {
  4300. "200": {
  4301. "$ref": "#/responses/Label"
  4302. }
  4303. }
  4304. }
  4305. },
  4306. "/repos/{owner}/{repo}/milestones": {
  4307. "get": {
  4308. "produces": [
  4309. "application/json"
  4310. ],
  4311. "tags": [
  4312. "issue"
  4313. ],
  4314. "summary": "Get all of a repository's opened milestones",
  4315. "operationId": "issueGetMilestonesList",
  4316. "parameters": [
  4317. {
  4318. "type": "string",
  4319. "description": "owner of the repo",
  4320. "name": "owner",
  4321. "in": "path",
  4322. "required": true
  4323. },
  4324. {
  4325. "type": "string",
  4326. "description": "name of the repo",
  4327. "name": "repo",
  4328. "in": "path",
  4329. "required": true
  4330. },
  4331. {
  4332. "type": "string",
  4333. "description": "Milestone state, Recognised values are open, closed and all. Defaults to \"open\"",
  4334. "name": "state",
  4335. "in": "query"
  4336. }
  4337. ],
  4338. "responses": {
  4339. "200": {
  4340. "$ref": "#/responses/MilestoneList"
  4341. }
  4342. }
  4343. },
  4344. "post": {
  4345. "consumes": [
  4346. "application/json"
  4347. ],
  4348. "produces": [
  4349. "application/json"
  4350. ],
  4351. "tags": [
  4352. "issue"
  4353. ],
  4354. "summary": "Create a milestone",
  4355. "operationId": "issueCreateMilestone",
  4356. "parameters": [
  4357. {
  4358. "type": "string",
  4359. "description": "owner of the repo",
  4360. "name": "owner",
  4361. "in": "path",
  4362. "required": true
  4363. },
  4364. {
  4365. "type": "string",
  4366. "description": "name of the repo",
  4367. "name": "repo",
  4368. "in": "path",
  4369. "required": true
  4370. },
  4371. {
  4372. "name": "body",
  4373. "in": "body",
  4374. "schema": {
  4375. "$ref": "#/definitions/CreateMilestoneOption"
  4376. }
  4377. }
  4378. ],
  4379. "responses": {
  4380. "201": {
  4381. "$ref": "#/responses/Milestone"
  4382. }
  4383. }
  4384. }
  4385. },
  4386. "/repos/{owner}/{repo}/milestones/{id}": {
  4387. "get": {
  4388. "produces": [
  4389. "application/json"
  4390. ],
  4391. "tags": [
  4392. "issue"
  4393. ],
  4394. "summary": "Get a milestone",
  4395. "operationId": "issueGetMilestone",
  4396. "parameters": [
  4397. {
  4398. "type": "string",
  4399. "description": "owner of the repo",
  4400. "name": "owner",
  4401. "in": "path",
  4402. "required": true
  4403. },
  4404. {
  4405. "type": "string",
  4406. "description": "name of the repo",
  4407. "name": "repo",
  4408. "in": "path",
  4409. "required": true
  4410. },
  4411. {
  4412. "type": "integer",
  4413. "format": "int64",
  4414. "description": "id of the milestone",
  4415. "name": "id",
  4416. "in": "path",
  4417. "required": true
  4418. }
  4419. ],
  4420. "responses": {
  4421. "200": {
  4422. "$ref": "#/responses/Milestone"
  4423. }
  4424. }
  4425. },
  4426. "delete": {
  4427. "tags": [
  4428. "issue"
  4429. ],
  4430. "summary": "Delete a milestone",
  4431. "operationId": "issueDeleteMilestone",
  4432. "parameters": [
  4433. {
  4434. "type": "string",
  4435. "description": "owner of the repo",
  4436. "name": "owner",
  4437. "in": "path",
  4438. "required": true
  4439. },
  4440. {
  4441. "type": "string",
  4442. "description": "name of the repo",
  4443. "name": "repo",
  4444. "in": "path",
  4445. "required": true
  4446. },
  4447. {
  4448. "type": "integer",
  4449. "format": "int64",
  4450. "description": "id of the milestone to delete",
  4451. "name": "id",
  4452. "in": "path",
  4453. "required": true
  4454. }
  4455. ],
  4456. "responses": {
  4457. "204": {
  4458. "$ref": "#/responses/empty"
  4459. }
  4460. }
  4461. },
  4462. "patch": {
  4463. "consumes": [
  4464. "application/json"
  4465. ],
  4466. "produces": [
  4467. "application/json"
  4468. ],
  4469. "tags": [
  4470. "issue"
  4471. ],
  4472. "summary": "Update a milestone",
  4473. "operationId": "issueEditMilestone",
  4474. "parameters": [
  4475. {
  4476. "type": "string",
  4477. "description": "owner of the repo",
  4478. "name": "owner",
  4479. "in": "path",
  4480. "required": true
  4481. },
  4482. {
  4483. "type": "string",
  4484. "description": "name of the repo",
  4485. "name": "repo",
  4486. "in": "path",
  4487. "required": true
  4488. },
  4489. {
  4490. "type": "integer",
  4491. "format": "int64",
  4492. "description": "id of the milestone",
  4493. "name": "id",
  4494. "in": "path",
  4495. "required": true
  4496. },
  4497. {
  4498. "name": "body",
  4499. "in": "body",
  4500. "schema": {
  4501. "$ref": "#/definitions/EditMilestoneOption"
  4502. }
  4503. }
  4504. ],
  4505. "responses": {
  4506. "200": {
  4507. "$ref": "#/responses/Milestone"
  4508. }
  4509. }
  4510. }
  4511. },
  4512. "/repos/{owner}/{repo}/mirror-sync": {
  4513. "post": {
  4514. "produces": [
  4515. "application/json"
  4516. ],
  4517. "tags": [
  4518. "repository"
  4519. ],
  4520. "summary": "Sync a mirrored repository",
  4521. "operationId": "repoMirrorSync",
  4522. "parameters": [
  4523. {
  4524. "type": "string",
  4525. "description": "owner of the repo to sync",
  4526. "name": "owner",
  4527. "in": "path",
  4528. "required": true
  4529. },
  4530. {
  4531. "type": "string",
  4532. "description": "name of the repo to sync",
  4533. "name": "repo",
  4534. "in": "path",
  4535. "required": true
  4536. }
  4537. ],
  4538. "responses": {
  4539. "200": {
  4540. "$ref": "#/responses/empty"
  4541. }
  4542. }
  4543. }
  4544. },
  4545. "/repos/{owner}/{repo}/pulls": {
  4546. "get": {
  4547. "produces": [
  4548. "application/json"
  4549. ],
  4550. "tags": [
  4551. "repository"
  4552. ],
  4553. "summary": "List a repo's pull requests",
  4554. "operationId": "repoListPullRequests",
  4555. "parameters": [
  4556. {
  4557. "type": "string",
  4558. "description": "owner of the repo",
  4559. "name": "owner",
  4560. "in": "path",
  4561. "required": true
  4562. },
  4563. {
  4564. "type": "string",
  4565. "description": "name of the repo",
  4566. "name": "repo",
  4567. "in": "path",
  4568. "required": true
  4569. },
  4570. {
  4571. "type": "integer",
  4572. "description": "Page number",
  4573. "name": "page",
  4574. "in": "query"
  4575. },
  4576. {
  4577. "enum": [
  4578. "closed",
  4579. "open",
  4580. "all"
  4581. ],
  4582. "type": "string",
  4583. "description": "State of pull request: open or closed (optional)",
  4584. "name": "state",
  4585. "in": "query"
  4586. },
  4587. {
  4588. "enum": [
  4589. "oldest",
  4590. "recentupdate",
  4591. "leastupdate",
  4592. "mostcomment",
  4593. "leastcomment",
  4594. "priority"
  4595. ],
  4596. "type": "string",
  4597. "description": "Type of sort",
  4598. "name": "sort",
  4599. "in": "query"
  4600. },
  4601. {
  4602. "type": "integer",
  4603. "format": "int64",
  4604. "description": "ID of the milestone",
  4605. "name": "milestone",
  4606. "in": "query"
  4607. },
  4608. {
  4609. "type": "array",
  4610. "items": {
  4611. "type": "integer",
  4612. "format": "int64"
  4613. },
  4614. "collectionFormat": "multi",
  4615. "description": "Label IDs",
  4616. "name": "labels",
  4617. "in": "query"
  4618. }
  4619. ],
  4620. "responses": {
  4621. "200": {
  4622. "$ref": "#/responses/PullRequestList"
  4623. }
  4624. }
  4625. },
  4626. "post": {
  4627. "consumes": [
  4628. "application/json"
  4629. ],
  4630. "produces": [
  4631. "application/json"
  4632. ],
  4633. "tags": [
  4634. "repository"
  4635. ],
  4636. "summary": "Create a pull request",
  4637. "operationId": "repoCreatePullRequest",
  4638. "parameters": [
  4639. {
  4640. "type": "string",
  4641. "description": "owner of the repo",
  4642. "name": "owner",
  4643. "in": "path",
  4644. "required": true
  4645. },
  4646. {
  4647. "type": "string",
  4648. "description": "name of the repo",
  4649. "name": "repo",
  4650. "in": "path",
  4651. "required": true
  4652. },
  4653. {
  4654. "name": "body",
  4655. "in": "body",
  4656. "schema": {
  4657. "$ref": "#/definitions/CreatePullRequestOption"
  4658. }
  4659. }
  4660. ],
  4661. "responses": {
  4662. "201": {
  4663. "$ref": "#/responses/PullRequest"
  4664. }
  4665. }
  4666. }
  4667. },
  4668. "/repos/{owner}/{repo}/pulls/{index}": {
  4669. "get": {
  4670. "produces": [
  4671. "application/json"
  4672. ],
  4673. "tags": [
  4674. "repository"
  4675. ],
  4676. "summary": "Get a pull request",
  4677. "operationId": "repoGetPullRequest",
  4678. "parameters": [
  4679. {
  4680. "type": "string",
  4681. "description": "owner of the repo",
  4682. "name": "owner",
  4683. "in": "path",
  4684. "required": true
  4685. },
  4686. {
  4687. "type": "string",
  4688. "description": "name of the repo",
  4689. "name": "repo",
  4690. "in": "path",
  4691. "required": true
  4692. },
  4693. {
  4694. "type": "integer",
  4695. "format": "int64",
  4696. "description": "index of the pull request to get",
  4697. "name": "index",
  4698. "in": "path",
  4699. "required": true
  4700. }
  4701. ],
  4702. "responses": {
  4703. "200": {
  4704. "$ref": "#/responses/PullRequest"
  4705. }
  4706. }
  4707. },
  4708. "patch": {
  4709. "consumes": [
  4710. "application/json"
  4711. ],
  4712. "produces": [
  4713. "application/json"
  4714. ],
  4715. "tags": [
  4716. "repository"
  4717. ],
  4718. "summary": "Update a pull request",
  4719. "operationId": "repoEditPullRequest",
  4720. "parameters": [
  4721. {
  4722. "type": "string",
  4723. "description": "owner of the repo",
  4724. "name": "owner",
  4725. "in": "path",
  4726. "required": true
  4727. },
  4728. {
  4729. "type": "string",
  4730. "description": "name of the repo",
  4731. "name": "repo",
  4732. "in": "path",
  4733. "required": true
  4734. },
  4735. {
  4736. "type": "integer",
  4737. "format": "int64",
  4738. "description": "index of the pull request to edit",
  4739. "name": "index",
  4740. "in": "path",
  4741. "required": true
  4742. },
  4743. {
  4744. "name": "body",
  4745. "in": "body",
  4746. "schema": {
  4747. "$ref": "#/definitions/EditPullRequestOption"
  4748. }
  4749. }
  4750. ],
  4751. "responses": {
  4752. "201": {
  4753. "$ref": "#/responses/PullRequest"
  4754. }
  4755. }
  4756. }
  4757. },
  4758. "/repos/{owner}/{repo}/pulls/{index}/merge": {
  4759. "get": {
  4760. "produces": [
  4761. "application/json"
  4762. ],
  4763. "tags": [
  4764. "repository"
  4765. ],
  4766. "summary": "Check if a pull request has been merged",
  4767. "operationId": "repoPullRequestIsMerged",
  4768. "parameters": [
  4769. {
  4770. "type": "string",
  4771. "description": "owner of the repo",
  4772. "name": "owner",
  4773. "in": "path",
  4774. "required": true
  4775. },
  4776. {
  4777. "type": "string",
  4778. "description": "name of the repo",
  4779. "name": "repo",
  4780. "in": "path",
  4781. "required": true
  4782. },
  4783. {
  4784. "type": "integer",
  4785. "format": "int64",
  4786. "description": "index of the pull request",
  4787. "name": "index",
  4788. "in": "path",
  4789. "required": true
  4790. }
  4791. ],
  4792. "responses": {
  4793. "204": {
  4794. "description": "pull request has been merged"
  4795. },
  4796. "404": {
  4797. "description": "pull request has not been merged"
  4798. }
  4799. }
  4800. },
  4801. "post": {
  4802. "produces": [
  4803. "application/json"
  4804. ],
  4805. "tags": [
  4806. "repository"
  4807. ],
  4808. "summary": "Merge a pull request",
  4809. "operationId": "repoMergePullRequest",
  4810. "parameters": [
  4811. {
  4812. "type": "string",
  4813. "description": "owner of the repo",
  4814. "name": "owner",
  4815. "in": "path",
  4816. "required": true
  4817. },
  4818. {
  4819. "type": "string",
  4820. "description": "name of the repo",
  4821. "name": "repo",
  4822. "in": "path",
  4823. "required": true
  4824. },
  4825. {
  4826. "type": "integer",
  4827. "format": "int64",
  4828. "description": "index of the pull request to merge",
  4829. "name": "index",
  4830. "in": "path",
  4831. "required": true
  4832. },
  4833. {
  4834. "name": "body",
  4835. "in": "body",
  4836. "schema": {
  4837. "$ref": "#/definitions/MergePullRequestOption"
  4838. }
  4839. }
  4840. ],
  4841. "responses": {
  4842. "200": {
  4843. "$ref": "#/responses/empty"
  4844. },
  4845. "405": {
  4846. "$ref": "#/responses/empty"
  4847. }
  4848. }
  4849. }
  4850. },
  4851. "/repos/{owner}/{repo}/raw/{filepath}": {
  4852. "get": {
  4853. "produces": [
  4854. "application/json"
  4855. ],
  4856. "tags": [
  4857. "repository"
  4858. ],
  4859. "summary": "Get a file from a repository",
  4860. "operationId": "repoGetRawFile",
  4861. "parameters": [
  4862. {
  4863. "type": "string",
  4864. "description": "owner of the repo",
  4865. "name": "owner",
  4866. "in": "path",
  4867. "required": true
  4868. },
  4869. {
  4870. "type": "string",
  4871. "description": "name of the repo",
  4872. "name": "repo",
  4873. "in": "path",
  4874. "required": true
  4875. },
  4876. {
  4877. "type": "string",
  4878. "description": "filepath of the file to get",
  4879. "name": "filepath",
  4880. "in": "path",
  4881. "required": true
  4882. }
  4883. ],
  4884. "responses": {
  4885. "200": {
  4886. "description": "success"
  4887. }
  4888. }
  4889. }
  4890. },
  4891. "/repos/{owner}/{repo}/releases": {
  4892. "get": {
  4893. "produces": [
  4894. "application/json"
  4895. ],
  4896. "tags": [
  4897. "repository"
  4898. ],
  4899. "summary": "List a repo's releases",
  4900. "operationId": "repoListReleases",
  4901. "parameters": [
  4902. {
  4903. "type": "string",
  4904. "description": "owner of the repo",
  4905. "name": "owner",
  4906. "in": "path",
  4907. "required": true
  4908. },
  4909. {
  4910. "type": "string",
  4911. "description": "name of the repo",
  4912. "name": "repo",
  4913. "in": "path",
  4914. "required": true
  4915. },
  4916. {
  4917. "type": "integer",
  4918. "description": "page wants to load",
  4919. "name": "page",
  4920. "in": "query"
  4921. },
  4922. {
  4923. "type": "integer",
  4924. "description": "items count every page wants to load",
  4925. "name": "per_page",
  4926. "in": "query"
  4927. }
  4928. ],
  4929. "responses": {
  4930. "200": {
  4931. "$ref": "#/responses/ReleaseList"
  4932. }
  4933. }
  4934. },
  4935. "post": {
  4936. "consumes": [
  4937. "application/json"
  4938. ],
  4939. "produces": [
  4940. "application/json"
  4941. ],
  4942. "tags": [
  4943. "repository"
  4944. ],
  4945. "summary": "Create a release",
  4946. "operationId": "repoCreateRelease",
  4947. "parameters": [
  4948. {
  4949. "type": "string",
  4950. "description": "owner of the repo",
  4951. "name": "owner",
  4952. "in": "path",
  4953. "required": true
  4954. },
  4955. {
  4956. "type": "string",
  4957. "description": "name of the repo",
  4958. "name": "repo",
  4959. "in": "path",
  4960. "required": true
  4961. },
  4962. {
  4963. "name": "body",
  4964. "in": "body",
  4965. "schema": {
  4966. "$ref": "#/definitions/CreateReleaseOption"
  4967. }
  4968. }
  4969. ],
  4970. "responses": {
  4971. "201": {
  4972. "$ref": "#/responses/Release"
  4973. }
  4974. }
  4975. }
  4976. },
  4977. "/repos/{owner}/{repo}/releases/{id}": {
  4978. "get": {
  4979. "produces": [
  4980. "application/json"
  4981. ],
  4982. "tags": [
  4983. "repository"
  4984. ],
  4985. "summary": "Get a release",
  4986. "operationId": "repoGetRelease",
  4987. "parameters": [
  4988. {
  4989. "type": "string",
  4990. "description": "owner of the repo",
  4991. "name": "owner",
  4992. "in": "path",
  4993. "required": true
  4994. },
  4995. {
  4996. "type": "string",
  4997. "description": "name of the repo",
  4998. "name": "repo",
  4999. "in": "path",
  5000. "required": true
  5001. },
  5002. {
  5003. "type": "integer",
  5004. "format": "int64",
  5005. "description": "id of the release to get",
  5006. "name": "id",
  5007. "in": "path",
  5008. "required": true
  5009. }
  5010. ],
  5011. "responses": {
  5012. "200": {
  5013. "$ref": "#/responses/Release"
  5014. }
  5015. }
  5016. },
  5017. "delete": {
  5018. "tags": [
  5019. "repository"
  5020. ],
  5021. "summary": "Delete a release",
  5022. "operationId": "repoDeleteRelease",
  5023. "parameters": [
  5024. {
  5025. "type": "string",
  5026. "description": "owner of the repo",
  5027. "name": "owner",
  5028. "in": "path",
  5029. "required": true
  5030. },
  5031. {
  5032. "type": "string",
  5033. "description": "name of the repo",
  5034. "name": "repo",
  5035. "in": "path",
  5036. "required": true
  5037. },
  5038. {
  5039. "type": "integer",
  5040. "format": "int64",
  5041. "description": "id of the release to delete",
  5042. "name": "id",
  5043. "in": "path",
  5044. "required": true
  5045. }
  5046. ],
  5047. "responses": {
  5048. "204": {
  5049. "$ref": "#/responses/empty"
  5050. }
  5051. }
  5052. },
  5053. "patch": {
  5054. "consumes": [
  5055. "application/json"
  5056. ],
  5057. "produces": [
  5058. "application/json"
  5059. ],
  5060. "tags": [
  5061. "repository"
  5062. ],
  5063. "summary": "Update a release",
  5064. "operationId": "repoEditRelease",
  5065. "parameters": [
  5066. {
  5067. "type": "string",
  5068. "description": "owner of the repo",
  5069. "name": "owner",
  5070. "in": "path",
  5071. "required": true
  5072. },
  5073. {
  5074. "type": "string",
  5075. "description": "name of the repo",
  5076. "name": "repo",
  5077. "in": "path",
  5078. "required": true
  5079. },
  5080. {
  5081. "type": "integer",
  5082. "format": "int64",
  5083. "description": "id of the release to edit",
  5084. "name": "id",
  5085. "in": "path",
  5086. "required": true
  5087. },
  5088. {
  5089. "name": "body",
  5090. "in": "body",
  5091. "schema": {
  5092. "$ref": "#/definitions/EditReleaseOption"
  5093. }
  5094. }
  5095. ],
  5096. "responses": {
  5097. "200": {
  5098. "$ref": "#/responses/Release"
  5099. }
  5100. }
  5101. }
  5102. },
  5103. "/repos/{owner}/{repo}/releases/{id}/assets": {
  5104. "get": {
  5105. "produces": [
  5106. "application/json"
  5107. ],
  5108. "tags": [
  5109. "repository"
  5110. ],
  5111. "summary": "List release's attachments",
  5112. "operationId": "repoListReleaseAttachments",
  5113. "parameters": [
  5114. {
  5115. "type": "string",
  5116. "description": "owner of the repo",
  5117. "name": "owner",
  5118. "in": "path",
  5119. "required": true
  5120. },
  5121. {
  5122. "type": "string",
  5123. "description": "name of the repo",
  5124. "name": "repo",
  5125. "in": "path",
  5126. "required": true
  5127. },
  5128. {
  5129. "type": "integer",
  5130. "format": "int64",
  5131. "description": "id of the release",
  5132. "name": "id",
  5133. "in": "path",
  5134. "required": true
  5135. }
  5136. ],
  5137. "responses": {
  5138. "200": {
  5139. "$ref": "#/responses/AttachmentList"
  5140. }
  5141. }
  5142. },
  5143. "post": {
  5144. "consumes": [
  5145. "multipart/form-data"
  5146. ],
  5147. "produces": [
  5148. "application/json"
  5149. ],
  5150. "tags": [
  5151. "repository"
  5152. ],
  5153. "summary": "Create a release attachment",
  5154. "operationId": "repoCreateReleaseAttachment",
  5155. "parameters": [
  5156. {
  5157. "type": "string",
  5158. "description": "owner of the repo",
  5159. "name": "owner",
  5160. "in": "path",
  5161. "required": true
  5162. },
  5163. {
  5164. "type": "string",
  5165. "description": "name of the repo",
  5166. "name": "repo",
  5167. "in": "path",
  5168. "required": true
  5169. },
  5170. {
  5171. "type": "integer",
  5172. "format": "int64",
  5173. "description": "id of the release",
  5174. "name": "id",
  5175. "in": "path",
  5176. "required": true
  5177. },
  5178. {
  5179. "type": "string",
  5180. "description": "name of the attachment",
  5181. "name": "name",
  5182. "in": "query"
  5183. },
  5184. {
  5185. "type": "file",
  5186. "description": "attachment to upload",
  5187. "name": "attachment",
  5188. "in": "formData",
  5189. "required": true
  5190. }
  5191. ],
  5192. "responses": {
  5193. "201": {
  5194. "$ref": "#/responses/Attachment"
  5195. }
  5196. }
  5197. }
  5198. },
  5199. "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": {
  5200. "get": {
  5201. "produces": [
  5202. "application/json"
  5203. ],
  5204. "tags": [
  5205. "repository"
  5206. ],
  5207. "summary": "Get a release attachment",
  5208. "operationId": "repoGetReleaseAttachment",
  5209. "parameters": [
  5210. {
  5211. "type": "string",
  5212. "description": "owner of the repo",
  5213. "name": "owner",
  5214. "in": "path",
  5215. "required": true
  5216. },
  5217. {
  5218. "type": "string",
  5219. "description": "name of the repo",
  5220. "name": "repo",
  5221. "in": "path",
  5222. "required": true
  5223. },
  5224. {
  5225. "type": "integer",
  5226. "format": "int64",
  5227. "description": "id of the release",
  5228. "name": "id",
  5229. "in": "path",
  5230. "required": true
  5231. },
  5232. {
  5233. "type": "integer",
  5234. "format": "int64",
  5235. "description": "id of the attachment to get",
  5236. "name": "attachment_id",
  5237. "in": "path",
  5238. "required": true
  5239. }
  5240. ],
  5241. "responses": {
  5242. "200": {
  5243. "$ref": "#/responses/Attachment"
  5244. }
  5245. }
  5246. },
  5247. "delete": {
  5248. "produces": [
  5249. "application/json"
  5250. ],
  5251. "tags": [
  5252. "repository"
  5253. ],
  5254. "summary": "Delete a release attachment",
  5255. "operationId": "repoDeleteReleaseAttachment",
  5256. "parameters": [
  5257. {
  5258. "type": "string",
  5259. "description": "owner of the repo",
  5260. "name": "owner",
  5261. "in": "path",
  5262. "required": true
  5263. },
  5264. {
  5265. "type": "string",
  5266. "description": "name of the repo",
  5267. "name": "repo",
  5268. "in": "path",
  5269. "required": true
  5270. },
  5271. {
  5272. "type": "integer",
  5273. "format": "int64",
  5274. "description": "id of the release",
  5275. "name": "id",
  5276. "in": "path",
  5277. "required": true
  5278. },
  5279. {
  5280. "type": "integer",
  5281. "format": "int64",
  5282. "description": "id of the attachment to delete",
  5283. "name": "attachment_id",
  5284. "in": "path",
  5285. "required": true
  5286. }
  5287. ],
  5288. "responses": {
  5289. "204": {
  5290. "$ref": "#/responses/empty"
  5291. }
  5292. }
  5293. },
  5294. "patch": {
  5295. "consumes": [
  5296. "application/json"
  5297. ],
  5298. "produces": [
  5299. "application/json"
  5300. ],
  5301. "tags": [
  5302. "repository"
  5303. ],
  5304. "summary": "Edit a release attachment",
  5305. "operationId": "repoEditReleaseAttachment",
  5306. "parameters": [
  5307. {
  5308. "type": "string",
  5309. "description": "owner of the repo",
  5310. "name": "owner",
  5311. "in": "path",
  5312. "required": true
  5313. },
  5314. {
  5315. "type": "string",
  5316. "description": "name of the repo",
  5317. "name": "repo",
  5318. "in": "path",
  5319. "required": true
  5320. },
  5321. {
  5322. "type": "integer",
  5323. "format": "int64",
  5324. "description": "id of the release",
  5325. "name": "id",
  5326. "in": "path",
  5327. "required": true
  5328. },
  5329. {
  5330. "type": "integer",
  5331. "format": "int64",
  5332. "description": "id of the attachment to edit",
  5333. "name": "attachment_id",
  5334. "in": "path",
  5335. "required": true
  5336. },
  5337. {
  5338. "name": "body",
  5339. "in": "body",
  5340. "schema": {
  5341. "$ref": "#/definitions/EditAttachmentOptions"
  5342. }
  5343. }
  5344. ],
  5345. "responses": {
  5346. "201": {
  5347. "$ref": "#/responses/Attachment"
  5348. }
  5349. }
  5350. }
  5351. },
  5352. "/repos/{owner}/{repo}/signing-key.gpg": {
  5353. "get": {
  5354. "produces": [
  5355. "text/plain"
  5356. ],
  5357. "tags": [
  5358. "repository"
  5359. ],
  5360. "summary": "Get signing-key.gpg for given repository",
  5361. "operationId": "repoSigningKey",
  5362. "parameters": [
  5363. {
  5364. "type": "string",
  5365. "description": "owner of the repo",
  5366. "name": "owner",
  5367. "in": "path",
  5368. "required": true
  5369. },
  5370. {
  5371. "type": "string",
  5372. "description": "name of the repo",
  5373. "name": "repo",
  5374. "in": "path",
  5375. "required": true
  5376. }
  5377. ],
  5378. "responses": {
  5379. "200": {
  5380. "description": "GPG armored public key",
  5381. "schema": {
  5382. "type": "string"
  5383. }
  5384. }
  5385. }
  5386. }
  5387. },
  5388. "/repos/{owner}/{repo}/stargazers": {
  5389. "get": {
  5390. "produces": [
  5391. "application/json"
  5392. ],
  5393. "tags": [
  5394. "repository"
  5395. ],
  5396. "summary": "List a repo's stargazers",
  5397. "operationId": "repoListStargazers",
  5398. "parameters": [
  5399. {
  5400. "type": "string",
  5401. "description": "owner of the repo",
  5402. "name": "owner",
  5403. "in": "path",
  5404. "required": true
  5405. },
  5406. {
  5407. "type": "string",
  5408. "description": "name of the repo",
  5409. "name": "repo",
  5410. "in": "path",
  5411. "required": true
  5412. }
  5413. ],
  5414. "responses": {
  5415. "200": {
  5416. "$ref": "#/responses/UserList"
  5417. }
  5418. }
  5419. }
  5420. },
  5421. "/repos/{owner}/{repo}/statuses/{sha}": {
  5422. "get": {
  5423. "produces": [
  5424. "application/json"
  5425. ],
  5426. "tags": [
  5427. "repository"
  5428. ],
  5429. "summary": "Get a commit's statuses",
  5430. "operationId": "repoListStatuses",
  5431. "parameters": [
  5432. {
  5433. "type": "string",
  5434. "description": "owner of the repo",
  5435. "name": "owner",
  5436. "in": "path",
  5437. "required": true
  5438. },
  5439. {
  5440. "type": "string",
  5441. "description": "name of the repo",
  5442. "name": "repo",
  5443. "in": "path",
  5444. "required": true
  5445. },
  5446. {
  5447. "type": "string",
  5448. "description": "sha of the commit",
  5449. "name": "sha",
  5450. "in": "path",
  5451. "required": true
  5452. },
  5453. {
  5454. "type": "integer",
  5455. "description": "page number of results",
  5456. "name": "page",
  5457. "in": "query"
  5458. },
  5459. {
  5460. "enum": [
  5461. "oldest",
  5462. "recentupdate",
  5463. "leastupdate",
  5464. "leastindex",
  5465. "highestindex"
  5466. ],
  5467. "type": "string",
  5468. "description": "type of sort",
  5469. "name": "sort",
  5470. "in": "query"
  5471. },
  5472. {
  5473. "enum": [
  5474. "pending",
  5475. "success",
  5476. "error",
  5477. "failure",
  5478. "warning"
  5479. ],
  5480. "type": "string",
  5481. "description": "type of state",
  5482. "name": "state",
  5483. "in": "query"
  5484. }
  5485. ],
  5486. "responses": {
  5487. "200": {
  5488. "$ref": "#/responses/StatusList"
  5489. }
  5490. }
  5491. },
  5492. "post": {
  5493. "produces": [
  5494. "application/json"
  5495. ],
  5496. "tags": [
  5497. "repository"
  5498. ],
  5499. "summary": "Create a commit status",
  5500. "operationId": "repoCreateStatus",
  5501. "parameters": [
  5502. {
  5503. "type": "string",
  5504. "description": "owner of the repo",
  5505. "name": "owner",
  5506. "in": "path",
  5507. "required": true
  5508. },
  5509. {
  5510. "type": "string",
  5511. "description": "name of the repo",
  5512. "name": "repo",
  5513. "in": "path",
  5514. "required": true
  5515. },
  5516. {
  5517. "type": "string",
  5518. "description": "sha of the commit",
  5519. "name": "sha",
  5520. "in": "path",
  5521. "required": true
  5522. },
  5523. {
  5524. "name": "body",
  5525. "in": "body",
  5526. "schema": {
  5527. "$ref": "#/definitions/CreateStatusOption"
  5528. }
  5529. }
  5530. ],
  5531. "responses": {
  5532. "200": {
  5533. "$ref": "#/responses/StatusList"
  5534. }
  5535. }
  5536. }
  5537. },
  5538. "/repos/{owner}/{repo}/subscribers": {
  5539. "get": {
  5540. "produces": [
  5541. "application/json"
  5542. ],
  5543. "tags": [
  5544. "repository"
  5545. ],
  5546. "summary": "List a repo's watchers",
  5547. "operationId": "repoListSubscribers",
  5548. "parameters": [
  5549. {
  5550. "type": "string",
  5551. "description": "owner of the repo",
  5552. "name": "owner",
  5553. "in": "path",
  5554. "required": true
  5555. },
  5556. {
  5557. "type": "string",
  5558. "description": "name of the repo",
  5559. "name": "repo",
  5560. "in": "path",
  5561. "required": true
  5562. }
  5563. ],
  5564. "responses": {
  5565. "200": {
  5566. "$ref": "#/responses/UserList"
  5567. }
  5568. }
  5569. }
  5570. },
  5571. "/repos/{owner}/{repo}/subscription": {
  5572. "get": {
  5573. "tags": [
  5574. "repository"
  5575. ],
  5576. "summary": "Check if the current user is watching a repo",
  5577. "operationId": "userCurrentCheckSubscription",
  5578. "parameters": [
  5579. {
  5580. "type": "string",
  5581. "description": "owner of the repo",
  5582. "name": "owner",
  5583. "in": "path",
  5584. "required": true
  5585. },
  5586. {
  5587. "type": "string",
  5588. "description": "name of the repo",
  5589. "name": "repo",
  5590. "in": "path",
  5591. "required": true
  5592. }
  5593. ],
  5594. "responses": {
  5595. "200": {
  5596. "$ref": "#/responses/WatchInfo"
  5597. }
  5598. }
  5599. },
  5600. "put": {
  5601. "tags": [
  5602. "repository"
  5603. ],
  5604. "summary": "Watch a repo",
  5605. "operationId": "userCurrentPutSubscription",
  5606. "parameters": [
  5607. {
  5608. "type": "string",
  5609. "description": "owner of the repo",
  5610. "name": "owner",
  5611. "in": "path",
  5612. "required": true
  5613. },
  5614. {
  5615. "type": "string",
  5616. "description": "name of the repo",
  5617. "name": "repo",
  5618. "in": "path",
  5619. "required": true
  5620. }
  5621. ],
  5622. "responses": {
  5623. "200": {
  5624. "$ref": "#/responses/WatchInfo"
  5625. }
  5626. }
  5627. },
  5628. "delete": {
  5629. "tags": [
  5630. "repository"
  5631. ],
  5632. "summary": "Unwatch a repo",
  5633. "operationId": "userCurrentDeleteSubscription",
  5634. "parameters": [
  5635. {
  5636. "type": "string",
  5637. "description": "owner of the repo",
  5638. "name": "owner",
  5639. "in": "path",
  5640. "required": true
  5641. },
  5642. {
  5643. "type": "string",
  5644. "description": "name of the repo",
  5645. "name": "repo",
  5646. "in": "path",
  5647. "required": true
  5648. }
  5649. ],
  5650. "responses": {
  5651. "204": {
  5652. "$ref": "#/responses/empty"
  5653. }
  5654. }
  5655. }
  5656. },
  5657. "/repos/{owner}/{repo}/tags": {
  5658. "get": {
  5659. "produces": [
  5660. "application/json"
  5661. ],
  5662. "tags": [
  5663. "repository"
  5664. ],
  5665. "summary": "List a repository's tags",
  5666. "operationId": "repoListTags",
  5667. "parameters": [
  5668. {
  5669. "type": "string",
  5670. "description": "owner of the repo",
  5671. "name": "owner",
  5672. "in": "path",
  5673. "required": true
  5674. },
  5675. {
  5676. "type": "string",
  5677. "description": "name of the repo",
  5678. "name": "repo",
  5679. "in": "path",
  5680. "required": true
  5681. }
  5682. ],
  5683. "responses": {
  5684. "200": {
  5685. "$ref": "#/responses/TagList"
  5686. }
  5687. }
  5688. }
  5689. },
  5690. "/repos/{owner}/{repo}/times": {
  5691. "get": {
  5692. "produces": [
  5693. "application/json"
  5694. ],
  5695. "tags": [
  5696. "repository"
  5697. ],
  5698. "summary": "List a repo's tracked times",
  5699. "operationId": "repoTrackedTimes",
  5700. "parameters": [
  5701. {
  5702. "type": "string",
  5703. "description": "owner of the repo",
  5704. "name": "owner",
  5705. "in": "path",
  5706. "required": true
  5707. },
  5708. {
  5709. "type": "string",
  5710. "description": "name of the repo",
  5711. "name": "repo",
  5712. "in": "path",
  5713. "required": true
  5714. }
  5715. ],
  5716. "responses": {
  5717. "200": {
  5718. "$ref": "#/responses/TrackedTimeList"
  5719. }
  5720. }
  5721. }
  5722. },
  5723. "/repos/{owner}/{repo}/times/{user}": {
  5724. "get": {
  5725. "produces": [
  5726. "application/json"
  5727. ],
  5728. "tags": [
  5729. "user"
  5730. ],
  5731. "summary": "List a user's tracked times in a repo",
  5732. "operationId": "userTrackedTimes",
  5733. "parameters": [
  5734. {
  5735. "type": "string",
  5736. "description": "owner of the repo",
  5737. "name": "owner",
  5738. "in": "path",
  5739. "required": true
  5740. },
  5741. {
  5742. "type": "string",
  5743. "description": "name of the repo",
  5744. "name": "repo",
  5745. "in": "path",
  5746. "required": true
  5747. },
  5748. {
  5749. "type": "string",
  5750. "description": "username of user",
  5751. "name": "user",
  5752. "in": "path",
  5753. "required": true
  5754. }
  5755. ],
  5756. "responses": {
  5757. "200": {
  5758. "$ref": "#/responses/TrackedTimeList"
  5759. }
  5760. }
  5761. }
  5762. },
  5763. "/repos/{owner}/{repo}/topics": {
  5764. "get": {
  5765. "produces": [
  5766. "application/json"
  5767. ],
  5768. "tags": [
  5769. "repository"
  5770. ],
  5771. "summary": "Get list of topics that a repository has",
  5772. "operationId": "repoListTopics",
  5773. "parameters": [
  5774. {
  5775. "type": "string",
  5776. "description": "owner of the repo",
  5777. "name": "owner",
  5778. "in": "path",
  5779. "required": true
  5780. },
  5781. {
  5782. "type": "string",
  5783. "description": "name of the repo",
  5784. "name": "repo",
  5785. "in": "path",
  5786. "required": true
  5787. }
  5788. ],
  5789. "responses": {
  5790. "200": {
  5791. "$ref": "#/responses/TopicNames"
  5792. }
  5793. }
  5794. },
  5795. "put": {
  5796. "produces": [
  5797. "application/json"
  5798. ],
  5799. "tags": [
  5800. "repository"
  5801. ],
  5802. "summary": "Replace list of topics for a repository",
  5803. "operationId": "repoUpdateTopics",
  5804. "parameters": [
  5805. {
  5806. "type": "string",
  5807. "description": "owner of the repo",
  5808. "name": "owner",
  5809. "in": "path",
  5810. "required": true
  5811. },
  5812. {
  5813. "type": "string",
  5814. "description": "name of the repo",
  5815. "name": "repo",
  5816. "in": "path",
  5817. "required": true
  5818. },
  5819. {
  5820. "name": "body",
  5821. "in": "body",
  5822. "schema": {
  5823. "$ref": "#/definitions/RepoTopicOptions"
  5824. }
  5825. }
  5826. ],
  5827. "responses": {
  5828. "204": {
  5829. "$ref": "#/responses/empty"
  5830. }
  5831. }
  5832. }
  5833. },
  5834. "/repos/{owner}/{repo}/topics/{topic}": {
  5835. "put": {
  5836. "produces": [
  5837. "application/json"
  5838. ],
  5839. "tags": [
  5840. "repository"
  5841. ],
  5842. "summary": "Add a topic to a repository",
  5843. "operationId": "repoAddTopíc",
  5844. "parameters": [
  5845. {
  5846. "type": "string",
  5847. "description": "owner of the repo",
  5848. "name": "owner",
  5849. "in": "path",
  5850. "required": true
  5851. },
  5852. {
  5853. "type": "string",
  5854. "description": "name of the repo",
  5855. "name": "repo",
  5856. "in": "path",
  5857. "required": true
  5858. },
  5859. {
  5860. "type": "string",
  5861. "description": "name of the topic to add",
  5862. "name": "topic",
  5863. "in": "path",
  5864. "required": true
  5865. }
  5866. ],
  5867. "responses": {
  5868. "204": {
  5869. "$ref": "#/responses/empty"
  5870. }
  5871. }
  5872. },
  5873. "delete": {
  5874. "produces": [
  5875. "application/json"
  5876. ],
  5877. "tags": [
  5878. "repository"
  5879. ],
  5880. "summary": "Delete a topic from a repository",
  5881. "operationId": "repoDeleteTopic",
  5882. "parameters": [
  5883. {
  5884. "type": "string",
  5885. "description": "owner of the repo",
  5886. "name": "owner",
  5887. "in": "path",
  5888. "required": true
  5889. },
  5890. {
  5891. "type": "string",
  5892. "description": "name of the repo",
  5893. "name": "repo",
  5894. "in": "path",
  5895. "required": true
  5896. },
  5897. {
  5898. "type": "string",
  5899. "description": "name of the topic to delete",
  5900. "name": "topic",
  5901. "in": "path",
  5902. "required": true
  5903. }
  5904. ],
  5905. "responses": {
  5906. "204": {
  5907. "$ref": "#/responses/empty"
  5908. }
  5909. }
  5910. }
  5911. },
  5912. "/repositories/{id}": {
  5913. "get": {
  5914. "produces": [
  5915. "application/json"
  5916. ],
  5917. "tags": [
  5918. "repository"
  5919. ],
  5920. "summary": "Get a repository by id",
  5921. "operationId": "repoGetByID",
  5922. "parameters": [
  5923. {
  5924. "type": "integer",
  5925. "format": "int64",
  5926. "description": "id of the repo to get",
  5927. "name": "id",
  5928. "in": "path",
  5929. "required": true
  5930. }
  5931. ],
  5932. "responses": {
  5933. "200": {
  5934. "$ref": "#/responses/Repository"
  5935. }
  5936. }
  5937. }
  5938. },
  5939. "/signing-key.gpg": {
  5940. "get": {
  5941. "produces": [
  5942. "text/plain"
  5943. ],
  5944. "tags": [
  5945. "miscellaneous"
  5946. ],
  5947. "summary": "Get default signing-key.gpg",
  5948. "operationId": "getSigningKey",
  5949. "responses": {
  5950. "200": {
  5951. "description": "GPG armored public key",
  5952. "schema": {
  5953. "type": "string"
  5954. }
  5955. }
  5956. }
  5957. }
  5958. },
  5959. "/teams/{id}": {
  5960. "get": {
  5961. "produces": [
  5962. "application/json"
  5963. ],
  5964. "tags": [
  5965. "organization"
  5966. ],
  5967. "summary": "Get a team",
  5968. "operationId": "orgGetTeam",
  5969. "parameters": [
  5970. {
  5971. "type": "integer",
  5972. "format": "int64",
  5973. "description": "id of the team to get",
  5974. "name": "id",
  5975. "in": "path",
  5976. "required": true
  5977. }
  5978. ],
  5979. "responses": {
  5980. "200": {
  5981. "$ref": "#/responses/Team"
  5982. }
  5983. }
  5984. },
  5985. "delete": {
  5986. "tags": [
  5987. "organization"
  5988. ],
  5989. "summary": "Delete a team",
  5990. "operationId": "orgDeleteTeam",
  5991. "parameters": [
  5992. {
  5993. "type": "integer",
  5994. "format": "int64",
  5995. "description": "id of the team to delete",
  5996. "name": "id",
  5997. "in": "path",
  5998. "required": true
  5999. }
  6000. ],
  6001. "responses": {
  6002. "204": {
  6003. "description": "team deleted"
  6004. }
  6005. }
  6006. },
  6007. "patch": {
  6008. "consumes": [
  6009. "application/json"
  6010. ],
  6011. "produces": [
  6012. "application/json"
  6013. ],
  6014. "tags": [
  6015. "organization"
  6016. ],
  6017. "summary": "Edit a team",
  6018. "operationId": "orgEditTeam",
  6019. "parameters": [
  6020. {
  6021. "type": "integer",
  6022. "description": "id of the team to edit",
  6023. "name": "id",
  6024. "in": "path",
  6025. "required": true
  6026. },
  6027. {
  6028. "name": "body",
  6029. "in": "body",
  6030. "schema": {
  6031. "$ref": "#/definitions/EditTeamOption"
  6032. }
  6033. }
  6034. ],
  6035. "responses": {
  6036. "200": {
  6037. "$ref": "#/responses/Team"
  6038. }
  6039. }
  6040. }
  6041. },
  6042. "/teams/{id}/members": {
  6043. "get": {
  6044. "produces": [
  6045. "application/json"
  6046. ],
  6047. "tags": [
  6048. "organization"
  6049. ],
  6050. "summary": "List a team's members",
  6051. "operationId": "orgListTeamMembers",
  6052. "parameters": [
  6053. {
  6054. "type": "integer",
  6055. "format": "int64",
  6056. "description": "id of the team",
  6057. "name": "id",
  6058. "in": "path",
  6059. "required": true
  6060. }
  6061. ],
  6062. "responses": {
  6063. "200": {
  6064. "$ref": "#/responses/UserList"
  6065. }
  6066. }
  6067. }
  6068. },
  6069. "/teams/{id}/members/{username}": {
  6070. "get": {
  6071. "produces": [
  6072. "application/json"
  6073. ],
  6074. "tags": [
  6075. "organization"
  6076. ],
  6077. "summary": "List a particular member of team",
  6078. "operationId": "orgListTeamMember",
  6079. "parameters": [
  6080. {
  6081. "type": "integer",
  6082. "format": "int64",
  6083. "description": "id of the team",
  6084. "name": "id",
  6085. "in": "path",
  6086. "required": true
  6087. },
  6088. {
  6089. "type": "string",
  6090. "description": "username of the member to list",
  6091. "name": "username",
  6092. "in": "path",
  6093. "required": true
  6094. }
  6095. ],
  6096. "responses": {
  6097. "200": {
  6098. "$ref": "#/responses/User"
  6099. }
  6100. }
  6101. },
  6102. "put": {
  6103. "produces": [
  6104. "application/json"
  6105. ],
  6106. "tags": [
  6107. "organization"
  6108. ],
  6109. "summary": "Add a team member",
  6110. "operationId": "orgAddTeamMember",
  6111. "parameters": [
  6112. {
  6113. "type": "integer",
  6114. "format": "int64",
  6115. "description": "id of the team",
  6116. "name": "id",
  6117. "in": "path",
  6118. "required": true
  6119. },
  6120. {
  6121. "type": "string",
  6122. "description": "username of the user to add",
  6123. "name": "username",
  6124. "in": "path",
  6125. "required": true
  6126. }
  6127. ],
  6128. "responses": {
  6129. "204": {
  6130. "$ref": "#/responses/empty"
  6131. }
  6132. }
  6133. },
  6134. "delete": {
  6135. "produces": [
  6136. "application/json"
  6137. ],
  6138. "tags": [
  6139. "organization"
  6140. ],
  6141. "summary": "Remove a team member",
  6142. "operationId": "orgRemoveTeamMember",
  6143. "parameters": [
  6144. {
  6145. "type": "integer",
  6146. "format": "int64",
  6147. "description": "id of the team",
  6148. "name": "id",
  6149. "in": "path",
  6150. "required": true
  6151. },
  6152. {
  6153. "type": "string",
  6154. "description": "username of the user to remove",
  6155. "name": "username",
  6156. "in": "path",
  6157. "required": true
  6158. }
  6159. ],
  6160. "responses": {
  6161. "204": {
  6162. "$ref": "#/responses/empty"
  6163. }
  6164. }
  6165. }
  6166. },
  6167. "/teams/{id}/repos": {
  6168. "get": {
  6169. "produces": [
  6170. "application/json"
  6171. ],
  6172. "tags": [
  6173. "organization"
  6174. ],
  6175. "summary": "List a team's repos",
  6176. "operationId": "orgListTeamRepos",
  6177. "parameters": [
  6178. {
  6179. "type": "integer",
  6180. "format": "int64",
  6181. "description": "id of the team",
  6182. "name": "id",
  6183. "in": "path",
  6184. "required": true
  6185. }
  6186. ],
  6187. "responses": {
  6188. "200": {
  6189. "$ref": "#/responses/RepositoryList"
  6190. }
  6191. }
  6192. }
  6193. },
  6194. "/teams/{id}/repos/{org}/{repo}": {
  6195. "put": {
  6196. "produces": [
  6197. "application/json"
  6198. ],
  6199. "tags": [
  6200. "organization"
  6201. ],
  6202. "summary": "Add a repository to a team",
  6203. "operationId": "orgAddTeamRepository",
  6204. "parameters": [
  6205. {
  6206. "type": "integer",
  6207. "format": "int64",
  6208. "description": "id of the team",
  6209. "name": "id",
  6210. "in": "path",
  6211. "required": true
  6212. },
  6213. {
  6214. "type": "string",
  6215. "description": "organization that owns the repo to add",
  6216. "name": "org",
  6217. "in": "path",
  6218. "required": true
  6219. },
  6220. {
  6221. "type": "string",
  6222. "description": "name of the repo to add",
  6223. "name": "repo",
  6224. "in": "path",
  6225. "required": true
  6226. }
  6227. ],
  6228. "responses": {
  6229. "204": {
  6230. "$ref": "#/responses/empty"
  6231. }
  6232. }
  6233. },
  6234. "delete": {
  6235. "description": "This does not delete the repository, it only removes the repository from the team.",
  6236. "produces": [
  6237. "application/json"
  6238. ],
  6239. "tags": [
  6240. "organization"
  6241. ],
  6242. "summary": "Remove a repository from a team",
  6243. "operationId": "orgRemoveTeamRepository",
  6244. "parameters": [
  6245. {
  6246. "type": "integer",
  6247. "format": "int64",
  6248. "description": "id of the team",
  6249. "name": "id",
  6250. "in": "path",
  6251. "required": true
  6252. },
  6253. {
  6254. "type": "string",
  6255. "description": "organization that owns the repo to remove",
  6256. "name": "org",
  6257. "in": "path",
  6258. "required": true
  6259. },
  6260. {
  6261. "type": "string",
  6262. "description": "name of the repo to remove",
  6263. "name": "repo",
  6264. "in": "path",
  6265. "required": true
  6266. }
  6267. ],
  6268. "responses": {
  6269. "204": {
  6270. "$ref": "#/responses/empty"
  6271. }
  6272. }
  6273. }
  6274. },
  6275. "/topics/search": {
  6276. "get": {
  6277. "produces": [
  6278. "application/json"
  6279. ],
  6280. "tags": [
  6281. "repository"
  6282. ],
  6283. "summary": "search topics via keyword",
  6284. "operationId": "topicSearch",
  6285. "parameters": [
  6286. {
  6287. "type": "string",
  6288. "description": "keywords to search",
  6289. "name": "q",
  6290. "in": "query",
  6291. "required": true
  6292. }
  6293. ],
  6294. "responses": {
  6295. "200": {
  6296. "$ref": "#/responses/TopicListResponse"
  6297. }
  6298. }
  6299. }
  6300. },
  6301. "/user": {
  6302. "get": {
  6303. "produces": [
  6304. "application/json"
  6305. ],
  6306. "tags": [
  6307. "user"
  6308. ],
  6309. "summary": "Get the authenticated user",
  6310. "operationId": "userGetCurrent",
  6311. "responses": {
  6312. "200": {
  6313. "$ref": "#/responses/User"
  6314. }
  6315. }
  6316. }
  6317. },
  6318. "/user/emails": {
  6319. "get": {
  6320. "produces": [
  6321. "application/json"
  6322. ],
  6323. "tags": [
  6324. "user"
  6325. ],
  6326. "summary": "List the authenticated user's email addresses",
  6327. "operationId": "userListEmails",
  6328. "responses": {
  6329. "200": {
  6330. "$ref": "#/responses/EmailList"
  6331. }
  6332. }
  6333. },
  6334. "post": {
  6335. "produces": [
  6336. "application/json"
  6337. ],
  6338. "tags": [
  6339. "user"
  6340. ],
  6341. "summary": "Add email addresses",
  6342. "operationId": "userAddEmail",
  6343. "parameters": [
  6344. {
  6345. "name": "body",
  6346. "in": "body",
  6347. "schema": {
  6348. "$ref": "#/definitions/CreateEmailOption"
  6349. }
  6350. }
  6351. ],
  6352. "responses": {
  6353. "201": {
  6354. "$ref": "#/responses/EmailList"
  6355. }
  6356. }
  6357. },
  6358. "delete": {
  6359. "produces": [
  6360. "application/json"
  6361. ],
  6362. "tags": [
  6363. "user"
  6364. ],
  6365. "summary": "Delete email addresses",
  6366. "operationId": "userDeleteEmail",
  6367. "parameters": [
  6368. {
  6369. "name": "body",
  6370. "in": "body",
  6371. "schema": {
  6372. "$ref": "#/definitions/DeleteEmailOption"
  6373. }
  6374. }
  6375. ],
  6376. "responses": {
  6377. "204": {
  6378. "$ref": "#/responses/empty"
  6379. }
  6380. }
  6381. }
  6382. },
  6383. "/user/followers": {
  6384. "get": {
  6385. "produces": [
  6386. "application/json"
  6387. ],
  6388. "tags": [
  6389. "user"
  6390. ],
  6391. "summary": "List the authenticated user's followers",
  6392. "operationId": "userCurrentListFollowers",
  6393. "responses": {
  6394. "200": {
  6395. "$ref": "#/responses/UserList"
  6396. }
  6397. }
  6398. }
  6399. },
  6400. "/user/following": {
  6401. "get": {
  6402. "produces": [
  6403. "application/json"
  6404. ],
  6405. "tags": [
  6406. "user"
  6407. ],
  6408. "summary": "List the users that the authenticated user is following",
  6409. "operationId": "userCurrentListFollowing",
  6410. "responses": {
  6411. "200": {
  6412. "$ref": "#/responses/UserList"
  6413. }
  6414. }
  6415. }
  6416. },
  6417. "/user/following/{username}": {
  6418. "get": {
  6419. "tags": [
  6420. "user"
  6421. ],
  6422. "summary": "Check whether a user is followed by the authenticated user",
  6423. "operationId": "userCurrentCheckFollowing",
  6424. "parameters": [
  6425. {
  6426. "type": "string",
  6427. "description": "username of followed user",
  6428. "name": "username",
  6429. "in": "path",
  6430. "required": true
  6431. }
  6432. ],
  6433. "responses": {
  6434. "204": {
  6435. "$ref": "#/responses/empty"
  6436. },
  6437. "404": {
  6438. "$ref": "#/responses/notFound"
  6439. }
  6440. }
  6441. },
  6442. "put": {
  6443. "tags": [
  6444. "user"
  6445. ],
  6446. "summary": "Follow a user",
  6447. "operationId": "userCurrentPutFollow",
  6448. "parameters": [
  6449. {
  6450. "type": "string",
  6451. "description": "username of user to follow",
  6452. "name": "username",
  6453. "in": "path",
  6454. "required": true
  6455. }
  6456. ],
  6457. "responses": {
  6458. "204": {
  6459. "$ref": "#/responses/empty"
  6460. }
  6461. }
  6462. },
  6463. "delete": {
  6464. "tags": [
  6465. "user"
  6466. ],
  6467. "summary": "Unfollow a user",
  6468. "operationId": "userCurrentDeleteFollow",
  6469. "parameters": [
  6470. {
  6471. "type": "string",
  6472. "description": "username of user to unfollow",
  6473. "name": "username",
  6474. "in": "path",
  6475. "required": true
  6476. }
  6477. ],
  6478. "responses": {
  6479. "204": {
  6480. "$ref": "#/responses/empty"
  6481. }
  6482. }
  6483. }
  6484. },
  6485. "/user/gpg_keys": {
  6486. "get": {
  6487. "produces": [
  6488. "application/json"
  6489. ],
  6490. "tags": [
  6491. "user"
  6492. ],
  6493. "summary": "List the authenticated user's GPG keys",
  6494. "operationId": "userCurrentListGPGKeys",
  6495. "responses": {
  6496. "200": {
  6497. "$ref": "#/responses/GPGKeyList"
  6498. }
  6499. }
  6500. },
  6501. "post": {
  6502. "consumes": [
  6503. "application/json"
  6504. ],
  6505. "produces": [
  6506. "application/json"
  6507. ],
  6508. "tags": [
  6509. "user"
  6510. ],
  6511. "summary": "Create a GPG key",
  6512. "operationId": "userCurrentPostGPGKey",
  6513. "parameters": [
  6514. {
  6515. "name": "Form",
  6516. "in": "body",
  6517. "schema": {
  6518. "$ref": "#/definitions/CreateGPGKeyOption"
  6519. }
  6520. }
  6521. ],
  6522. "responses": {
  6523. "201": {
  6524. "$ref": "#/responses/GPGKey"
  6525. },
  6526. "422": {
  6527. "$ref": "#/responses/validationError"
  6528. }
  6529. }
  6530. }
  6531. },
  6532. "/user/gpg_keys/{id}": {
  6533. "get": {
  6534. "produces": [
  6535. "application/json"
  6536. ],
  6537. "tags": [
  6538. "user"
  6539. ],
  6540. "summary": "Get a GPG key",
  6541. "operationId": "userCurrentGetGPGKey",
  6542. "parameters": [
  6543. {
  6544. "type": "integer",
  6545. "format": "int64",
  6546. "description": "id of key to get",
  6547. "name": "id",
  6548. "in": "path",
  6549. "required": true
  6550. }
  6551. ],
  6552. "responses": {
  6553. "200": {
  6554. "$ref": "#/responses/GPGKey"
  6555. },
  6556. "404": {
  6557. "$ref": "#/responses/notFound"
  6558. }
  6559. }
  6560. },
  6561. "delete": {
  6562. "produces": [
  6563. "application/json"
  6564. ],
  6565. "tags": [
  6566. "user"
  6567. ],
  6568. "summary": "Remove a GPG key",
  6569. "operationId": "userCurrentDeleteGPGKey",
  6570. "parameters": [
  6571. {
  6572. "type": "integer",
  6573. "format": "int64",
  6574. "description": "id of key to delete",
  6575. "name": "id",
  6576. "in": "path",
  6577. "required": true
  6578. }
  6579. ],
  6580. "responses": {
  6581. "204": {
  6582. "$ref": "#/responses/empty"
  6583. },
  6584. "403": {
  6585. "$ref": "#/responses/forbidden"
  6586. }
  6587. }
  6588. }
  6589. },
  6590. "/user/keys": {
  6591. "get": {
  6592. "produces": [
  6593. "application/json"
  6594. ],
  6595. "tags": [
  6596. "user"
  6597. ],
  6598. "summary": "List the authenticated user's public keys",
  6599. "operationId": "userCurrentListKeys",
  6600. "parameters": [
  6601. {
  6602. "type": "string",
  6603. "description": "fingerprint of the key",
  6604. "name": "fingerprint",
  6605. "in": "query"
  6606. }
  6607. ],
  6608. "responses": {
  6609. "200": {
  6610. "$ref": "#/responses/PublicKeyList"
  6611. }
  6612. }
  6613. },
  6614. "post": {
  6615. "consumes": [
  6616. "application/json"
  6617. ],
  6618. "produces": [
  6619. "application/json"
  6620. ],
  6621. "tags": [
  6622. "user"
  6623. ],
  6624. "summary": "Create a public key",
  6625. "operationId": "userCurrentPostKey",
  6626. "parameters": [
  6627. {
  6628. "name": "body",
  6629. "in": "body",
  6630. "schema": {
  6631. "$ref": "#/definitions/CreateKeyOption"
  6632. }
  6633. }
  6634. ],
  6635. "responses": {
  6636. "201": {
  6637. "$ref": "#/responses/PublicKey"
  6638. },
  6639. "422": {
  6640. "$ref": "#/responses/validationError"
  6641. }
  6642. }
  6643. }
  6644. },
  6645. "/user/keys/{id}": {
  6646. "get": {
  6647. "produces": [
  6648. "application/json"
  6649. ],
  6650. "tags": [
  6651. "user"
  6652. ],
  6653. "summary": "Get a public key",
  6654. "operationId": "userCurrentGetKey",
  6655. "parameters": [
  6656. {
  6657. "type": "integer",
  6658. "format": "int64",
  6659. "description": "id of key to get",
  6660. "name": "id",
  6661. "in": "path",
  6662. "required": true
  6663. }
  6664. ],
  6665. "responses": {
  6666. "200": {
  6667. "$ref": "#/responses/PublicKey"
  6668. },
  6669. "404": {
  6670. "$ref": "#/responses/notFound"
  6671. }
  6672. }
  6673. },
  6674. "delete": {
  6675. "produces": [
  6676. "application/json"
  6677. ],
  6678. "tags": [
  6679. "user"
  6680. ],
  6681. "summary": "Delete a public key",
  6682. "operationId": "userCurrentDeleteKey",
  6683. "parameters": [
  6684. {
  6685. "type": "integer",
  6686. "format": "int64",
  6687. "description": "id of key to delete",
  6688. "name": "id",
  6689. "in": "path",
  6690. "required": true
  6691. }
  6692. ],
  6693. "responses": {
  6694. "204": {
  6695. "$ref": "#/responses/empty"
  6696. },
  6697. "403": {
  6698. "$ref": "#/responses/forbidden"
  6699. },
  6700. "404": {
  6701. "$ref": "#/responses/notFound"
  6702. }
  6703. }
  6704. }
  6705. },
  6706. "/user/orgs": {
  6707. "get": {
  6708. "produces": [
  6709. "application/json"
  6710. ],
  6711. "tags": [
  6712. "organization"
  6713. ],
  6714. "summary": "List the current user's organizations",
  6715. "operationId": "orgListCurrentUserOrgs",
  6716. "responses": {
  6717. "200": {
  6718. "$ref": "#/responses/OrganizationList"
  6719. }
  6720. }
  6721. }
  6722. },
  6723. "/user/repos": {
  6724. "get": {
  6725. "produces": [
  6726. "application/json"
  6727. ],
  6728. "tags": [
  6729. "user"
  6730. ],
  6731. "summary": "List the repos that the authenticated user owns or has access to",
  6732. "operationId": "userCurrentListRepos",
  6733. "responses": {
  6734. "200": {
  6735. "$ref": "#/responses/RepositoryList"
  6736. }
  6737. }
  6738. },
  6739. "post": {
  6740. "consumes": [
  6741. "application/json"
  6742. ],
  6743. "produces": [
  6744. "application/json"
  6745. ],
  6746. "tags": [
  6747. "repository",
  6748. "user"
  6749. ],
  6750. "summary": "Create a repository",
  6751. "operationId": "createCurrentUserRepo",
  6752. "parameters": [
  6753. {
  6754. "name": "body",
  6755. "in": "body",
  6756. "schema": {
  6757. "$ref": "#/definitions/CreateRepoOption"
  6758. }
  6759. }
  6760. ],
  6761. "responses": {
  6762. "201": {
  6763. "$ref": "#/responses/Repository"
  6764. },
  6765. "409": {
  6766. "description": "The repository with the same name already exists."
  6767. },
  6768. "422": {
  6769. "$ref": "#/responses/validationError"
  6770. }
  6771. }
  6772. }
  6773. },
  6774. "/user/starred": {
  6775. "get": {
  6776. "produces": [
  6777. "application/json"
  6778. ],
  6779. "tags": [
  6780. "user"
  6781. ],
  6782. "summary": "The repos that the authenticated user has starred",
  6783. "operationId": "userCurrentListStarred",
  6784. "responses": {
  6785. "200": {
  6786. "$ref": "#/responses/RepositoryList"
  6787. }
  6788. }
  6789. }
  6790. },
  6791. "/user/starred/{owner}/{repo}": {
  6792. "get": {
  6793. "tags": [
  6794. "user"
  6795. ],
  6796. "summary": "Whether the authenticated is starring the repo",
  6797. "operationId": "userCurrentCheckStarring",
  6798. "parameters": [
  6799. {
  6800. "type": "string",
  6801. "description": "owner of the repo",
  6802. "name": "owner",
  6803. "in": "path",
  6804. "required": true
  6805. },
  6806. {
  6807. "type": "string",
  6808. "description": "name of the repo",
  6809. "name": "repo",
  6810. "in": "path",
  6811. "required": true
  6812. }
  6813. ],
  6814. "responses": {
  6815. "204": {
  6816. "$ref": "#/responses/empty"
  6817. },
  6818. "404": {
  6819. "$ref": "#/responses/notFound"
  6820. }
  6821. }
  6822. },
  6823. "put": {
  6824. "tags": [
  6825. "user"
  6826. ],
  6827. "summary": "Star the given repo",
  6828. "operationId": "userCurrentPutStar",
  6829. "parameters": [
  6830. {
  6831. "type": "string",
  6832. "description": "owner of the repo to star",
  6833. "name": "owner",
  6834. "in": "path",
  6835. "required": true
  6836. },
  6837. {
  6838. "type": "string",
  6839. "description": "name of the repo to star",
  6840. "name": "repo",
  6841. "in": "path",
  6842. "required": true
  6843. }
  6844. ],
  6845. "responses": {
  6846. "204": {
  6847. "$ref": "#/responses/empty"
  6848. }
  6849. }
  6850. },
  6851. "delete": {
  6852. "tags": [
  6853. "user"
  6854. ],
  6855. "summary": "Unstar the given repo",
  6856. "operationId": "userCurrentDeleteStar",
  6857. "parameters": [
  6858. {
  6859. "type": "string",
  6860. "description": "owner of the repo to unstar",
  6861. "name": "owner",
  6862. "in": "path",
  6863. "required": true
  6864. },
  6865. {
  6866. "type": "string",
  6867. "description": "name of the repo to unstar",
  6868. "name": "repo",
  6869. "in": "path",
  6870. "required": true
  6871. }
  6872. ],
  6873. "responses": {
  6874. "204": {
  6875. "$ref": "#/responses/empty"
  6876. }
  6877. }
  6878. }
  6879. },
  6880. "/user/subscriptions": {
  6881. "get": {
  6882. "produces": [
  6883. "application/json"
  6884. ],
  6885. "tags": [
  6886. "user"
  6887. ],
  6888. "summary": "List repositories watched by the authenticated user",
  6889. "operationId": "userCurrentListSubscriptions",
  6890. "responses": {
  6891. "200": {
  6892. "$ref": "#/responses/RepositoryList"
  6893. }
  6894. }
  6895. }
  6896. },
  6897. "/user/teams": {
  6898. "get": {
  6899. "produces": [
  6900. "application/json"
  6901. ],
  6902. "tags": [
  6903. "user"
  6904. ],
  6905. "summary": "List all the teams a user belongs to",
  6906. "operationId": "userListTeams",
  6907. "responses": {
  6908. "200": {
  6909. "$ref": "#/responses/TeamList"
  6910. }
  6911. }
  6912. }
  6913. },
  6914. "/user/times": {
  6915. "get": {
  6916. "produces": [
  6917. "application/json"
  6918. ],
  6919. "tags": [
  6920. "user"
  6921. ],
  6922. "summary": "List the current user's tracked times",
  6923. "operationId": "userCurrentTrackedTimes",
  6924. "responses": {
  6925. "200": {
  6926. "$ref": "#/responses/TrackedTimeList"
  6927. }
  6928. }
  6929. }
  6930. },
  6931. "/users/search": {
  6932. "get": {
  6933. "produces": [
  6934. "application/json"
  6935. ],
  6936. "tags": [
  6937. "user"
  6938. ],
  6939. "summary": "Search for users",
  6940. "operationId": "userSearch",
  6941. "parameters": [
  6942. {
  6943. "type": "string",
  6944. "description": "keyword",
  6945. "name": "q",
  6946. "in": "query"
  6947. },
  6948. {
  6949. "type": "integer",
  6950. "format": "int64",
  6951. "description": "ID of the user to search for",
  6952. "name": "uid",
  6953. "in": "query"
  6954. },
  6955. {
  6956. "type": "integer",
  6957. "description": "maximum number of users to return",
  6958. "name": "limit",
  6959. "in": "query"
  6960. }
  6961. ],
  6962. "responses": {
  6963. "200": {
  6964. "description": "SearchResults of a successful search",
  6965. "schema": {
  6966. "type": "object",
  6967. "properties": {
  6968. "data": {
  6969. "type": "array",
  6970. "items": {
  6971. "$ref": "#/definitions/User"
  6972. }
  6973. },
  6974. "ok": {
  6975. "type": "boolean"
  6976. }
  6977. }
  6978. }
  6979. }
  6980. }
  6981. }
  6982. },
  6983. "/users/{follower}/following/{followee}": {
  6984. "get": {
  6985. "tags": [
  6986. "user"
  6987. ],
  6988. "summary": "Check if one user is following another user",
  6989. "operationId": "userCheckFollowing",
  6990. "parameters": [
  6991. {
  6992. "type": "string",
  6993. "description": "username of following user",
  6994. "name": "follower",
  6995. "in": "path",
  6996. "required": true
  6997. },
  6998. {
  6999. "type": "string",
  7000. "description": "username of followed user",
  7001. "name": "followee",
  7002. "in": "path",
  7003. "required": true
  7004. }
  7005. ],
  7006. "responses": {
  7007. "204": {
  7008. "$ref": "#/responses/empty"
  7009. },
  7010. "404": {
  7011. "$ref": "#/responses/notFound"
  7012. }
  7013. }
  7014. }
  7015. },
  7016. "/users/{username}": {
  7017. "get": {
  7018. "produces": [
  7019. "application/json"
  7020. ],
  7021. "tags": [
  7022. "user"
  7023. ],
  7024. "summary": "Get a user",
  7025. "operationId": "userGet",
  7026. "parameters": [
  7027. {
  7028. "type": "string",
  7029. "description": "username of user to get",
  7030. "name": "username",
  7031. "in": "path",
  7032. "required": true
  7033. }
  7034. ],
  7035. "responses": {
  7036. "200": {
  7037. "$ref": "#/responses/User"
  7038. },
  7039. "404": {
  7040. "$ref": "#/responses/notFound"
  7041. }
  7042. }
  7043. }
  7044. },
  7045. "/users/{username}/followers": {
  7046. "get": {
  7047. "produces": [
  7048. "application/json"
  7049. ],
  7050. "tags": [
  7051. "user"
  7052. ],
  7053. "summary": "List the given user's followers",
  7054. "operationId": "userListFollowers",
  7055. "parameters": [
  7056. {
  7057. "type": "string",
  7058. "description": "username of user",
  7059. "name": "username",
  7060. "in": "path",
  7061. "required": true
  7062. }
  7063. ],
  7064. "responses": {
  7065. "200": {
  7066. "$ref": "#/responses/UserList"
  7067. }
  7068. }
  7069. }
  7070. },
  7071. "/users/{username}/following": {
  7072. "get": {
  7073. "produces": [
  7074. "application/json"
  7075. ],
  7076. "tags": [
  7077. "user"
  7078. ],
  7079. "summary": "List the users that the given user is following",
  7080. "operationId": "userListFollowing",
  7081. "parameters": [
  7082. {
  7083. "type": "string",
  7084. "description": "username of user",
  7085. "name": "username",
  7086. "in": "path",
  7087. "required": true
  7088. }
  7089. ],
  7090. "responses": {
  7091. "200": {
  7092. "$ref": "#/responses/UserList"
  7093. }
  7094. }
  7095. }
  7096. },
  7097. "/users/{username}/gpg_keys": {
  7098. "get": {
  7099. "produces": [
  7100. "application/json"
  7101. ],
  7102. "tags": [
  7103. "user"
  7104. ],
  7105. "summary": "List the given user's GPG keys",
  7106. "operationId": "userListGPGKeys",
  7107. "parameters": [
  7108. {
  7109. "type": "string",
  7110. "description": "username of user",
  7111. "name": "username",
  7112. "in": "path",
  7113. "required": true
  7114. }
  7115. ],
  7116. "responses": {
  7117. "200": {
  7118. "$ref": "#/responses/GPGKeyList"
  7119. }
  7120. }
  7121. }
  7122. },
  7123. "/users/{username}/heatmap": {
  7124. "get": {
  7125. "produces": [
  7126. "application/json"
  7127. ],
  7128. "tags": [
  7129. "user"
  7130. ],
  7131. "summary": "Get a user's heatmap",
  7132. "operationId": "userGetHeatmapData",
  7133. "parameters": [
  7134. {
  7135. "type": "string",
  7136. "description": "username of user to get",
  7137. "name": "username",
  7138. "in": "path",
  7139. "required": true
  7140. }
  7141. ],
  7142. "responses": {
  7143. "200": {
  7144. "$ref": "#/responses/UserHeatmapData"
  7145. },
  7146. "404": {
  7147. "$ref": "#/responses/notFound"
  7148. }
  7149. }
  7150. }
  7151. },
  7152. "/users/{username}/keys": {
  7153. "get": {
  7154. "produces": [
  7155. "application/json"
  7156. ],
  7157. "tags": [
  7158. "user"
  7159. ],
  7160. "summary": "List the given user's public keys",
  7161. "operationId": "userListKeys",
  7162. "parameters": [
  7163. {
  7164. "type": "string",
  7165. "description": "username of user",
  7166. "name": "username",
  7167. "in": "path",
  7168. "required": true
  7169. },
  7170. {
  7171. "type": "string",
  7172. "description": "fingerprint of the key",
  7173. "name": "fingerprint",
  7174. "in": "query"
  7175. }
  7176. ],
  7177. "responses": {
  7178. "200": {
  7179. "$ref": "#/responses/PublicKeyList"
  7180. }
  7181. }
  7182. }
  7183. },
  7184. "/users/{username}/orgs": {
  7185. "get": {
  7186. "produces": [
  7187. "application/json"
  7188. ],
  7189. "tags": [
  7190. "organization"
  7191. ],
  7192. "summary": "List a user's organizations",
  7193. "operationId": "orgListUserOrgs",
  7194. "parameters": [
  7195. {
  7196. "type": "string",
  7197. "description": "username of user",
  7198. "name": "username",
  7199. "in": "path",
  7200. "required": true
  7201. }
  7202. ],
  7203. "responses": {
  7204. "200": {
  7205. "$ref": "#/responses/OrganizationList"
  7206. }
  7207. }
  7208. }
  7209. },
  7210. "/users/{username}/repos": {
  7211. "get": {
  7212. "produces": [
  7213. "application/json"
  7214. ],
  7215. "tags": [
  7216. "user"
  7217. ],
  7218. "summary": "List the repos owned by the given user",
  7219. "operationId": "userListRepos",
  7220. "parameters": [
  7221. {
  7222. "type": "string",
  7223. "description": "username of user",
  7224. "name": "username",
  7225. "in": "path",
  7226. "required": true
  7227. }
  7228. ],
  7229. "responses": {
  7230. "200": {
  7231. "$ref": "#/responses/RepositoryList"
  7232. }
  7233. }
  7234. }
  7235. },
  7236. "/users/{username}/starred": {
  7237. "get": {
  7238. "produces": [
  7239. "application/json"
  7240. ],
  7241. "tags": [
  7242. "user"
  7243. ],
  7244. "summary": "The repos that the given user has starred",
  7245. "operationId": "userListStarred",
  7246. "parameters": [
  7247. {
  7248. "type": "string",
  7249. "description": "username of user",
  7250. "name": "username",
  7251. "in": "path",
  7252. "required": true
  7253. }
  7254. ],
  7255. "responses": {
  7256. "200": {
  7257. "$ref": "#/responses/RepositoryList"
  7258. }
  7259. }
  7260. }
  7261. },
  7262. "/users/{username}/subscriptions": {
  7263. "get": {
  7264. "produces": [
  7265. "application/json"
  7266. ],
  7267. "tags": [
  7268. "user"
  7269. ],
  7270. "summary": "List the repositories watched by a user",
  7271. "operationId": "userListSubscriptions",
  7272. "parameters": [
  7273. {
  7274. "type": "string",
  7275. "description": "username of the user",
  7276. "name": "username",
  7277. "in": "path",
  7278. "required": true
  7279. }
  7280. ],
  7281. "responses": {
  7282. "200": {
  7283. "$ref": "#/responses/RepositoryList"
  7284. }
  7285. }
  7286. }
  7287. },
  7288. "/users/{username}/tokens": {
  7289. "get": {
  7290. "produces": [
  7291. "application/json"
  7292. ],
  7293. "tags": [
  7294. "user"
  7295. ],
  7296. "summary": "List the authenticated user's access tokens",
  7297. "operationId": "userGetTokens",
  7298. "parameters": [
  7299. {
  7300. "type": "string",
  7301. "description": "username of user",
  7302. "name": "username",
  7303. "in": "path",
  7304. "required": true
  7305. }
  7306. ],
  7307. "responses": {
  7308. "200": {
  7309. "$ref": "#/responses/AccessTokenList"
  7310. }
  7311. }
  7312. },
  7313. "post": {
  7314. "consumes": [
  7315. "application/json"
  7316. ],
  7317. "produces": [
  7318. "application/json"
  7319. ],
  7320. "tags": [
  7321. "user"
  7322. ],
  7323. "summary": "Create an access token",
  7324. "operationId": "userCreateToken",
  7325. "parameters": [
  7326. {
  7327. "type": "string",
  7328. "x-go-name": "Name",
  7329. "description": "username of user",
  7330. "name": "username",
  7331. "in": "path",
  7332. "required": true
  7333. },
  7334. {
  7335. "name": "accessToken",
  7336. "in": "body",
  7337. "schema": {
  7338. "type": "object",
  7339. "required": [
  7340. "name"
  7341. ],
  7342. "properties": {
  7343. "name": {
  7344. "type": "string"
  7345. }
  7346. }
  7347. }
  7348. }
  7349. ],
  7350. "responses": {
  7351. "200": {
  7352. "$ref": "#/responses/AccessToken"
  7353. }
  7354. }
  7355. }
  7356. },
  7357. "/users/{username}/tokens/{token}": {
  7358. "delete": {
  7359. "produces": [
  7360. "application/json"
  7361. ],
  7362. "tags": [
  7363. "user"
  7364. ],
  7365. "summary": "delete an access token",
  7366. "operationId": "userDeleteAccessToken",
  7367. "parameters": [
  7368. {
  7369. "type": "string",
  7370. "description": "username of user",
  7371. "name": "username",
  7372. "in": "path",
  7373. "required": true
  7374. },
  7375. {
  7376. "type": "integer",
  7377. "format": "int64",
  7378. "description": "token to be deleted",
  7379. "name": "token",
  7380. "in": "path",
  7381. "required": true
  7382. }
  7383. ],
  7384. "responses": {
  7385. "204": {
  7386. "$ref": "#/responses/empty"
  7387. }
  7388. }
  7389. }
  7390. },
  7391. "/version": {
  7392. "get": {
  7393. "produces": [
  7394. "application/json"
  7395. ],
  7396. "tags": [
  7397. "miscellaneous"
  7398. ],
  7399. "summary": "Returns the version of the Gitea application",
  7400. "operationId": "getVersion",
  7401. "responses": {
  7402. "200": {
  7403. "$ref": "#/responses/ServerVersion"
  7404. }
  7405. }
  7406. }
  7407. }
  7408. },
  7409. "definitions": {
  7410. "APIError": {
  7411. "description": "APIError is an api error with a message",
  7412. "type": "object",
  7413. "properties": {
  7414. "message": {
  7415. "type": "string",
  7416. "x-go-name": "Message"
  7417. },
  7418. "url": {
  7419. "type": "string",
  7420. "x-go-name": "URL"
  7421. }
  7422. },
  7423. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7424. },
  7425. "AccessToken": {
  7426. "type": "object",
  7427. "title": "AccessToken represents an API access token.",
  7428. "properties": {
  7429. "id": {
  7430. "type": "integer",
  7431. "format": "int64",
  7432. "x-go-name": "ID"
  7433. },
  7434. "name": {
  7435. "type": "string",
  7436. "x-go-name": "Name"
  7437. },
  7438. "sha1": {
  7439. "type": "string",
  7440. "x-go-name": "Token"
  7441. },
  7442. "token_last_eight": {
  7443. "type": "string",
  7444. "x-go-name": "TokenLastEight"
  7445. }
  7446. },
  7447. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7448. },
  7449. "AddCollaboratorOption": {
  7450. "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository",
  7451. "type": "object",
  7452. "properties": {
  7453. "permission": {
  7454. "type": "string",
  7455. "x-go-name": "Permission"
  7456. }
  7457. },
  7458. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7459. },
  7460. "AddTimeOption": {
  7461. "description": "AddTimeOption options for adding time to an issue",
  7462. "type": "object",
  7463. "required": [
  7464. "time"
  7465. ],
  7466. "properties": {
  7467. "time": {
  7468. "description": "time in seconds",
  7469. "type": "integer",
  7470. "format": "int64",
  7471. "x-go-name": "Time"
  7472. }
  7473. },
  7474. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7475. },
  7476. "AnnotatedTag": {
  7477. "description": "AnnotatedTag represents an annotated tag",
  7478. "type": "object",
  7479. "properties": {
  7480. "message": {
  7481. "type": "string",
  7482. "x-go-name": "Message"
  7483. },
  7484. "object": {
  7485. "$ref": "#/definitions/AnnotatedTagObject"
  7486. },
  7487. "sha": {
  7488. "type": "string",
  7489. "x-go-name": "SHA"
  7490. },
  7491. "tag": {
  7492. "type": "string",
  7493. "x-go-name": "Tag"
  7494. },
  7495. "tagger": {
  7496. "$ref": "#/definitions/CommitUser"
  7497. },
  7498. "url": {
  7499. "type": "string",
  7500. "x-go-name": "URL"
  7501. },
  7502. "verification": {
  7503. "$ref": "#/definitions/PayloadCommitVerification"
  7504. }
  7505. },
  7506. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7507. },
  7508. "AnnotatedTagObject": {
  7509. "description": "AnnotatedTagObject contains meta information of the tag object",
  7510. "type": "object",
  7511. "properties": {
  7512. "sha": {
  7513. "type": "string",
  7514. "x-go-name": "SHA"
  7515. },
  7516. "type": {
  7517. "type": "string",
  7518. "x-go-name": "Type"
  7519. },
  7520. "url": {
  7521. "type": "string",
  7522. "x-go-name": "URL"
  7523. }
  7524. },
  7525. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7526. },
  7527. "Attachment": {
  7528. "description": "Attachment a generic attachment",
  7529. "type": "object",
  7530. "properties": {
  7531. "browser_download_url": {
  7532. "type": "string",
  7533. "x-go-name": "DownloadURL"
  7534. },
  7535. "created_at": {
  7536. "type": "string",
  7537. "format": "date-time",
  7538. "x-go-name": "Created"
  7539. },
  7540. "download_count": {
  7541. "type": "integer",
  7542. "format": "int64",
  7543. "x-go-name": "DownloadCount"
  7544. },
  7545. "id": {
  7546. "type": "integer",
  7547. "format": "int64",
  7548. "x-go-name": "ID"
  7549. },
  7550. "name": {
  7551. "type": "string",
  7552. "x-go-name": "Name"
  7553. },
  7554. "size": {
  7555. "type": "integer",
  7556. "format": "int64",
  7557. "x-go-name": "Size"
  7558. },
  7559. "uuid": {
  7560. "type": "string",
  7561. "x-go-name": "UUID"
  7562. }
  7563. },
  7564. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7565. },
  7566. "Branch": {
  7567. "description": "Branch represents a repository branch",
  7568. "type": "object",
  7569. "properties": {
  7570. "commit": {
  7571. "$ref": "#/definitions/PayloadCommit"
  7572. },
  7573. "name": {
  7574. "type": "string",
  7575. "x-go-name": "Name"
  7576. }
  7577. },
  7578. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7579. },
  7580. "Comment": {
  7581. "description": "Comment represents a comment on a commit or issue",
  7582. "type": "object",
  7583. "properties": {
  7584. "body": {
  7585. "type": "string",
  7586. "x-go-name": "Body"
  7587. },
  7588. "created_at": {
  7589. "type": "string",
  7590. "format": "date-time",
  7591. "x-go-name": "Created"
  7592. },
  7593. "html_url": {
  7594. "type": "string",
  7595. "x-go-name": "HTMLURL"
  7596. },
  7597. "id": {
  7598. "type": "integer",
  7599. "format": "int64",
  7600. "x-go-name": "ID"
  7601. },
  7602. "issue_url": {
  7603. "type": "string",
  7604. "x-go-name": "IssueURL"
  7605. },
  7606. "original_author": {
  7607. "type": "string",
  7608. "x-go-name": "OriginalAuthor"
  7609. },
  7610. "original_author_id": {
  7611. "type": "integer",
  7612. "format": "int64",
  7613. "x-go-name": "OriginalAuthorID"
  7614. },
  7615. "pull_request_url": {
  7616. "type": "string",
  7617. "x-go-name": "PRURL"
  7618. },
  7619. "updated_at": {
  7620. "type": "string",
  7621. "format": "date-time",
  7622. "x-go-name": "Updated"
  7623. },
  7624. "user": {
  7625. "$ref": "#/definitions/User"
  7626. }
  7627. },
  7628. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7629. },
  7630. "Commit": {
  7631. "type": "object",
  7632. "title": "Commit contains information generated from a Git commit.",
  7633. "properties": {
  7634. "author": {
  7635. "$ref": "#/definitions/User"
  7636. },
  7637. "commit": {
  7638. "$ref": "#/definitions/RepoCommit"
  7639. },
  7640. "committer": {
  7641. "$ref": "#/definitions/User"
  7642. },
  7643. "html_url": {
  7644. "type": "string",
  7645. "x-go-name": "HTMLURL"
  7646. },
  7647. "parents": {
  7648. "type": "array",
  7649. "items": {
  7650. "$ref": "#/definitions/CommitMeta"
  7651. },
  7652. "x-go-name": "Parents"
  7653. },
  7654. "sha": {
  7655. "type": "string",
  7656. "x-go-name": "SHA"
  7657. },
  7658. "url": {
  7659. "type": "string",
  7660. "x-go-name": "URL"
  7661. }
  7662. },
  7663. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7664. },
  7665. "CommitMeta": {
  7666. "type": "object",
  7667. "title": "CommitMeta contains meta information of a commit in terms of API.",
  7668. "properties": {
  7669. "sha": {
  7670. "type": "string",
  7671. "x-go-name": "SHA"
  7672. },
  7673. "url": {
  7674. "type": "string",
  7675. "x-go-name": "URL"
  7676. }
  7677. },
  7678. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7679. },
  7680. "CommitUser": {
  7681. "type": "object",
  7682. "title": "CommitUser contains information of a user in the context of a commit.",
  7683. "properties": {
  7684. "date": {
  7685. "type": "string",
  7686. "x-go-name": "Date"
  7687. },
  7688. "email": {
  7689. "type": "string",
  7690. "format": "email",
  7691. "x-go-name": "Email"
  7692. },
  7693. "name": {
  7694. "type": "string",
  7695. "x-go-name": "Name"
  7696. }
  7697. },
  7698. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7699. },
  7700. "ContentsResponse": {
  7701. "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content",
  7702. "type": "object",
  7703. "properties": {
  7704. "_links": {
  7705. "$ref": "#/definitions/FileLinksResponse"
  7706. },
  7707. "content": {
  7708. "description": "`content` is populated when `type` is `file`, otherwise null",
  7709. "type": "string",
  7710. "x-go-name": "Content"
  7711. },
  7712. "download_url": {
  7713. "type": "string",
  7714. "x-go-name": "DownloadURL"
  7715. },
  7716. "encoding": {
  7717. "description": "`encoding` is populated when `type` is `file`, otherwise null",
  7718. "type": "string",
  7719. "x-go-name": "Encoding"
  7720. },
  7721. "git_url": {
  7722. "type": "string",
  7723. "x-go-name": "GitURL"
  7724. },
  7725. "html_url": {
  7726. "type": "string",
  7727. "x-go-name": "HTMLURL"
  7728. },
  7729. "name": {
  7730. "type": "string",
  7731. "x-go-name": "Name"
  7732. },
  7733. "path": {
  7734. "type": "string",
  7735. "x-go-name": "Path"
  7736. },
  7737. "sha": {
  7738. "type": "string",
  7739. "x-go-name": "SHA"
  7740. },
  7741. "size": {
  7742. "type": "integer",
  7743. "format": "int64",
  7744. "x-go-name": "Size"
  7745. },
  7746. "submodule_git_url": {
  7747. "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null",
  7748. "type": "string",
  7749. "x-go-name": "SubmoduleGitURL"
  7750. },
  7751. "target": {
  7752. "description": "`target` is populated when `type` is `symlink`, otherwise null",
  7753. "type": "string",
  7754. "x-go-name": "Target"
  7755. },
  7756. "type": {
  7757. "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`",
  7758. "type": "string",
  7759. "x-go-name": "Type"
  7760. },
  7761. "url": {
  7762. "type": "string",
  7763. "x-go-name": "URL"
  7764. }
  7765. },
  7766. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7767. },
  7768. "CreateEmailOption": {
  7769. "description": "CreateEmailOption options when creating email addresses",
  7770. "type": "object",
  7771. "properties": {
  7772. "emails": {
  7773. "description": "email addresses to add",
  7774. "type": "array",
  7775. "items": {
  7776. "type": "string"
  7777. },
  7778. "x-go-name": "Emails"
  7779. }
  7780. },
  7781. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7782. },
  7783. "CreateFileOptions": {
  7784. "description": "CreateFileOptions options for creating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)",
  7785. "type": "object",
  7786. "required": [
  7787. "content"
  7788. ],
  7789. "properties": {
  7790. "author": {
  7791. "$ref": "#/definitions/Identity"
  7792. },
  7793. "branch": {
  7794. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  7795. "type": "string",
  7796. "x-go-name": "BranchName"
  7797. },
  7798. "committer": {
  7799. "$ref": "#/definitions/Identity"
  7800. },
  7801. "content": {
  7802. "description": "content must be base64 encoded",
  7803. "type": "string",
  7804. "x-go-name": "Content"
  7805. },
  7806. "message": {
  7807. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  7808. "type": "string",
  7809. "x-go-name": "Message"
  7810. },
  7811. "new_branch": {
  7812. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  7813. "type": "string",
  7814. "x-go-name": "NewBranchName"
  7815. }
  7816. },
  7817. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7818. },
  7819. "CreateForkOption": {
  7820. "description": "CreateForkOption options for creating a fork",
  7821. "type": "object",
  7822. "properties": {
  7823. "organization": {
  7824. "description": "organization name, if forking into an organization",
  7825. "type": "string",
  7826. "x-go-name": "Organization"
  7827. }
  7828. },
  7829. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7830. },
  7831. "CreateGPGKeyOption": {
  7832. "description": "CreateGPGKeyOption options create user GPG key",
  7833. "type": "object",
  7834. "required": [
  7835. "armored_public_key"
  7836. ],
  7837. "properties": {
  7838. "armored_public_key": {
  7839. "description": "An armored GPG key to add",
  7840. "type": "string",
  7841. "uniqueItems": true,
  7842. "x-go-name": "ArmoredKey"
  7843. }
  7844. },
  7845. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7846. },
  7847. "CreateHookOption": {
  7848. "description": "CreateHookOption options when create a hook",
  7849. "type": "object",
  7850. "required": [
  7851. "type",
  7852. "config"
  7853. ],
  7854. "properties": {
  7855. "active": {
  7856. "type": "boolean",
  7857. "default": false,
  7858. "x-go-name": "Active"
  7859. },
  7860. "branch_filter": {
  7861. "type": "string",
  7862. "x-go-name": "BranchFilter"
  7863. },
  7864. "config": {
  7865. "type": "object",
  7866. "additionalProperties": {
  7867. "type": "string"
  7868. },
  7869. "x-go-name": "Config"
  7870. },
  7871. "events": {
  7872. "type": "array",
  7873. "items": {
  7874. "type": "string"
  7875. },
  7876. "x-go-name": "Events"
  7877. },
  7878. "type": {
  7879. "type": "string",
  7880. "enum": [
  7881. "gitea",
  7882. "gogs",
  7883. "slack",
  7884. "discord"
  7885. ],
  7886. "x-go-name": "Type"
  7887. }
  7888. },
  7889. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7890. },
  7891. "CreateIssueCommentOption": {
  7892. "description": "CreateIssueCommentOption options for creating a comment on an issue",
  7893. "type": "object",
  7894. "required": [
  7895. "body"
  7896. ],
  7897. "properties": {
  7898. "body": {
  7899. "type": "string",
  7900. "x-go-name": "Body"
  7901. }
  7902. },
  7903. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7904. },
  7905. "CreateIssueOption": {
  7906. "description": "CreateIssueOption options to create one issue",
  7907. "type": "object",
  7908. "required": [
  7909. "title"
  7910. ],
  7911. "properties": {
  7912. "assignee": {
  7913. "description": "username of assignee",
  7914. "type": "string",
  7915. "x-go-name": "Assignee"
  7916. },
  7917. "assignees": {
  7918. "type": "array",
  7919. "items": {
  7920. "type": "string"
  7921. },
  7922. "x-go-name": "Assignees"
  7923. },
  7924. "body": {
  7925. "type": "string",
  7926. "x-go-name": "Body"
  7927. },
  7928. "closed": {
  7929. "type": "boolean",
  7930. "x-go-name": "Closed"
  7931. },
  7932. "due_date": {
  7933. "type": "string",
  7934. "format": "date-time",
  7935. "x-go-name": "Deadline"
  7936. },
  7937. "labels": {
  7938. "description": "list of label ids",
  7939. "type": "array",
  7940. "items": {
  7941. "type": "integer",
  7942. "format": "int64"
  7943. },
  7944. "x-go-name": "Labels"
  7945. },
  7946. "milestone": {
  7947. "description": "milestone id",
  7948. "type": "integer",
  7949. "format": "int64",
  7950. "x-go-name": "Milestone"
  7951. },
  7952. "title": {
  7953. "type": "string",
  7954. "x-go-name": "Title"
  7955. }
  7956. },
  7957. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7958. },
  7959. "CreateKeyOption": {
  7960. "description": "CreateKeyOption options when creating a key",
  7961. "type": "object",
  7962. "required": [
  7963. "title",
  7964. "key"
  7965. ],
  7966. "properties": {
  7967. "key": {
  7968. "description": "An armored SSH key to add",
  7969. "type": "string",
  7970. "uniqueItems": true,
  7971. "x-go-name": "Key"
  7972. },
  7973. "read_only": {
  7974. "description": "Describe if the key has only read access or read/write",
  7975. "type": "boolean",
  7976. "x-go-name": "ReadOnly"
  7977. },
  7978. "title": {
  7979. "description": "Title of the key to add",
  7980. "type": "string",
  7981. "uniqueItems": true,
  7982. "x-go-name": "Title"
  7983. }
  7984. },
  7985. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7986. },
  7987. "CreateLabelOption": {
  7988. "description": "CreateLabelOption options for creating a label",
  7989. "type": "object",
  7990. "required": [
  7991. "name",
  7992. "color"
  7993. ],
  7994. "properties": {
  7995. "color": {
  7996. "type": "string",
  7997. "x-go-name": "Color",
  7998. "example": "#00aabb"
  7999. },
  8000. "description": {
  8001. "type": "string",
  8002. "x-go-name": "Description"
  8003. },
  8004. "name": {
  8005. "type": "string",
  8006. "x-go-name": "Name"
  8007. }
  8008. },
  8009. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8010. },
  8011. "CreateMilestoneOption": {
  8012. "description": "CreateMilestoneOption options for creating a milestone",
  8013. "type": "object",
  8014. "properties": {
  8015. "description": {
  8016. "type": "string",
  8017. "x-go-name": "Description"
  8018. },
  8019. "due_on": {
  8020. "type": "string",
  8021. "format": "date-time",
  8022. "x-go-name": "Deadline"
  8023. },
  8024. "title": {
  8025. "type": "string",
  8026. "x-go-name": "Title"
  8027. }
  8028. },
  8029. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8030. },
  8031. "CreateOrgOption": {
  8032. "description": "CreateOrgOption options for creating an organization",
  8033. "type": "object",
  8034. "required": [
  8035. "username"
  8036. ],
  8037. "properties": {
  8038. "description": {
  8039. "type": "string",
  8040. "x-go-name": "Description"
  8041. },
  8042. "full_name": {
  8043. "type": "string",
  8044. "x-go-name": "FullName"
  8045. },
  8046. "location": {
  8047. "type": "string",
  8048. "x-go-name": "Location"
  8049. },
  8050. "repo_admin_change_team_access": {
  8051. "type": "boolean",
  8052. "x-go-name": "RepoAdminChangeTeamAccess"
  8053. },
  8054. "username": {
  8055. "type": "string",
  8056. "x-go-name": "UserName"
  8057. },
  8058. "visibility": {
  8059. "description": "possible values are `public` (default), `limited` or `private`",
  8060. "type": "string",
  8061. "enum": [
  8062. "public",
  8063. "limited",
  8064. "private"
  8065. ],
  8066. "x-go-name": "Visibility"
  8067. },
  8068. "website": {
  8069. "type": "string",
  8070. "x-go-name": "Website"
  8071. }
  8072. },
  8073. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8074. },
  8075. "CreatePullRequestOption": {
  8076. "description": "CreatePullRequestOption options when creating a pull request",
  8077. "type": "object",
  8078. "properties": {
  8079. "assignee": {
  8080. "type": "string",
  8081. "x-go-name": "Assignee"
  8082. },
  8083. "assignees": {
  8084. "type": "array",
  8085. "items": {
  8086. "type": "string"
  8087. },
  8088. "x-go-name": "Assignees"
  8089. },
  8090. "base": {
  8091. "type": "string",
  8092. "x-go-name": "Base"
  8093. },
  8094. "body": {
  8095. "type": "string",
  8096. "x-go-name": "Body"
  8097. },
  8098. "due_date": {
  8099. "type": "string",
  8100. "format": "date-time",
  8101. "x-go-name": "Deadline"
  8102. },
  8103. "head": {
  8104. "type": "string",
  8105. "x-go-name": "Head"
  8106. },
  8107. "labels": {
  8108. "type": "array",
  8109. "items": {
  8110. "type": "integer",
  8111. "format": "int64"
  8112. },
  8113. "x-go-name": "Labels"
  8114. },
  8115. "milestone": {
  8116. "type": "integer",
  8117. "format": "int64",
  8118. "x-go-name": "Milestone"
  8119. },
  8120. "title": {
  8121. "type": "string",
  8122. "x-go-name": "Title"
  8123. }
  8124. },
  8125. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8126. },
  8127. "CreateReleaseOption": {
  8128. "description": "CreateReleaseOption options when creating a release",
  8129. "type": "object",
  8130. "required": [
  8131. "tag_name"
  8132. ],
  8133. "properties": {
  8134. "body": {
  8135. "type": "string",
  8136. "x-go-name": "Note"
  8137. },
  8138. "draft": {
  8139. "type": "boolean",
  8140. "x-go-name": "IsDraft"
  8141. },
  8142. "name": {
  8143. "type": "string",
  8144. "x-go-name": "Title"
  8145. },
  8146. "prerelease": {
  8147. "type": "boolean",
  8148. "x-go-name": "IsPrerelease"
  8149. },
  8150. "tag_name": {
  8151. "type": "string",
  8152. "x-go-name": "TagName"
  8153. },
  8154. "target_commitish": {
  8155. "type": "string",
  8156. "x-go-name": "Target"
  8157. }
  8158. },
  8159. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8160. },
  8161. "CreateRepoOption": {
  8162. "description": "CreateRepoOption options when creating repository",
  8163. "type": "object",
  8164. "required": [
  8165. "name"
  8166. ],
  8167. "properties": {
  8168. "auto_init": {
  8169. "description": "Whether the repository should be auto-intialized?",
  8170. "type": "boolean",
  8171. "x-go-name": "AutoInit"
  8172. },
  8173. "description": {
  8174. "description": "Description of the repository to create",
  8175. "type": "string",
  8176. "x-go-name": "Description"
  8177. },
  8178. "gitignores": {
  8179. "description": "Gitignores to use",
  8180. "type": "string",
  8181. "x-go-name": "Gitignores"
  8182. },
  8183. "issue_labels": {
  8184. "description": "Issue Label set to use",
  8185. "type": "string",
  8186. "x-go-name": "IssueLabels"
  8187. },
  8188. "license": {
  8189. "description": "License to use",
  8190. "type": "string",
  8191. "x-go-name": "License"
  8192. },
  8193. "name": {
  8194. "description": "Name of the repository to create",
  8195. "type": "string",
  8196. "uniqueItems": true,
  8197. "x-go-name": "Name"
  8198. },
  8199. "private": {
  8200. "description": "Whether the repository is private",
  8201. "type": "boolean",
  8202. "x-go-name": "Private"
  8203. },
  8204. "readme": {
  8205. "description": "Readme of the repository to create",
  8206. "type": "string",
  8207. "x-go-name": "Readme"
  8208. }
  8209. },
  8210. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8211. },
  8212. "CreateStatusOption": {
  8213. "description": "CreateStatusOption holds the information needed to create a new Status for a Commit",
  8214. "type": "object",
  8215. "properties": {
  8216. "context": {
  8217. "type": "string",
  8218. "x-go-name": "Context"
  8219. },
  8220. "description": {
  8221. "type": "string",
  8222. "x-go-name": "Description"
  8223. },
  8224. "state": {
  8225. "$ref": "#/definitions/StatusState"
  8226. },
  8227. "target_url": {
  8228. "type": "string",
  8229. "x-go-name": "TargetURL"
  8230. }
  8231. },
  8232. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8233. },
  8234. "CreateTeamOption": {
  8235. "description": "CreateTeamOption options for creating a team",
  8236. "type": "object",
  8237. "required": [
  8238. "name"
  8239. ],
  8240. "properties": {
  8241. "description": {
  8242. "type": "string",
  8243. "x-go-name": "Description"
  8244. },
  8245. "name": {
  8246. "type": "string",
  8247. "x-go-name": "Name"
  8248. },
  8249. "permission": {
  8250. "type": "string",
  8251. "enum": [
  8252. "read",
  8253. "write",
  8254. "admin"
  8255. ],
  8256. "x-go-name": "Permission"
  8257. },
  8258. "units": {
  8259. "type": "array",
  8260. "items": {
  8261. "type": "string"
  8262. },
  8263. "x-go-name": "Units",
  8264. "example": [
  8265. "repo.code",
  8266. "repo.issues",
  8267. "repo.ext_issues",
  8268. "repo.wiki",
  8269. "repo.pulls",
  8270. "repo.releases",
  8271. "repo.ext_wiki"
  8272. ]
  8273. }
  8274. },
  8275. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8276. },
  8277. "CreateUserOption": {
  8278. "description": "CreateUserOption create user options",
  8279. "type": "object",
  8280. "required": [
  8281. "username",
  8282. "email",
  8283. "password"
  8284. ],
  8285. "properties": {
  8286. "email": {
  8287. "type": "string",
  8288. "format": "email",
  8289. "x-go-name": "Email"
  8290. },
  8291. "full_name": {
  8292. "type": "string",
  8293. "x-go-name": "FullName"
  8294. },
  8295. "login_name": {
  8296. "type": "string",
  8297. "x-go-name": "LoginName"
  8298. },
  8299. "must_change_password": {
  8300. "type": "boolean",
  8301. "x-go-name": "MustChangePassword"
  8302. },
  8303. "password": {
  8304. "type": "string",
  8305. "x-go-name": "Password"
  8306. },
  8307. "send_notify": {
  8308. "type": "boolean",
  8309. "x-go-name": "SendNotify"
  8310. },
  8311. "source_id": {
  8312. "type": "integer",
  8313. "format": "int64",
  8314. "x-go-name": "SourceID"
  8315. },
  8316. "username": {
  8317. "type": "string",
  8318. "x-go-name": "Username"
  8319. }
  8320. },
  8321. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8322. },
  8323. "DeleteEmailOption": {
  8324. "description": "DeleteEmailOption options when deleting email addresses",
  8325. "type": "object",
  8326. "properties": {
  8327. "emails": {
  8328. "description": "email addresses to delete",
  8329. "type": "array",
  8330. "items": {
  8331. "type": "string"
  8332. },
  8333. "x-go-name": "Emails"
  8334. }
  8335. },
  8336. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8337. },
  8338. "DeleteFileOptions": {
  8339. "description": "DeleteFileOptions options for deleting files (used for other File structs below)\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)",
  8340. "type": "object",
  8341. "required": [
  8342. "sha"
  8343. ],
  8344. "properties": {
  8345. "author": {
  8346. "$ref": "#/definitions/Identity"
  8347. },
  8348. "branch": {
  8349. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  8350. "type": "string",
  8351. "x-go-name": "BranchName"
  8352. },
  8353. "committer": {
  8354. "$ref": "#/definitions/Identity"
  8355. },
  8356. "message": {
  8357. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  8358. "type": "string",
  8359. "x-go-name": "Message"
  8360. },
  8361. "new_branch": {
  8362. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  8363. "type": "string",
  8364. "x-go-name": "NewBranchName"
  8365. },
  8366. "sha": {
  8367. "description": "sha is the SHA for the file that already exists",
  8368. "type": "string",
  8369. "x-go-name": "SHA"
  8370. }
  8371. },
  8372. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8373. },
  8374. "DeployKey": {
  8375. "description": "DeployKey a deploy key",
  8376. "type": "object",
  8377. "properties": {
  8378. "created_at": {
  8379. "type": "string",
  8380. "format": "date-time",
  8381. "x-go-name": "Created"
  8382. },
  8383. "fingerprint": {
  8384. "type": "string",
  8385. "x-go-name": "Fingerprint"
  8386. },
  8387. "id": {
  8388. "type": "integer",
  8389. "format": "int64",
  8390. "x-go-name": "ID"
  8391. },
  8392. "key": {
  8393. "type": "string",
  8394. "x-go-name": "Key"
  8395. },
  8396. "key_id": {
  8397. "type": "integer",
  8398. "format": "int64",
  8399. "x-go-name": "KeyID"
  8400. },
  8401. "read_only": {
  8402. "type": "boolean",
  8403. "x-go-name": "ReadOnly"
  8404. },
  8405. "repository": {
  8406. "$ref": "#/definitions/Repository"
  8407. },
  8408. "title": {
  8409. "type": "string",
  8410. "x-go-name": "Title"
  8411. },
  8412. "url": {
  8413. "type": "string",
  8414. "x-go-name": "URL"
  8415. }
  8416. },
  8417. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8418. },
  8419. "EditAttachmentOptions": {
  8420. "description": "EditAttachmentOptions options for editing attachments",
  8421. "type": "object",
  8422. "properties": {
  8423. "name": {
  8424. "type": "string",
  8425. "x-go-name": "Name"
  8426. }
  8427. },
  8428. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8429. },
  8430. "EditDeadlineOption": {
  8431. "description": "EditDeadlineOption options for creating a deadline",
  8432. "type": "object",
  8433. "required": [
  8434. "due_date"
  8435. ],
  8436. "properties": {
  8437. "due_date": {
  8438. "type": "string",
  8439. "format": "date-time",
  8440. "x-go-name": "Deadline"
  8441. }
  8442. },
  8443. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8444. },
  8445. "EditGitHookOption": {
  8446. "description": "EditGitHookOption options when modifying one Git hook",
  8447. "type": "object",
  8448. "properties": {
  8449. "content": {
  8450. "type": "string",
  8451. "x-go-name": "Content"
  8452. }
  8453. },
  8454. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8455. },
  8456. "EditHookOption": {
  8457. "description": "EditHookOption options when modify one hook",
  8458. "type": "object",
  8459. "properties": {
  8460. "active": {
  8461. "type": "boolean",
  8462. "x-go-name": "Active"
  8463. },
  8464. "branch_filter": {
  8465. "type": "string",
  8466. "x-go-name": "BranchFilter"
  8467. },
  8468. "config": {
  8469. "type": "object",
  8470. "additionalProperties": {
  8471. "type": "string"
  8472. },
  8473. "x-go-name": "Config"
  8474. },
  8475. "events": {
  8476. "type": "array",
  8477. "items": {
  8478. "type": "string"
  8479. },
  8480. "x-go-name": "Events"
  8481. }
  8482. },
  8483. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8484. },
  8485. "EditIssueCommentOption": {
  8486. "description": "EditIssueCommentOption options for editing a comment",
  8487. "type": "object",
  8488. "required": [
  8489. "body"
  8490. ],
  8491. "properties": {
  8492. "body": {
  8493. "type": "string",
  8494. "x-go-name": "Body"
  8495. }
  8496. },
  8497. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8498. },
  8499. "EditIssueOption": {
  8500. "description": "EditIssueOption options for editing an issue",
  8501. "type": "object",
  8502. "properties": {
  8503. "assignee": {
  8504. "type": "string",
  8505. "x-go-name": "Assignee"
  8506. },
  8507. "assignees": {
  8508. "type": "array",
  8509. "items": {
  8510. "type": "string"
  8511. },
  8512. "x-go-name": "Assignees"
  8513. },
  8514. "body": {
  8515. "type": "string",
  8516. "x-go-name": "Body"
  8517. },
  8518. "due_date": {
  8519. "type": "string",
  8520. "format": "date-time",
  8521. "x-go-name": "Deadline"
  8522. },
  8523. "milestone": {
  8524. "type": "integer",
  8525. "format": "int64",
  8526. "x-go-name": "Milestone"
  8527. },
  8528. "state": {
  8529. "type": "string",
  8530. "x-go-name": "State"
  8531. },
  8532. "title": {
  8533. "type": "string",
  8534. "x-go-name": "Title"
  8535. }
  8536. },
  8537. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8538. },
  8539. "EditLabelOption": {
  8540. "description": "EditLabelOption options for editing a label",
  8541. "type": "object",
  8542. "properties": {
  8543. "color": {
  8544. "type": "string",
  8545. "x-go-name": "Color"
  8546. },
  8547. "description": {
  8548. "type": "string",
  8549. "x-go-name": "Description"
  8550. },
  8551. "name": {
  8552. "type": "string",
  8553. "x-go-name": "Name"
  8554. }
  8555. },
  8556. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8557. },
  8558. "EditMilestoneOption": {
  8559. "description": "EditMilestoneOption options for editing a milestone",
  8560. "type": "object",
  8561. "properties": {
  8562. "description": {
  8563. "type": "string",
  8564. "x-go-name": "Description"
  8565. },
  8566. "due_on": {
  8567. "type": "string",
  8568. "format": "date-time",
  8569. "x-go-name": "Deadline"
  8570. },
  8571. "state": {
  8572. "type": "string",
  8573. "x-go-name": "State"
  8574. },
  8575. "title": {
  8576. "type": "string",
  8577. "x-go-name": "Title"
  8578. }
  8579. },
  8580. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8581. },
  8582. "EditOrgOption": {
  8583. "description": "EditOrgOption options for editing an organization",
  8584. "type": "object",
  8585. "properties": {
  8586. "description": {
  8587. "type": "string",
  8588. "x-go-name": "Description"
  8589. },
  8590. "full_name": {
  8591. "type": "string",
  8592. "x-go-name": "FullName"
  8593. },
  8594. "location": {
  8595. "type": "string",
  8596. "x-go-name": "Location"
  8597. },
  8598. "repo_admin_change_team_access": {
  8599. "type": "boolean",
  8600. "x-go-name": "RepoAdminChangeTeamAccess"
  8601. },
  8602. "visibility": {
  8603. "description": "possible values are `public`, `limited` or `private`",
  8604. "type": "string",
  8605. "enum": [
  8606. "public",
  8607. "limited",
  8608. "private"
  8609. ],
  8610. "x-go-name": "Visibility"
  8611. },
  8612. "website": {
  8613. "type": "string",
  8614. "x-go-name": "Website"
  8615. }
  8616. },
  8617. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8618. },
  8619. "EditPullRequestOption": {
  8620. "description": "EditPullRequestOption options when modify pull request",
  8621. "type": "object",
  8622. "properties": {
  8623. "assignee": {
  8624. "type": "string",
  8625. "x-go-name": "Assignee"
  8626. },
  8627. "assignees": {
  8628. "type": "array",
  8629. "items": {
  8630. "type": "string"
  8631. },
  8632. "x-go-name": "Assignees"
  8633. },
  8634. "body": {
  8635. "type": "string",
  8636. "x-go-name": "Body"
  8637. },
  8638. "due_date": {
  8639. "type": "string",
  8640. "format": "date-time",
  8641. "x-go-name": "Deadline"
  8642. },
  8643. "labels": {
  8644. "type": "array",
  8645. "items": {
  8646. "type": "integer",
  8647. "format": "int64"
  8648. },
  8649. "x-go-name": "Labels"
  8650. },
  8651. "milestone": {
  8652. "type": "integer",
  8653. "format": "int64",
  8654. "x-go-name": "Milestone"
  8655. },
  8656. "state": {
  8657. "type": "string",
  8658. "x-go-name": "State"
  8659. },
  8660. "title": {
  8661. "type": "string",
  8662. "x-go-name": "Title"
  8663. }
  8664. },
  8665. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8666. },
  8667. "EditReleaseOption": {
  8668. "description": "EditReleaseOption options when editing a release",
  8669. "type": "object",
  8670. "properties": {
  8671. "body": {
  8672. "type": "string",
  8673. "x-go-name": "Note"
  8674. },
  8675. "draft": {
  8676. "type": "boolean",
  8677. "x-go-name": "IsDraft"
  8678. },
  8679. "name": {
  8680. "type": "string",
  8681. "x-go-name": "Title"
  8682. },
  8683. "prerelease": {
  8684. "type": "boolean",
  8685. "x-go-name": "IsPrerelease"
  8686. },
  8687. "tag_name": {
  8688. "type": "string",
  8689. "x-go-name": "TagName"
  8690. },
  8691. "target_commitish": {
  8692. "type": "string",
  8693. "x-go-name": "Target"
  8694. }
  8695. },
  8696. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8697. },
  8698. "EditRepoOption": {
  8699. "description": "EditRepoOption options when editing a repository's properties",
  8700. "type": "object",
  8701. "properties": {
  8702. "allow_merge_commits": {
  8703. "description": "either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`.",
  8704. "type": "boolean",
  8705. "x-go-name": "AllowMerge"
  8706. },
  8707. "allow_rebase": {
  8708. "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.",
  8709. "type": "boolean",
  8710. "x-go-name": "AllowRebase"
  8711. },
  8712. "allow_rebase_explicit": {
  8713. "description": "either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. `has_pull_requests` must be `true`.",
  8714. "type": "boolean",
  8715. "x-go-name": "AllowRebaseMerge"
  8716. },
  8717. "allow_squash_merge": {
  8718. "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.",
  8719. "type": "boolean",
  8720. "x-go-name": "AllowSquash"
  8721. },
  8722. "archived": {
  8723. "description": "set to `true` to archive this repository.",
  8724. "type": "boolean",
  8725. "x-go-name": "Archived"
  8726. },
  8727. "default_branch": {
  8728. "description": "sets the default branch for this repository.",
  8729. "type": "string",
  8730. "x-go-name": "DefaultBranch"
  8731. },
  8732. "description": {
  8733. "description": "a short description of the repository.",
  8734. "type": "string",
  8735. "x-go-name": "Description"
  8736. },
  8737. "external_tracker": {
  8738. "$ref": "#/definitions/ExternalTracker"
  8739. },
  8740. "external_wiki": {
  8741. "$ref": "#/definitions/ExternalWiki"
  8742. },
  8743. "has_issues": {
  8744. "description": "either `true` to enable issues for this repository or `false` to disable them.",
  8745. "type": "boolean",
  8746. "x-go-name": "HasIssues"
  8747. },
  8748. "has_pull_requests": {
  8749. "description": "either `true` to allow pull requests, or `false` to prevent pull request.",
  8750. "type": "boolean",
  8751. "x-go-name": "HasPullRequests"
  8752. },
  8753. "has_wiki": {
  8754. "description": "either `true` to enable the wiki for this repository or `false` to disable it.",
  8755. "type": "boolean",
  8756. "x-go-name": "HasWiki"
  8757. },
  8758. "ignore_whitespace_conflicts": {
  8759. "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.",
  8760. "type": "boolean",
  8761. "x-go-name": "IgnoreWhitespaceConflicts"
  8762. },
  8763. "internal_tracker": {
  8764. "$ref": "#/definitions/InternalTracker"
  8765. },
  8766. "name": {
  8767. "description": "name of the repository",
  8768. "type": "string",
  8769. "uniqueItems": true,
  8770. "x-go-name": "Name"
  8771. },
  8772. "private": {
  8773. "description": "either `true` to make the repository private or `false` to make it public.\nNote: you will get a 422 error if the organization restricts changing repository visibility to organization\nowners and a non-owner tries to change the value of private.",
  8774. "type": "boolean",
  8775. "x-go-name": "Private"
  8776. },
  8777. "website": {
  8778. "description": "a URL with more information about the repository.",
  8779. "type": "string",
  8780. "x-go-name": "Website"
  8781. }
  8782. },
  8783. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8784. },
  8785. "EditTeamOption": {
  8786. "description": "EditTeamOption options for editing a team",
  8787. "type": "object",
  8788. "required": [
  8789. "name"
  8790. ],
  8791. "properties": {
  8792. "description": {
  8793. "type": "string",
  8794. "x-go-name": "Description"
  8795. },
  8796. "name": {
  8797. "type": "string",
  8798. "x-go-name": "Name"
  8799. },
  8800. "permission": {
  8801. "type": "string",
  8802. "enum": [
  8803. "read",
  8804. "write",
  8805. "admin"
  8806. ],
  8807. "x-go-name": "Permission"
  8808. },
  8809. "units": {
  8810. "type": "array",
  8811. "items": {
  8812. "type": "string"
  8813. },
  8814. "x-go-name": "Units",
  8815. "example": [
  8816. "repo.code",
  8817. "repo.issues",
  8818. "repo.ext_issues",
  8819. "repo.wiki",
  8820. "repo.pulls",
  8821. "repo.releases",
  8822. "repo.ext_wiki"
  8823. ]
  8824. }
  8825. },
  8826. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8827. },
  8828. "EditUserOption": {
  8829. "description": "EditUserOption edit user options",
  8830. "type": "object",
  8831. "required": [
  8832. "email"
  8833. ],
  8834. "properties": {
  8835. "active": {
  8836. "type": "boolean",
  8837. "x-go-name": "Active"
  8838. },
  8839. "admin": {
  8840. "type": "boolean",
  8841. "x-go-name": "Admin"
  8842. },
  8843. "allow_create_organization": {
  8844. "type": "boolean",
  8845. "x-go-name": "AllowCreateOrganization"
  8846. },
  8847. "allow_git_hook": {
  8848. "type": "boolean",
  8849. "x-go-name": "AllowGitHook"
  8850. },
  8851. "allow_import_local": {
  8852. "type": "boolean",
  8853. "x-go-name": "AllowImportLocal"
  8854. },
  8855. "email": {
  8856. "type": "string",
  8857. "format": "email",
  8858. "x-go-name": "Email"
  8859. },
  8860. "full_name": {
  8861. "type": "string",
  8862. "x-go-name": "FullName"
  8863. },
  8864. "location": {
  8865. "type": "string",
  8866. "x-go-name": "Location"
  8867. },
  8868. "login_name": {
  8869. "type": "string",
  8870. "x-go-name": "LoginName"
  8871. },
  8872. "max_repo_creation": {
  8873. "type": "integer",
  8874. "format": "int64",
  8875. "x-go-name": "MaxRepoCreation"
  8876. },
  8877. "must_change_password": {
  8878. "type": "boolean",
  8879. "x-go-name": "MustChangePassword"
  8880. },
  8881. "password": {
  8882. "type": "string",
  8883. "x-go-name": "Password"
  8884. },
  8885. "prohibit_login": {
  8886. "type": "boolean",
  8887. "x-go-name": "ProhibitLogin"
  8888. },
  8889. "source_id": {
  8890. "type": "integer",
  8891. "format": "int64",
  8892. "x-go-name": "SourceID"
  8893. },
  8894. "website": {
  8895. "type": "string",
  8896. "x-go-name": "Website"
  8897. }
  8898. },
  8899. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8900. },
  8901. "Email": {
  8902. "description": "Email an email address belonging to a user",
  8903. "type": "object",
  8904. "properties": {
  8905. "email": {
  8906. "type": "string",
  8907. "format": "email",
  8908. "x-go-name": "Email"
  8909. },
  8910. "primary": {
  8911. "type": "boolean",
  8912. "x-go-name": "Primary"
  8913. },
  8914. "verified": {
  8915. "type": "boolean",
  8916. "x-go-name": "Verified"
  8917. }
  8918. },
  8919. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8920. },
  8921. "ExternalTracker": {
  8922. "description": "ExternalTracker represents settings for external tracker",
  8923. "type": "object",
  8924. "properties": {
  8925. "external_tracker_format": {
  8926. "description": "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.",
  8927. "type": "string",
  8928. "x-go-name": "ExternalTrackerFormat"
  8929. },
  8930. "external_tracker_style": {
  8931. "description": "External Issue Tracker Number Format, either `numeric` or `alphanumeric`",
  8932. "type": "string",
  8933. "x-go-name": "ExternalTrackerStyle"
  8934. },
  8935. "external_tracker_url": {
  8936. "description": "URL of external issue tracker.",
  8937. "type": "string",
  8938. "x-go-name": "ExternalTrackerURL"
  8939. }
  8940. },
  8941. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8942. },
  8943. "ExternalWiki": {
  8944. "description": "ExternalWiki represents setting for external wiki",
  8945. "type": "object",
  8946. "properties": {
  8947. "external_wiki_url": {
  8948. "description": "URL of external wiki.",
  8949. "type": "string",
  8950. "x-go-name": "ExternalWikiURL"
  8951. }
  8952. },
  8953. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8954. },
  8955. "FileCommitResponse": {
  8956. "type": "object",
  8957. "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.",
  8958. "properties": {
  8959. "author": {
  8960. "$ref": "#/definitions/CommitUser"
  8961. },
  8962. "committer": {
  8963. "$ref": "#/definitions/CommitUser"
  8964. },
  8965. "html_url": {
  8966. "type": "string",
  8967. "x-go-name": "HTMLURL"
  8968. },
  8969. "message": {
  8970. "type": "string",
  8971. "x-go-name": "Message"
  8972. },
  8973. "parents": {
  8974. "type": "array",
  8975. "items": {
  8976. "$ref": "#/definitions/CommitMeta"
  8977. },
  8978. "x-go-name": "Parents"
  8979. },
  8980. "sha": {
  8981. "type": "string",
  8982. "x-go-name": "SHA"
  8983. },
  8984. "tree": {
  8985. "$ref": "#/definitions/CommitMeta"
  8986. },
  8987. "url": {
  8988. "type": "string",
  8989. "x-go-name": "URL"
  8990. }
  8991. },
  8992. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8993. },
  8994. "FileDeleteResponse": {
  8995. "description": "FileDeleteResponse contains information about a repo's file that was deleted",
  8996. "type": "object",
  8997. "properties": {
  8998. "commit": {
  8999. "$ref": "#/definitions/FileCommitResponse"
  9000. },
  9001. "content": {
  9002. "type": "object",
  9003. "x-go-name": "Content"
  9004. },
  9005. "verification": {
  9006. "$ref": "#/definitions/PayloadCommitVerification"
  9007. }
  9008. },
  9009. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9010. },
  9011. "FileLinksResponse": {
  9012. "description": "FileLinksResponse contains the links for a repo's file",
  9013. "type": "object",
  9014. "properties": {
  9015. "git": {
  9016. "type": "string",
  9017. "x-go-name": "GitURL"
  9018. },
  9019. "html": {
  9020. "type": "string",
  9021. "x-go-name": "HTMLURL"
  9022. },
  9023. "self": {
  9024. "type": "string",
  9025. "x-go-name": "Self"
  9026. }
  9027. },
  9028. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9029. },
  9030. "FileResponse": {
  9031. "description": "FileResponse contains information about a repo's file",
  9032. "type": "object",
  9033. "properties": {
  9034. "commit": {
  9035. "$ref": "#/definitions/FileCommitResponse"
  9036. },
  9037. "content": {
  9038. "$ref": "#/definitions/ContentsResponse"
  9039. },
  9040. "verification": {
  9041. "$ref": "#/definitions/PayloadCommitVerification"
  9042. }
  9043. },
  9044. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9045. },
  9046. "GPGKey": {
  9047. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  9048. "type": "object",
  9049. "properties": {
  9050. "can_certify": {
  9051. "type": "boolean",
  9052. "x-go-name": "CanCertify"
  9053. },
  9054. "can_encrypt_comms": {
  9055. "type": "boolean",
  9056. "x-go-name": "CanEncryptComms"
  9057. },
  9058. "can_encrypt_storage": {
  9059. "type": "boolean",
  9060. "x-go-name": "CanEncryptStorage"
  9061. },
  9062. "can_sign": {
  9063. "type": "boolean",
  9064. "x-go-name": "CanSign"
  9065. },
  9066. "created_at": {
  9067. "type": "string",
  9068. "format": "date-time",
  9069. "x-go-name": "Created"
  9070. },
  9071. "emails": {
  9072. "type": "array",
  9073. "items": {
  9074. "$ref": "#/definitions/GPGKeyEmail"
  9075. },
  9076. "x-go-name": "Emails"
  9077. },
  9078. "expires_at": {
  9079. "type": "string",
  9080. "format": "date-time",
  9081. "x-go-name": "Expires"
  9082. },
  9083. "id": {
  9084. "type": "integer",
  9085. "format": "int64",
  9086. "x-go-name": "ID"
  9087. },
  9088. "key_id": {
  9089. "type": "string",
  9090. "x-go-name": "KeyID"
  9091. },
  9092. "primary_key_id": {
  9093. "type": "string",
  9094. "x-go-name": "PrimaryKeyID"
  9095. },
  9096. "public_key": {
  9097. "type": "string",
  9098. "x-go-name": "PublicKey"
  9099. },
  9100. "subkeys": {
  9101. "type": "array",
  9102. "items": {
  9103. "$ref": "#/definitions/GPGKey"
  9104. },
  9105. "x-go-name": "SubsKey"
  9106. }
  9107. },
  9108. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9109. },
  9110. "GPGKeyEmail": {
  9111. "description": "GPGKeyEmail an email attached to a GPGKey",
  9112. "type": "object",
  9113. "properties": {
  9114. "email": {
  9115. "type": "string",
  9116. "x-go-name": "Email"
  9117. },
  9118. "verified": {
  9119. "type": "boolean",
  9120. "x-go-name": "Verified"
  9121. }
  9122. },
  9123. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9124. },
  9125. "GitBlobResponse": {
  9126. "description": "GitBlobResponse represents a git blob",
  9127. "type": "object",
  9128. "properties": {
  9129. "content": {
  9130. "type": "string",
  9131. "x-go-name": "Content"
  9132. },
  9133. "encoding": {
  9134. "type": "string",
  9135. "x-go-name": "Encoding"
  9136. },
  9137. "sha": {
  9138. "type": "string",
  9139. "x-go-name": "SHA"
  9140. },
  9141. "size": {
  9142. "type": "integer",
  9143. "format": "int64",
  9144. "x-go-name": "Size"
  9145. },
  9146. "url": {
  9147. "type": "string",
  9148. "x-go-name": "URL"
  9149. }
  9150. },
  9151. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9152. },
  9153. "GitEntry": {
  9154. "description": "GitEntry represents a git tree",
  9155. "type": "object",
  9156. "properties": {
  9157. "mode": {
  9158. "type": "string",
  9159. "x-go-name": "Mode"
  9160. },
  9161. "path": {
  9162. "type": "string",
  9163. "x-go-name": "Path"
  9164. },
  9165. "sha": {
  9166. "type": "string",
  9167. "x-go-name": "SHA"
  9168. },
  9169. "size": {
  9170. "type": "integer",
  9171. "format": "int64",
  9172. "x-go-name": "Size"
  9173. },
  9174. "type": {
  9175. "type": "string",
  9176. "x-go-name": "Type"
  9177. },
  9178. "url": {
  9179. "type": "string",
  9180. "x-go-name": "URL"
  9181. }
  9182. },
  9183. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9184. },
  9185. "GitHook": {
  9186. "description": "GitHook represents a Git repository hook",
  9187. "type": "object",
  9188. "properties": {
  9189. "content": {
  9190. "type": "string",
  9191. "x-go-name": "Content"
  9192. },
  9193. "is_active": {
  9194. "type": "boolean",
  9195. "x-go-name": "IsActive"
  9196. },
  9197. "name": {
  9198. "type": "string",
  9199. "x-go-name": "Name"
  9200. }
  9201. },
  9202. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9203. },
  9204. "GitObject": {
  9205. "type": "object",
  9206. "title": "GitObject represents a Git object.",
  9207. "properties": {
  9208. "sha": {
  9209. "type": "string",
  9210. "x-go-name": "SHA"
  9211. },
  9212. "type": {
  9213. "type": "string",
  9214. "x-go-name": "Type"
  9215. },
  9216. "url": {
  9217. "type": "string",
  9218. "x-go-name": "URL"
  9219. }
  9220. },
  9221. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9222. },
  9223. "GitTreeResponse": {
  9224. "description": "GitTreeResponse returns a git tree",
  9225. "type": "object",
  9226. "properties": {
  9227. "page": {
  9228. "type": "integer",
  9229. "format": "int64",
  9230. "x-go-name": "Page"
  9231. },
  9232. "sha": {
  9233. "type": "string",
  9234. "x-go-name": "SHA"
  9235. },
  9236. "total_count": {
  9237. "type": "integer",
  9238. "format": "int64",
  9239. "x-go-name": "TotalCount"
  9240. },
  9241. "tree": {
  9242. "type": "array",
  9243. "items": {
  9244. "$ref": "#/definitions/GitEntry"
  9245. },
  9246. "x-go-name": "Entries"
  9247. },
  9248. "truncated": {
  9249. "type": "boolean",
  9250. "x-go-name": "Truncated"
  9251. },
  9252. "url": {
  9253. "type": "string",
  9254. "x-go-name": "URL"
  9255. }
  9256. },
  9257. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9258. },
  9259. "Hook": {
  9260. "description": "Hook a hook is a web hook when one repository changed",
  9261. "type": "object",
  9262. "properties": {
  9263. "active": {
  9264. "type": "boolean",
  9265. "x-go-name": "Active"
  9266. },
  9267. "config": {
  9268. "type": "object",
  9269. "additionalProperties": {
  9270. "type": "string"
  9271. },
  9272. "x-go-name": "Config"
  9273. },
  9274. "created_at": {
  9275. "type": "string",
  9276. "format": "date-time",
  9277. "x-go-name": "Created"
  9278. },
  9279. "events": {
  9280. "type": "array",
  9281. "items": {
  9282. "type": "string"
  9283. },
  9284. "x-go-name": "Events"
  9285. },
  9286. "id": {
  9287. "type": "integer",
  9288. "format": "int64",
  9289. "x-go-name": "ID"
  9290. },
  9291. "type": {
  9292. "type": "string",
  9293. "x-go-name": "Type"
  9294. },
  9295. "updated_at": {
  9296. "type": "string",
  9297. "format": "date-time",
  9298. "x-go-name": "Updated"
  9299. }
  9300. },
  9301. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9302. },
  9303. "Identity": {
  9304. "description": "Identity for a person's identity like an author or committer",
  9305. "type": "object",
  9306. "properties": {
  9307. "email": {
  9308. "type": "string",
  9309. "format": "email",
  9310. "x-go-name": "Email"
  9311. },
  9312. "name": {
  9313. "type": "string",
  9314. "x-go-name": "Name"
  9315. }
  9316. },
  9317. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9318. },
  9319. "InternalTracker": {
  9320. "description": "InternalTracker represents settings for internal tracker",
  9321. "type": "object",
  9322. "properties": {
  9323. "allow_only_contributors_to_track_time": {
  9324. "description": "Let only contributors track time (Built-in issue tracker)",
  9325. "type": "boolean",
  9326. "x-go-name": "AllowOnlyContributorsToTrackTime"
  9327. },
  9328. "enable_issue_dependencies": {
  9329. "description": "Enable dependencies for issues and pull requests (Built-in issue tracker)",
  9330. "type": "boolean",
  9331. "x-go-name": "EnableIssueDependencies"
  9332. },
  9333. "enable_time_tracker": {
  9334. "description": "Enable time tracking (Built-in issue tracker)",
  9335. "type": "boolean",
  9336. "x-go-name": "EnableTimeTracker"
  9337. }
  9338. },
  9339. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9340. },
  9341. "Issue": {
  9342. "description": "Issue represents an issue in a repository",
  9343. "type": "object",
  9344. "properties": {
  9345. "assignee": {
  9346. "$ref": "#/definitions/User"
  9347. },
  9348. "assignees": {
  9349. "type": "array",
  9350. "items": {
  9351. "$ref": "#/definitions/User"
  9352. },
  9353. "x-go-name": "Assignees"
  9354. },
  9355. "body": {
  9356. "type": "string",
  9357. "x-go-name": "Body"
  9358. },
  9359. "closed_at": {
  9360. "type": "string",
  9361. "format": "date-time",
  9362. "x-go-name": "Closed"
  9363. },
  9364. "comments": {
  9365. "type": "integer",
  9366. "format": "int64",
  9367. "x-go-name": "Comments"
  9368. },
  9369. "created_at": {
  9370. "type": "string",
  9371. "format": "date-time",
  9372. "x-go-name": "Created"
  9373. },
  9374. "due_date": {
  9375. "type": "string",
  9376. "format": "date-time",
  9377. "x-go-name": "Deadline"
  9378. },
  9379. "id": {
  9380. "type": "integer",
  9381. "format": "int64",
  9382. "x-go-name": "ID"
  9383. },
  9384. "labels": {
  9385. "type": "array",
  9386. "items": {
  9387. "$ref": "#/definitions/Label"
  9388. },
  9389. "x-go-name": "Labels"
  9390. },
  9391. "milestone": {
  9392. "$ref": "#/definitions/Milestone"
  9393. },
  9394. "number": {
  9395. "type": "integer",
  9396. "format": "int64",
  9397. "x-go-name": "Index"
  9398. },
  9399. "original_author": {
  9400. "type": "string",
  9401. "x-go-name": "OriginalAuthor"
  9402. },
  9403. "original_author_id": {
  9404. "type": "integer",
  9405. "format": "int64",
  9406. "x-go-name": "OriginalAuthorID"
  9407. },
  9408. "pull_request": {
  9409. "$ref": "#/definitions/PullRequestMeta"
  9410. },
  9411. "repository": {
  9412. "$ref": "#/definitions/RepositoryMeta"
  9413. },
  9414. "state": {
  9415. "$ref": "#/definitions/StateType"
  9416. },
  9417. "title": {
  9418. "type": "string",
  9419. "x-go-name": "Title"
  9420. },
  9421. "updated_at": {
  9422. "type": "string",
  9423. "format": "date-time",
  9424. "x-go-name": "Updated"
  9425. },
  9426. "url": {
  9427. "type": "string",
  9428. "x-go-name": "URL"
  9429. },
  9430. "user": {
  9431. "$ref": "#/definitions/User"
  9432. }
  9433. },
  9434. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9435. },
  9436. "IssueDeadline": {
  9437. "description": "IssueDeadline represents an issue deadline",
  9438. "type": "object",
  9439. "properties": {
  9440. "due_date": {
  9441. "type": "string",
  9442. "format": "date-time",
  9443. "x-go-name": "Deadline"
  9444. }
  9445. },
  9446. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9447. },
  9448. "IssueLabelsOption": {
  9449. "description": "IssueLabelsOption a collection of labels",
  9450. "type": "object",
  9451. "properties": {
  9452. "labels": {
  9453. "description": "list of label IDs",
  9454. "type": "array",
  9455. "items": {
  9456. "type": "integer",
  9457. "format": "int64"
  9458. },
  9459. "x-go-name": "Labels"
  9460. }
  9461. },
  9462. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9463. },
  9464. "Label": {
  9465. "description": "Label a label to an issue or a pr",
  9466. "type": "object",
  9467. "properties": {
  9468. "color": {
  9469. "type": "string",
  9470. "x-go-name": "Color",
  9471. "example": "00aabb"
  9472. },
  9473. "description": {
  9474. "type": "string",
  9475. "x-go-name": "Description"
  9476. },
  9477. "id": {
  9478. "type": "integer",
  9479. "format": "int64",
  9480. "x-go-name": "ID"
  9481. },
  9482. "name": {
  9483. "type": "string",
  9484. "x-go-name": "Name"
  9485. },
  9486. "url": {
  9487. "type": "string",
  9488. "x-go-name": "URL"
  9489. }
  9490. },
  9491. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9492. },
  9493. "MarkdownOption": {
  9494. "description": "MarkdownOption markdown options",
  9495. "type": "object",
  9496. "properties": {
  9497. "Context": {
  9498. "description": "Context to render\n\nin: body",
  9499. "type": "string"
  9500. },
  9501. "Mode": {
  9502. "description": "Mode to render\n\nin: body",
  9503. "type": "string"
  9504. },
  9505. "Text": {
  9506. "description": "Text markdown to render\n\nin: body",
  9507. "type": "string"
  9508. },
  9509. "Wiki": {
  9510. "description": "Is it a wiki page ?\n\nin: body",
  9511. "type": "boolean"
  9512. }
  9513. },
  9514. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9515. },
  9516. "MergePullRequestOption": {
  9517. "description": "MergePullRequestForm form for merging Pull Request",
  9518. "type": "object",
  9519. "required": [
  9520. "Do"
  9521. ],
  9522. "properties": {
  9523. "Do": {
  9524. "type": "string",
  9525. "enum": [
  9526. "merge",
  9527. "rebase",
  9528. "rebase-merge",
  9529. "squash"
  9530. ]
  9531. },
  9532. "MergeMessageField": {
  9533. "type": "string"
  9534. },
  9535. "MergeTitleField": {
  9536. "type": "string"
  9537. }
  9538. },
  9539. "x-go-name": "MergePullRequestForm",
  9540. "x-go-package": "code.gitea.io/gitea/modules/auth"
  9541. },
  9542. "MigrateRepoForm": {
  9543. "description": "MigrateRepoForm form for migrating repository",
  9544. "type": "object",
  9545. "required": [
  9546. "clone_addr",
  9547. "uid",
  9548. "repo_name"
  9549. ],
  9550. "properties": {
  9551. "auth_password": {
  9552. "type": "string",
  9553. "x-go-name": "AuthPassword"
  9554. },
  9555. "auth_username": {
  9556. "type": "string",
  9557. "x-go-name": "AuthUsername"
  9558. },
  9559. "clone_addr": {
  9560. "type": "string",
  9561. "x-go-name": "CloneAddr"
  9562. },
  9563. "description": {
  9564. "type": "string",
  9565. "x-go-name": "Description"
  9566. },
  9567. "issues": {
  9568. "type": "boolean",
  9569. "x-go-name": "Issues"
  9570. },
  9571. "labels": {
  9572. "type": "boolean",
  9573. "x-go-name": "Labels"
  9574. },
  9575. "milestones": {
  9576. "type": "boolean",
  9577. "x-go-name": "Milestones"
  9578. },
  9579. "mirror": {
  9580. "type": "boolean",
  9581. "x-go-name": "Mirror"
  9582. },
  9583. "private": {
  9584. "type": "boolean",
  9585. "x-go-name": "Private"
  9586. },
  9587. "pull_requests": {
  9588. "type": "boolean",
  9589. "x-go-name": "PullRequests"
  9590. },
  9591. "releases": {
  9592. "type": "boolean",
  9593. "x-go-name": "Releases"
  9594. },
  9595. "repo_name": {
  9596. "type": "string",
  9597. "x-go-name": "RepoName"
  9598. },
  9599. "uid": {
  9600. "type": "integer",
  9601. "format": "int64",
  9602. "x-go-name": "UID"
  9603. },
  9604. "wiki": {
  9605. "type": "boolean",
  9606. "x-go-name": "Wiki"
  9607. }
  9608. },
  9609. "x-go-package": "code.gitea.io/gitea/modules/auth"
  9610. },
  9611. "Milestone": {
  9612. "description": "Milestone milestone is a collection of issues on one repository",
  9613. "type": "object",
  9614. "properties": {
  9615. "closed_at": {
  9616. "type": "string",
  9617. "format": "date-time",
  9618. "x-go-name": "Closed"
  9619. },
  9620. "closed_issues": {
  9621. "type": "integer",
  9622. "format": "int64",
  9623. "x-go-name": "ClosedIssues"
  9624. },
  9625. "description": {
  9626. "type": "string",
  9627. "x-go-name": "Description"
  9628. },
  9629. "due_on": {
  9630. "type": "string",
  9631. "format": "date-time",
  9632. "x-go-name": "Deadline"
  9633. },
  9634. "id": {
  9635. "type": "integer",
  9636. "format": "int64",
  9637. "x-go-name": "ID"
  9638. },
  9639. "open_issues": {
  9640. "type": "integer",
  9641. "format": "int64",
  9642. "x-go-name": "OpenIssues"
  9643. },
  9644. "state": {
  9645. "$ref": "#/definitions/StateType"
  9646. },
  9647. "title": {
  9648. "type": "string",
  9649. "x-go-name": "Title"
  9650. }
  9651. },
  9652. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9653. },
  9654. "Organization": {
  9655. "description": "Organization represents an organization",
  9656. "type": "object",
  9657. "properties": {
  9658. "avatar_url": {
  9659. "type": "string",
  9660. "x-go-name": "AvatarURL"
  9661. },
  9662. "description": {
  9663. "type": "string",
  9664. "x-go-name": "Description"
  9665. },
  9666. "full_name": {
  9667. "type": "string",
  9668. "x-go-name": "FullName"
  9669. },
  9670. "id": {
  9671. "type": "integer",
  9672. "format": "int64",
  9673. "x-go-name": "ID"
  9674. },
  9675. "location": {
  9676. "type": "string",
  9677. "x-go-name": "Location"
  9678. },
  9679. "repo_admin_change_team_access": {
  9680. "type": "boolean",
  9681. "x-go-name": "RepoAdminChangeTeamAccess"
  9682. },
  9683. "username": {
  9684. "type": "string",
  9685. "x-go-name": "UserName"
  9686. },
  9687. "visibility": {
  9688. "type": "string",
  9689. "x-go-name": "Visibility"
  9690. },
  9691. "website": {
  9692. "type": "string",
  9693. "x-go-name": "Website"
  9694. }
  9695. },
  9696. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9697. },
  9698. "PRBranchInfo": {
  9699. "description": "PRBranchInfo information about a branch",
  9700. "type": "object",
  9701. "properties": {
  9702. "label": {
  9703. "type": "string",
  9704. "x-go-name": "Name"
  9705. },
  9706. "ref": {
  9707. "type": "string",
  9708. "x-go-name": "Ref"
  9709. },
  9710. "repo": {
  9711. "$ref": "#/definitions/Repository"
  9712. },
  9713. "repo_id": {
  9714. "type": "integer",
  9715. "format": "int64",
  9716. "x-go-name": "RepoID"
  9717. },
  9718. "sha": {
  9719. "type": "string",
  9720. "x-go-name": "Sha"
  9721. }
  9722. },
  9723. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9724. },
  9725. "PayloadCommit": {
  9726. "description": "PayloadCommit represents a commit",
  9727. "type": "object",
  9728. "properties": {
  9729. "added": {
  9730. "type": "array",
  9731. "items": {
  9732. "type": "string"
  9733. },
  9734. "x-go-name": "Added"
  9735. },
  9736. "author": {
  9737. "$ref": "#/definitions/PayloadUser"
  9738. },
  9739. "committer": {
  9740. "$ref": "#/definitions/PayloadUser"
  9741. },
  9742. "id": {
  9743. "description": "sha1 hash of the commit",
  9744. "type": "string",
  9745. "x-go-name": "ID"
  9746. },
  9747. "message": {
  9748. "type": "string",
  9749. "x-go-name": "Message"
  9750. },
  9751. "modified": {
  9752. "type": "array",
  9753. "items": {
  9754. "type": "string"
  9755. },
  9756. "x-go-name": "Modified"
  9757. },
  9758. "removed": {
  9759. "type": "array",
  9760. "items": {
  9761. "type": "string"
  9762. },
  9763. "x-go-name": "Removed"
  9764. },
  9765. "timestamp": {
  9766. "type": "string",
  9767. "format": "date-time",
  9768. "x-go-name": "Timestamp"
  9769. },
  9770. "url": {
  9771. "type": "string",
  9772. "x-go-name": "URL"
  9773. },
  9774. "verification": {
  9775. "$ref": "#/definitions/PayloadCommitVerification"
  9776. }
  9777. },
  9778. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9779. },
  9780. "PayloadCommitVerification": {
  9781. "description": "PayloadCommitVerification represents the GPG verification of a commit",
  9782. "type": "object",
  9783. "properties": {
  9784. "payload": {
  9785. "type": "string",
  9786. "x-go-name": "Payload"
  9787. },
  9788. "reason": {
  9789. "type": "string",
  9790. "x-go-name": "Reason"
  9791. },
  9792. "signature": {
  9793. "type": "string",
  9794. "x-go-name": "Signature"
  9795. },
  9796. "signer": {
  9797. "$ref": "#/definitions/PayloadUser"
  9798. },
  9799. "verified": {
  9800. "type": "boolean",
  9801. "x-go-name": "Verified"
  9802. }
  9803. },
  9804. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9805. },
  9806. "PayloadUser": {
  9807. "description": "PayloadUser represents the author or committer of a commit",
  9808. "type": "object",
  9809. "properties": {
  9810. "email": {
  9811. "type": "string",
  9812. "format": "email",
  9813. "x-go-name": "Email"
  9814. },
  9815. "name": {
  9816. "description": "Full name of the commit author",
  9817. "type": "string",
  9818. "x-go-name": "Name"
  9819. },
  9820. "username": {
  9821. "type": "string",
  9822. "x-go-name": "UserName"
  9823. }
  9824. },
  9825. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9826. },
  9827. "Permission": {
  9828. "description": "Permission represents a set of permissions",
  9829. "type": "object",
  9830. "properties": {
  9831. "admin": {
  9832. "type": "boolean",
  9833. "x-go-name": "Admin"
  9834. },
  9835. "pull": {
  9836. "type": "boolean",
  9837. "x-go-name": "Pull"
  9838. },
  9839. "push": {
  9840. "type": "boolean",
  9841. "x-go-name": "Push"
  9842. }
  9843. },
  9844. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9845. },
  9846. "PublicKey": {
  9847. "description": "PublicKey publickey is a user key to push code to repository",
  9848. "type": "object",
  9849. "properties": {
  9850. "created_at": {
  9851. "type": "string",
  9852. "format": "date-time",
  9853. "x-go-name": "Created"
  9854. },
  9855. "fingerprint": {
  9856. "type": "string",
  9857. "x-go-name": "Fingerprint"
  9858. },
  9859. "id": {
  9860. "type": "integer",
  9861. "format": "int64",
  9862. "x-go-name": "ID"
  9863. },
  9864. "key": {
  9865. "type": "string",
  9866. "x-go-name": "Key"
  9867. },
  9868. "key_type": {
  9869. "type": "string",
  9870. "x-go-name": "KeyType"
  9871. },
  9872. "read_only": {
  9873. "type": "boolean",
  9874. "x-go-name": "ReadOnly"
  9875. },
  9876. "title": {
  9877. "type": "string",
  9878. "x-go-name": "Title"
  9879. },
  9880. "url": {
  9881. "type": "string",
  9882. "x-go-name": "URL"
  9883. },
  9884. "user": {
  9885. "$ref": "#/definitions/User"
  9886. }
  9887. },
  9888. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9889. },
  9890. "PullRequest": {
  9891. "description": "PullRequest represents a pull request",
  9892. "type": "object",
  9893. "properties": {
  9894. "assignee": {
  9895. "$ref": "#/definitions/User"
  9896. },
  9897. "assignees": {
  9898. "type": "array",
  9899. "items": {
  9900. "$ref": "#/definitions/User"
  9901. },
  9902. "x-go-name": "Assignees"
  9903. },
  9904. "base": {
  9905. "$ref": "#/definitions/PRBranchInfo"
  9906. },
  9907. "body": {
  9908. "type": "string",
  9909. "x-go-name": "Body"
  9910. },
  9911. "closed_at": {
  9912. "type": "string",
  9913. "format": "date-time",
  9914. "x-go-name": "Closed"
  9915. },
  9916. "comments": {
  9917. "type": "integer",
  9918. "format": "int64",
  9919. "x-go-name": "Comments"
  9920. },
  9921. "created_at": {
  9922. "type": "string",
  9923. "format": "date-time",
  9924. "x-go-name": "Created"
  9925. },
  9926. "diff_url": {
  9927. "type": "string",
  9928. "x-go-name": "DiffURL"
  9929. },
  9930. "due_date": {
  9931. "type": "string",
  9932. "format": "date-time",
  9933. "x-go-name": "Deadline"
  9934. },
  9935. "head": {
  9936. "$ref": "#/definitions/PRBranchInfo"
  9937. },
  9938. "html_url": {
  9939. "type": "string",
  9940. "x-go-name": "HTMLURL"
  9941. },
  9942. "id": {
  9943. "type": "integer",
  9944. "format": "int64",
  9945. "x-go-name": "ID"
  9946. },
  9947. "labels": {
  9948. "type": "array",
  9949. "items": {
  9950. "$ref": "#/definitions/Label"
  9951. },
  9952. "x-go-name": "Labels"
  9953. },
  9954. "merge_base": {
  9955. "type": "string",
  9956. "x-go-name": "MergeBase"
  9957. },
  9958. "merge_commit_sha": {
  9959. "type": "string",
  9960. "x-go-name": "MergedCommitID"
  9961. },
  9962. "mergeable": {
  9963. "type": "boolean",
  9964. "x-go-name": "Mergeable"
  9965. },
  9966. "merged": {
  9967. "type": "boolean",
  9968. "x-go-name": "HasMerged"
  9969. },
  9970. "merged_at": {
  9971. "type": "string",
  9972. "format": "date-time",
  9973. "x-go-name": "Merged"
  9974. },
  9975. "merged_by": {
  9976. "$ref": "#/definitions/User"
  9977. },
  9978. "milestone": {
  9979. "$ref": "#/definitions/Milestone"
  9980. },
  9981. "number": {
  9982. "type": "integer",
  9983. "format": "int64",
  9984. "x-go-name": "Index"
  9985. },
  9986. "patch_url": {
  9987. "type": "string",
  9988. "x-go-name": "PatchURL"
  9989. },
  9990. "state": {
  9991. "$ref": "#/definitions/StateType"
  9992. },
  9993. "title": {
  9994. "type": "string",
  9995. "x-go-name": "Title"
  9996. },
  9997. "updated_at": {
  9998. "type": "string",
  9999. "format": "date-time",
  10000. "x-go-name": "Updated"
  10001. },
  10002. "url": {
  10003. "type": "string",
  10004. "x-go-name": "URL"
  10005. },
  10006. "user": {
  10007. "$ref": "#/definitions/User"
  10008. }
  10009. },
  10010. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10011. },
  10012. "PullRequestMeta": {
  10013. "description": "PullRequestMeta PR info if an issue is a PR",
  10014. "type": "object",
  10015. "properties": {
  10016. "merged": {
  10017. "type": "boolean",
  10018. "x-go-name": "HasMerged"
  10019. },
  10020. "merged_at": {
  10021. "type": "string",
  10022. "format": "date-time",
  10023. "x-go-name": "Merged"
  10024. }
  10025. },
  10026. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10027. },
  10028. "Reference": {
  10029. "type": "object",
  10030. "title": "Reference represents a Git reference.",
  10031. "properties": {
  10032. "object": {
  10033. "$ref": "#/definitions/GitObject"
  10034. },
  10035. "ref": {
  10036. "type": "string",
  10037. "x-go-name": "Ref"
  10038. },
  10039. "url": {
  10040. "type": "string",
  10041. "x-go-name": "URL"
  10042. }
  10043. },
  10044. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10045. },
  10046. "Release": {
  10047. "description": "Release represents a repository release",
  10048. "type": "object",
  10049. "properties": {
  10050. "assets": {
  10051. "type": "array",
  10052. "items": {
  10053. "$ref": "#/definitions/Attachment"
  10054. },
  10055. "x-go-name": "Attachments"
  10056. },
  10057. "author": {
  10058. "$ref": "#/definitions/User"
  10059. },
  10060. "body": {
  10061. "type": "string",
  10062. "x-go-name": "Note"
  10063. },
  10064. "created_at": {
  10065. "type": "string",
  10066. "format": "date-time",
  10067. "x-go-name": "CreatedAt"
  10068. },
  10069. "draft": {
  10070. "type": "boolean",
  10071. "x-go-name": "IsDraft"
  10072. },
  10073. "id": {
  10074. "type": "integer",
  10075. "format": "int64",
  10076. "x-go-name": "ID"
  10077. },
  10078. "name": {
  10079. "type": "string",
  10080. "x-go-name": "Title"
  10081. },
  10082. "prerelease": {
  10083. "type": "boolean",
  10084. "x-go-name": "IsPrerelease"
  10085. },
  10086. "published_at": {
  10087. "type": "string",
  10088. "format": "date-time",
  10089. "x-go-name": "PublishedAt"
  10090. },
  10091. "tag_name": {
  10092. "type": "string",
  10093. "x-go-name": "TagName"
  10094. },
  10095. "tarball_url": {
  10096. "type": "string",
  10097. "x-go-name": "TarURL"
  10098. },
  10099. "target_commitish": {
  10100. "type": "string",
  10101. "x-go-name": "Target"
  10102. },
  10103. "url": {
  10104. "type": "string",
  10105. "x-go-name": "URL"
  10106. },
  10107. "zipball_url": {
  10108. "type": "string",
  10109. "x-go-name": "ZipURL"
  10110. }
  10111. },
  10112. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10113. },
  10114. "RepoCommit": {
  10115. "type": "object",
  10116. "title": "RepoCommit contains information of a commit in the context of a repository.",
  10117. "properties": {
  10118. "author": {
  10119. "$ref": "#/definitions/CommitUser"
  10120. },
  10121. "committer": {
  10122. "$ref": "#/definitions/CommitUser"
  10123. },
  10124. "message": {
  10125. "type": "string",
  10126. "x-go-name": "Message"
  10127. },
  10128. "tree": {
  10129. "$ref": "#/definitions/CommitMeta"
  10130. },
  10131. "url": {
  10132. "type": "string",
  10133. "x-go-name": "URL"
  10134. }
  10135. },
  10136. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10137. },
  10138. "RepoTopicOptions": {
  10139. "description": "RepoTopicOptions a collection of repo topic names",
  10140. "type": "object",
  10141. "properties": {
  10142. "topics": {
  10143. "description": "list of topic names",
  10144. "type": "array",
  10145. "items": {
  10146. "type": "string"
  10147. },
  10148. "x-go-name": "Topics"
  10149. }
  10150. },
  10151. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10152. },
  10153. "Repository": {
  10154. "description": "Repository represents a repository",
  10155. "type": "object",
  10156. "properties": {
  10157. "allow_merge_commits": {
  10158. "type": "boolean",
  10159. "x-go-name": "AllowMerge"
  10160. },
  10161. "allow_rebase": {
  10162. "type": "boolean",
  10163. "x-go-name": "AllowRebase"
  10164. },
  10165. "allow_rebase_explicit": {
  10166. "type": "boolean",
  10167. "x-go-name": "AllowRebaseMerge"
  10168. },
  10169. "allow_squash_merge": {
  10170. "type": "boolean",
  10171. "x-go-name": "AllowSquash"
  10172. },
  10173. "archived": {
  10174. "type": "boolean",
  10175. "x-go-name": "Archived"
  10176. },
  10177. "avatar_url": {
  10178. "type": "string",
  10179. "x-go-name": "AvatarURL"
  10180. },
  10181. "clone_url": {
  10182. "type": "string",
  10183. "x-go-name": "CloneURL"
  10184. },
  10185. "created_at": {
  10186. "type": "string",
  10187. "format": "date-time",
  10188. "x-go-name": "Created"
  10189. },
  10190. "default_branch": {
  10191. "type": "string",
  10192. "x-go-name": "DefaultBranch"
  10193. },
  10194. "description": {
  10195. "type": "string",
  10196. "x-go-name": "Description"
  10197. },
  10198. "empty": {
  10199. "type": "boolean",
  10200. "x-go-name": "Empty"
  10201. },
  10202. "external_tracker": {
  10203. "$ref": "#/definitions/ExternalTracker"
  10204. },
  10205. "external_wiki": {
  10206. "$ref": "#/definitions/ExternalWiki"
  10207. },
  10208. "fork": {
  10209. "type": "boolean",
  10210. "x-go-name": "Fork"
  10211. },
  10212. "forks_count": {
  10213. "type": "integer",
  10214. "format": "int64",
  10215. "x-go-name": "Forks"
  10216. },
  10217. "full_name": {
  10218. "type": "string",
  10219. "x-go-name": "FullName"
  10220. },
  10221. "has_issues": {
  10222. "type": "boolean",
  10223. "x-go-name": "HasIssues"
  10224. },
  10225. "has_pull_requests": {
  10226. "type": "boolean",
  10227. "x-go-name": "HasPullRequests"
  10228. },
  10229. "has_wiki": {
  10230. "type": "boolean",
  10231. "x-go-name": "HasWiki"
  10232. },
  10233. "html_url": {
  10234. "type": "string",
  10235. "x-go-name": "HTMLURL"
  10236. },
  10237. "id": {
  10238. "type": "integer",
  10239. "format": "int64",
  10240. "x-go-name": "ID"
  10241. },
  10242. "ignore_whitespace_conflicts": {
  10243. "type": "boolean",
  10244. "x-go-name": "IgnoreWhitespaceConflicts"
  10245. },
  10246. "internal_tracker": {
  10247. "$ref": "#/definitions/InternalTracker"
  10248. },
  10249. "mirror": {
  10250. "type": "boolean",
  10251. "x-go-name": "Mirror"
  10252. },
  10253. "name": {
  10254. "type": "string",
  10255. "x-go-name": "Name"
  10256. },
  10257. "open_issues_count": {
  10258. "type": "integer",
  10259. "format": "int64",
  10260. "x-go-name": "OpenIssues"
  10261. },
  10262. "original_url": {
  10263. "type": "string",
  10264. "x-go-name": "OriginalURL"
  10265. },
  10266. "owner": {
  10267. "$ref": "#/definitions/User"
  10268. },
  10269. "parent": {
  10270. "$ref": "#/definitions/Repository"
  10271. },
  10272. "permissions": {
  10273. "$ref": "#/definitions/Permission"
  10274. },
  10275. "private": {
  10276. "type": "boolean",
  10277. "x-go-name": "Private"
  10278. },
  10279. "size": {
  10280. "type": "integer",
  10281. "format": "int64",
  10282. "x-go-name": "Size"
  10283. },
  10284. "ssh_url": {
  10285. "type": "string",
  10286. "x-go-name": "SSHURL"
  10287. },
  10288. "stars_count": {
  10289. "type": "integer",
  10290. "format": "int64",
  10291. "x-go-name": "Stars"
  10292. },
  10293. "updated_at": {
  10294. "type": "string",
  10295. "format": "date-time",
  10296. "x-go-name": "Updated"
  10297. },
  10298. "watchers_count": {
  10299. "type": "integer",
  10300. "format": "int64",
  10301. "x-go-name": "Watchers"
  10302. },
  10303. "website": {
  10304. "type": "string",
  10305. "x-go-name": "Website"
  10306. }
  10307. },
  10308. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10309. },
  10310. "RepositoryMeta": {
  10311. "description": "RepositoryMeta basic repository information",
  10312. "type": "object",
  10313. "properties": {
  10314. "full_name": {
  10315. "type": "string",
  10316. "x-go-name": "FullName"
  10317. },
  10318. "id": {
  10319. "type": "integer",
  10320. "format": "int64",
  10321. "x-go-name": "ID"
  10322. },
  10323. "name": {
  10324. "type": "string",
  10325. "x-go-name": "Name"
  10326. }
  10327. },
  10328. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10329. },
  10330. "SearchResults": {
  10331. "description": "SearchResults results of a successful search",
  10332. "type": "object",
  10333. "properties": {
  10334. "data": {
  10335. "type": "array",
  10336. "items": {
  10337. "$ref": "#/definitions/Repository"
  10338. },
  10339. "x-go-name": "Data"
  10340. },
  10341. "ok": {
  10342. "type": "boolean",
  10343. "x-go-name": "OK"
  10344. }
  10345. },
  10346. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10347. },
  10348. "ServerVersion": {
  10349. "description": "ServerVersion wraps the version of the server",
  10350. "type": "object",
  10351. "properties": {
  10352. "version": {
  10353. "type": "string",
  10354. "x-go-name": "Version"
  10355. }
  10356. },
  10357. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10358. },
  10359. "StateType": {
  10360. "description": "StateType issue state type",
  10361. "type": "string",
  10362. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10363. },
  10364. "Status": {
  10365. "description": "Status holds a single Status of a single Commit",
  10366. "type": "object",
  10367. "properties": {
  10368. "context": {
  10369. "type": "string",
  10370. "x-go-name": "Context"
  10371. },
  10372. "created_at": {
  10373. "type": "string",
  10374. "format": "date-time",
  10375. "x-go-name": "Created"
  10376. },
  10377. "creator": {
  10378. "$ref": "#/definitions/User"
  10379. },
  10380. "description": {
  10381. "type": "string",
  10382. "x-go-name": "Description"
  10383. },
  10384. "id": {
  10385. "type": "integer",
  10386. "format": "int64",
  10387. "x-go-name": "ID"
  10388. },
  10389. "status": {
  10390. "$ref": "#/definitions/StatusState"
  10391. },
  10392. "target_url": {
  10393. "type": "string",
  10394. "x-go-name": "TargetURL"
  10395. },
  10396. "updated_at": {
  10397. "type": "string",
  10398. "format": "date-time",
  10399. "x-go-name": "Updated"
  10400. },
  10401. "url": {
  10402. "type": "string",
  10403. "x-go-name": "URL"
  10404. }
  10405. },
  10406. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10407. },
  10408. "StatusState": {
  10409. "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"",
  10410. "type": "string",
  10411. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10412. },
  10413. "Tag": {
  10414. "description": "Tag represents a repository tag",
  10415. "type": "object",
  10416. "properties": {
  10417. "commit": {
  10418. "$ref": "#/definitions/CommitMeta"
  10419. },
  10420. "id": {
  10421. "type": "string",
  10422. "x-go-name": "ID"
  10423. },
  10424. "name": {
  10425. "type": "string",
  10426. "x-go-name": "Name"
  10427. },
  10428. "tarball_url": {
  10429. "type": "string",
  10430. "x-go-name": "TarballURL"
  10431. },
  10432. "zipball_url": {
  10433. "type": "string",
  10434. "x-go-name": "ZipballURL"
  10435. }
  10436. },
  10437. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10438. },
  10439. "Team": {
  10440. "description": "Team represents a team in an organization",
  10441. "type": "object",
  10442. "properties": {
  10443. "description": {
  10444. "type": "string",
  10445. "x-go-name": "Description"
  10446. },
  10447. "id": {
  10448. "type": "integer",
  10449. "format": "int64",
  10450. "x-go-name": "ID"
  10451. },
  10452. "name": {
  10453. "type": "string",
  10454. "x-go-name": "Name"
  10455. },
  10456. "organization": {
  10457. "$ref": "#/definitions/Organization"
  10458. },
  10459. "permission": {
  10460. "type": "string",
  10461. "enum": [
  10462. "none",
  10463. "read",
  10464. "write",
  10465. "admin",
  10466. "owner"
  10467. ],
  10468. "x-go-name": "Permission"
  10469. },
  10470. "units": {
  10471. "type": "array",
  10472. "items": {
  10473. "type": "string"
  10474. },
  10475. "x-go-name": "Units",
  10476. "example": [
  10477. "repo.code",
  10478. "repo.issues",
  10479. "repo.ext_issues",
  10480. "repo.wiki",
  10481. "repo.pulls",
  10482. "repo.releases",
  10483. "repo.ext_wiki"
  10484. ]
  10485. }
  10486. },
  10487. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10488. },
  10489. "TimeStamp": {
  10490. "description": "TimeStamp defines a timestamp",
  10491. "type": "integer",
  10492. "format": "int64",
  10493. "x-go-package": "code.gitea.io/gitea/modules/timeutil"
  10494. },
  10495. "TopicName": {
  10496. "description": "TopicName a list of repo topic names",
  10497. "type": "object",
  10498. "properties": {
  10499. "topics": {
  10500. "type": "array",
  10501. "items": {
  10502. "type": "string"
  10503. },
  10504. "x-go-name": "TopicNames"
  10505. }
  10506. },
  10507. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10508. },
  10509. "TopicResponse": {
  10510. "description": "TopicResponse for returning topics",
  10511. "type": "object",
  10512. "properties": {
  10513. "created": {
  10514. "type": "string",
  10515. "format": "date-time",
  10516. "x-go-name": "Created"
  10517. },
  10518. "id": {
  10519. "type": "integer",
  10520. "format": "int64",
  10521. "x-go-name": "ID"
  10522. },
  10523. "repo_count": {
  10524. "type": "integer",
  10525. "format": "int64",
  10526. "x-go-name": "RepoCount"
  10527. },
  10528. "topic_name": {
  10529. "type": "string",
  10530. "x-go-name": "Name"
  10531. },
  10532. "updated": {
  10533. "type": "string",
  10534. "format": "date-time",
  10535. "x-go-name": "Updated"
  10536. }
  10537. },
  10538. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10539. },
  10540. "TrackedTime": {
  10541. "description": "TrackedTime worked time for an issue / pr",
  10542. "type": "object",
  10543. "properties": {
  10544. "created": {
  10545. "type": "string",
  10546. "format": "date-time",
  10547. "x-go-name": "Created"
  10548. },
  10549. "id": {
  10550. "type": "integer",
  10551. "format": "int64",
  10552. "x-go-name": "ID"
  10553. },
  10554. "issue_id": {
  10555. "type": "integer",
  10556. "format": "int64",
  10557. "x-go-name": "IssueID"
  10558. },
  10559. "time": {
  10560. "description": "Time in seconds",
  10561. "type": "integer",
  10562. "format": "int64",
  10563. "x-go-name": "Time"
  10564. },
  10565. "user_id": {
  10566. "type": "integer",
  10567. "format": "int64",
  10568. "x-go-name": "UserID"
  10569. }
  10570. },
  10571. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10572. },
  10573. "UpdateFileOptions": {
  10574. "description": "UpdateFileOptions options for updating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)",
  10575. "type": "object",
  10576. "required": [
  10577. "sha",
  10578. "content"
  10579. ],
  10580. "properties": {
  10581. "author": {
  10582. "$ref": "#/definitions/Identity"
  10583. },
  10584. "branch": {
  10585. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  10586. "type": "string",
  10587. "x-go-name": "BranchName"
  10588. },
  10589. "committer": {
  10590. "$ref": "#/definitions/Identity"
  10591. },
  10592. "content": {
  10593. "description": "content must be base64 encoded",
  10594. "type": "string",
  10595. "x-go-name": "Content"
  10596. },
  10597. "from_path": {
  10598. "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL",
  10599. "type": "string",
  10600. "x-go-name": "FromPath"
  10601. },
  10602. "message": {
  10603. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  10604. "type": "string",
  10605. "x-go-name": "Message"
  10606. },
  10607. "new_branch": {
  10608. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  10609. "type": "string",
  10610. "x-go-name": "NewBranchName"
  10611. },
  10612. "sha": {
  10613. "description": "sha is the SHA for the file that already exists",
  10614. "type": "string",
  10615. "x-go-name": "SHA"
  10616. }
  10617. },
  10618. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10619. },
  10620. "User": {
  10621. "description": "User represents a user",
  10622. "type": "object",
  10623. "properties": {
  10624. "avatar_url": {
  10625. "description": "URL to the user's avatar",
  10626. "type": "string",
  10627. "x-go-name": "AvatarURL"
  10628. },
  10629. "created": {
  10630. "type": "string",
  10631. "format": "date-time",
  10632. "x-go-name": "Created"
  10633. },
  10634. "email": {
  10635. "type": "string",
  10636. "format": "email",
  10637. "x-go-name": "Email"
  10638. },
  10639. "full_name": {
  10640. "description": "the user's full name",
  10641. "type": "string",
  10642. "x-go-name": "FullName"
  10643. },
  10644. "id": {
  10645. "description": "the user's id",
  10646. "type": "integer",
  10647. "format": "int64",
  10648. "x-go-name": "ID"
  10649. },
  10650. "is_admin": {
  10651. "description": "Is the user an administrator",
  10652. "type": "boolean",
  10653. "x-go-name": "IsAdmin"
  10654. },
  10655. "language": {
  10656. "description": "User locale",
  10657. "type": "string",
  10658. "x-go-name": "Language"
  10659. },
  10660. "last_login": {
  10661. "type": "string",
  10662. "format": "date-time",
  10663. "x-go-name": "LastLogin"
  10664. },
  10665. "login": {
  10666. "description": "the user's username",
  10667. "type": "string",
  10668. "x-go-name": "UserName"
  10669. }
  10670. },
  10671. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10672. },
  10673. "UserHeatmapData": {
  10674. "description": "UserHeatmapData represents the data needed to create a heatmap",
  10675. "type": "object",
  10676. "properties": {
  10677. "contributions": {
  10678. "type": "integer",
  10679. "format": "int64",
  10680. "x-go-name": "Contributions"
  10681. },
  10682. "timestamp": {
  10683. "$ref": "#/definitions/TimeStamp"
  10684. }
  10685. },
  10686. "x-go-package": "code.gitea.io/gitea/models"
  10687. },
  10688. "WatchInfo": {
  10689. "description": "WatchInfo represents an API watch status of one repository",
  10690. "type": "object",
  10691. "properties": {
  10692. "created_at": {
  10693. "type": "string",
  10694. "format": "date-time",
  10695. "x-go-name": "CreatedAt"
  10696. },
  10697. "ignored": {
  10698. "type": "boolean",
  10699. "x-go-name": "Ignored"
  10700. },
  10701. "reason": {
  10702. "type": "object",
  10703. "x-go-name": "Reason"
  10704. },
  10705. "repository_url": {
  10706. "type": "string",
  10707. "x-go-name": "RepositoryURL"
  10708. },
  10709. "subscribed": {
  10710. "type": "boolean",
  10711. "x-go-name": "Subscribed"
  10712. },
  10713. "url": {
  10714. "type": "string",
  10715. "x-go-name": "URL"
  10716. }
  10717. },
  10718. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10719. }
  10720. },
  10721. "responses": {
  10722. "AccessToken": {
  10723. "description": "AccessToken represents an API access token.",
  10724. "headers": {
  10725. "id": {
  10726. "type": "integer",
  10727. "format": "int64"
  10728. },
  10729. "name": {
  10730. "type": "string"
  10731. },
  10732. "sha1": {
  10733. "type": "string"
  10734. },
  10735. "token_last_eight": {
  10736. "type": "string"
  10737. }
  10738. }
  10739. },
  10740. "AccessTokenList": {
  10741. "description": "AccessTokenList represents a list of API access token.",
  10742. "schema": {
  10743. "type": "array",
  10744. "items": {
  10745. "$ref": "#/definitions/AccessToken"
  10746. }
  10747. }
  10748. },
  10749. "AnnotatedTag": {
  10750. "description": "AnnotatedTag",
  10751. "schema": {
  10752. "$ref": "#/definitions/AnnotatedTag"
  10753. }
  10754. },
  10755. "Attachment": {
  10756. "description": "Attachment",
  10757. "schema": {
  10758. "$ref": "#/definitions/Attachment"
  10759. }
  10760. },
  10761. "AttachmentList": {
  10762. "description": "AttachmentList",
  10763. "schema": {
  10764. "type": "array",
  10765. "items": {
  10766. "$ref": "#/definitions/Attachment"
  10767. }
  10768. }
  10769. },
  10770. "Branch": {
  10771. "description": "Branch",
  10772. "schema": {
  10773. "$ref": "#/definitions/Branch"
  10774. }
  10775. },
  10776. "BranchList": {
  10777. "description": "BranchList",
  10778. "schema": {
  10779. "type": "array",
  10780. "items": {
  10781. "$ref": "#/definitions/Branch"
  10782. }
  10783. }
  10784. },
  10785. "Comment": {
  10786. "description": "Comment",
  10787. "schema": {
  10788. "$ref": "#/definitions/Comment"
  10789. }
  10790. },
  10791. "CommentList": {
  10792. "description": "CommentList",
  10793. "schema": {
  10794. "type": "array",
  10795. "items": {
  10796. "$ref": "#/definitions/Comment"
  10797. }
  10798. }
  10799. },
  10800. "Commit": {
  10801. "description": "Commit",
  10802. "schema": {
  10803. "$ref": "#/definitions/Commit"
  10804. }
  10805. },
  10806. "CommitList": {
  10807. "description": "CommitList",
  10808. "schema": {
  10809. "type": "array",
  10810. "items": {
  10811. "$ref": "#/definitions/Commit"
  10812. }
  10813. },
  10814. "headers": {
  10815. "X-HasMore": {
  10816. "type": "boolean",
  10817. "description": "True if there is another page"
  10818. },
  10819. "X-Page": {
  10820. "type": "integer",
  10821. "format": "int64",
  10822. "description": "The current page"
  10823. },
  10824. "X-PageCount": {
  10825. "type": "integer",
  10826. "format": "int64",
  10827. "description": "Total number of pages"
  10828. },
  10829. "X-PerPage": {
  10830. "type": "integer",
  10831. "format": "int64",
  10832. "description": "Commits per page"
  10833. },
  10834. "X-Total": {
  10835. "type": "integer",
  10836. "format": "int64",
  10837. "description": "Total commit count"
  10838. }
  10839. }
  10840. },
  10841. "ContentsListResponse": {
  10842. "description": "ContentsListResponse",
  10843. "schema": {
  10844. "type": "array",
  10845. "items": {
  10846. "$ref": "#/definitions/ContentsResponse"
  10847. }
  10848. }
  10849. },
  10850. "ContentsResponse": {
  10851. "description": "ContentsResponse",
  10852. "schema": {
  10853. "$ref": "#/definitions/ContentsResponse"
  10854. }
  10855. },
  10856. "DeployKey": {
  10857. "description": "DeployKey",
  10858. "schema": {
  10859. "$ref": "#/definitions/DeployKey"
  10860. }
  10861. },
  10862. "DeployKeyList": {
  10863. "description": "DeployKeyList",
  10864. "schema": {
  10865. "type": "array",
  10866. "items": {
  10867. "$ref": "#/definitions/DeployKey"
  10868. }
  10869. }
  10870. },
  10871. "EmailList": {
  10872. "description": "EmailList",
  10873. "schema": {
  10874. "type": "array",
  10875. "items": {
  10876. "$ref": "#/definitions/Email"
  10877. }
  10878. }
  10879. },
  10880. "EmptyRepository": {
  10881. "description": "EmptyRepository",
  10882. "schema": {
  10883. "$ref": "#/definitions/APIError"
  10884. }
  10885. },
  10886. "FileDeleteResponse": {
  10887. "description": "FileDeleteResponse",
  10888. "schema": {
  10889. "$ref": "#/definitions/FileDeleteResponse"
  10890. }
  10891. },
  10892. "FileResponse": {
  10893. "description": "FileResponse",
  10894. "schema": {
  10895. "$ref": "#/definitions/FileResponse"
  10896. }
  10897. },
  10898. "GPGKey": {
  10899. "description": "GPGKey",
  10900. "schema": {
  10901. "$ref": "#/definitions/GPGKey"
  10902. }
  10903. },
  10904. "GPGKeyList": {
  10905. "description": "GPGKeyList",
  10906. "schema": {
  10907. "type": "array",
  10908. "items": {
  10909. "$ref": "#/definitions/GPGKey"
  10910. }
  10911. }
  10912. },
  10913. "GitBlobResponse": {
  10914. "description": "GitBlobResponse",
  10915. "schema": {
  10916. "$ref": "#/definitions/GitBlobResponse"
  10917. }
  10918. },
  10919. "GitHook": {
  10920. "description": "GitHook",
  10921. "schema": {
  10922. "$ref": "#/definitions/GitHook"
  10923. }
  10924. },
  10925. "GitHookList": {
  10926. "description": "GitHookList",
  10927. "schema": {
  10928. "type": "array",
  10929. "items": {
  10930. "$ref": "#/definitions/GitHook"
  10931. }
  10932. }
  10933. },
  10934. "GitTreeResponse": {
  10935. "description": "GitTreeResponse",
  10936. "schema": {
  10937. "$ref": "#/definitions/GitTreeResponse"
  10938. }
  10939. },
  10940. "Hook": {
  10941. "description": "Hook",
  10942. "schema": {
  10943. "$ref": "#/definitions/Hook"
  10944. }
  10945. },
  10946. "HookList": {
  10947. "description": "HookList",
  10948. "schema": {
  10949. "type": "array",
  10950. "items": {
  10951. "$ref": "#/definitions/Hook"
  10952. }
  10953. }
  10954. },
  10955. "Issue": {
  10956. "description": "Issue",
  10957. "schema": {
  10958. "$ref": "#/definitions/Issue"
  10959. }
  10960. },
  10961. "IssueDeadline": {
  10962. "description": "IssueDeadline",
  10963. "schema": {
  10964. "$ref": "#/definitions/IssueDeadline"
  10965. }
  10966. },
  10967. "IssueList": {
  10968. "description": "IssueList",
  10969. "schema": {
  10970. "type": "array",
  10971. "items": {
  10972. "$ref": "#/definitions/Issue"
  10973. }
  10974. }
  10975. },
  10976. "Label": {
  10977. "description": "Label",
  10978. "schema": {
  10979. "$ref": "#/definitions/Label"
  10980. }
  10981. },
  10982. "LabelList": {
  10983. "description": "LabelList",
  10984. "schema": {
  10985. "type": "array",
  10986. "items": {
  10987. "$ref": "#/definitions/Label"
  10988. }
  10989. }
  10990. },
  10991. "MarkdownRender": {
  10992. "description": "MarkdownRender is a rendered markdown document",
  10993. "schema": {
  10994. "type": "string"
  10995. }
  10996. },
  10997. "Milestone": {
  10998. "description": "Milestone",
  10999. "schema": {
  11000. "$ref": "#/definitions/Milestone"
  11001. }
  11002. },
  11003. "MilestoneList": {
  11004. "description": "MilestoneList",
  11005. "schema": {
  11006. "type": "array",
  11007. "items": {
  11008. "$ref": "#/definitions/Milestone"
  11009. }
  11010. }
  11011. },
  11012. "Organization": {
  11013. "description": "Organization",
  11014. "schema": {
  11015. "$ref": "#/definitions/Organization"
  11016. }
  11017. },
  11018. "OrganizationList": {
  11019. "description": "OrganizationList",
  11020. "schema": {
  11021. "type": "array",
  11022. "items": {
  11023. "$ref": "#/definitions/Organization"
  11024. }
  11025. }
  11026. },
  11027. "PublicKey": {
  11028. "description": "PublicKey",
  11029. "schema": {
  11030. "$ref": "#/definitions/PublicKey"
  11031. }
  11032. },
  11033. "PublicKeyList": {
  11034. "description": "PublicKeyList",
  11035. "schema": {
  11036. "type": "array",
  11037. "items": {
  11038. "$ref": "#/definitions/PublicKey"
  11039. }
  11040. }
  11041. },
  11042. "PullRequest": {
  11043. "description": "PullRequest",
  11044. "schema": {
  11045. "$ref": "#/definitions/PullRequest"
  11046. }
  11047. },
  11048. "PullRequestList": {
  11049. "description": "PullRequestList",
  11050. "schema": {
  11051. "type": "array",
  11052. "items": {
  11053. "$ref": "#/definitions/PullRequest"
  11054. }
  11055. }
  11056. },
  11057. "Reference": {
  11058. "description": "Reference",
  11059. "schema": {
  11060. "$ref": "#/definitions/Reference"
  11061. }
  11062. },
  11063. "ReferenceList": {
  11064. "description": "ReferenceList",
  11065. "schema": {
  11066. "type": "array",
  11067. "items": {
  11068. "$ref": "#/definitions/Reference"
  11069. }
  11070. }
  11071. },
  11072. "Release": {
  11073. "description": "Release",
  11074. "schema": {
  11075. "$ref": "#/definitions/Release"
  11076. }
  11077. },
  11078. "ReleaseList": {
  11079. "description": "ReleaseList",
  11080. "schema": {
  11081. "type": "array",
  11082. "items": {
  11083. "$ref": "#/definitions/Release"
  11084. }
  11085. }
  11086. },
  11087. "Repository": {
  11088. "description": "Repository",
  11089. "schema": {
  11090. "$ref": "#/definitions/Repository"
  11091. }
  11092. },
  11093. "RepositoryList": {
  11094. "description": "RepositoryList",
  11095. "schema": {
  11096. "type": "array",
  11097. "items": {
  11098. "$ref": "#/definitions/Repository"
  11099. }
  11100. }
  11101. },
  11102. "SearchResults": {
  11103. "description": "SearchResults",
  11104. "schema": {
  11105. "$ref": "#/definitions/SearchResults"
  11106. }
  11107. },
  11108. "ServerVersion": {
  11109. "description": "ServerVersion",
  11110. "schema": {
  11111. "$ref": "#/definitions/ServerVersion"
  11112. }
  11113. },
  11114. "Status": {
  11115. "description": "Status",
  11116. "schema": {
  11117. "$ref": "#/definitions/Status"
  11118. }
  11119. },
  11120. "StatusList": {
  11121. "description": "StatusList",
  11122. "schema": {
  11123. "type": "array",
  11124. "items": {
  11125. "$ref": "#/definitions/Status"
  11126. }
  11127. }
  11128. },
  11129. "Tag": {
  11130. "description": "Tag",
  11131. "schema": {
  11132. "$ref": "#/definitions/Tag"
  11133. }
  11134. },
  11135. "TagList": {
  11136. "description": "TagList",
  11137. "schema": {
  11138. "type": "array",
  11139. "items": {
  11140. "$ref": "#/definitions/Tag"
  11141. }
  11142. }
  11143. },
  11144. "Team": {
  11145. "description": "Team",
  11146. "schema": {
  11147. "$ref": "#/definitions/Team"
  11148. }
  11149. },
  11150. "TeamList": {
  11151. "description": "TeamList",
  11152. "schema": {
  11153. "type": "array",
  11154. "items": {
  11155. "$ref": "#/definitions/Team"
  11156. }
  11157. }
  11158. },
  11159. "TopicListResponse": {
  11160. "description": "TopicListResponse",
  11161. "schema": {
  11162. "type": "array",
  11163. "items": {
  11164. "$ref": "#/definitions/TopicResponse"
  11165. }
  11166. }
  11167. },
  11168. "TopicNames": {
  11169. "description": "TopicNames",
  11170. "schema": {
  11171. "$ref": "#/definitions/TopicName"
  11172. }
  11173. },
  11174. "TrackedTime": {
  11175. "description": "TrackedTime",
  11176. "schema": {
  11177. "$ref": "#/definitions/TrackedTime"
  11178. }
  11179. },
  11180. "TrackedTimeList": {
  11181. "description": "TrackedTimeList",
  11182. "schema": {
  11183. "type": "array",
  11184. "items": {
  11185. "$ref": "#/definitions/TrackedTime"
  11186. }
  11187. }
  11188. },
  11189. "User": {
  11190. "description": "User",
  11191. "schema": {
  11192. "$ref": "#/definitions/User"
  11193. }
  11194. },
  11195. "UserHeatmapData": {
  11196. "description": "UserHeatmapData",
  11197. "schema": {
  11198. "type": "array",
  11199. "items": {
  11200. "$ref": "#/definitions/UserHeatmapData"
  11201. }
  11202. }
  11203. },
  11204. "UserList": {
  11205. "description": "UserList",
  11206. "schema": {
  11207. "type": "array",
  11208. "items": {
  11209. "$ref": "#/definitions/User"
  11210. }
  11211. }
  11212. },
  11213. "WatchInfo": {
  11214. "description": "WatchInfo",
  11215. "schema": {
  11216. "$ref": "#/definitions/WatchInfo"
  11217. }
  11218. },
  11219. "empty": {
  11220. "description": "APIEmpty is an empty response"
  11221. },
  11222. "error": {
  11223. "description": "APIError is error format response",
  11224. "headers": {
  11225. "message": {
  11226. "type": "string"
  11227. },
  11228. "url": {
  11229. "type": "string"
  11230. }
  11231. }
  11232. },
  11233. "forbidden": {
  11234. "description": "APIForbiddenError is a forbidden error response",
  11235. "headers": {
  11236. "message": {
  11237. "type": "string"
  11238. },
  11239. "url": {
  11240. "type": "string"
  11241. }
  11242. }
  11243. },
  11244. "notFound": {
  11245. "description": "APINotFound is a not found empty response"
  11246. },
  11247. "parameterBodies": {
  11248. "description": "parameterBodies",
  11249. "schema": {
  11250. "$ref": "#/definitions/RepoTopicOptions"
  11251. }
  11252. },
  11253. "redirect": {
  11254. "description": "APIRedirect is a redirect response"
  11255. },
  11256. "validationError": {
  11257. "description": "APIValidationError is error format response related to input validation",
  11258. "headers": {
  11259. "message": {
  11260. "type": "string"
  11261. },
  11262. "url": {
  11263. "type": "string"
  11264. }
  11265. }
  11266. }
  11267. },
  11268. "securityDefinitions": {
  11269. "AccessToken": {
  11270. "type": "apiKey",
  11271. "name": "access_token",
  11272. "in": "query"
  11273. },
  11274. "AuthorizationHeaderToken": {
  11275. "description": "API tokens must be prepended with \"token\" followed by a space.",
  11276. "type": "apiKey",
  11277. "name": "Authorization",
  11278. "in": "header"
  11279. },
  11280. "BasicAuth": {
  11281. "type": "basic"
  11282. },
  11283. "SudoHeader": {
  11284. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  11285. "type": "apiKey",
  11286. "name": "Sudo",
  11287. "in": "header"
  11288. },
  11289. "SudoParam": {
  11290. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  11291. "type": "apiKey",
  11292. "name": "sudo",
  11293. "in": "query"
  11294. },
  11295. "Token": {
  11296. "type": "apiKey",
  11297. "name": "token",
  11298. "in": "query"
  11299. }
  11300. },
  11301. "security": [
  11302. {
  11303. "BasicAuth": []
  11304. },
  11305. {
  11306. "Token": []
  11307. },
  11308. {
  11309. "AccessToken": []
  11310. },
  11311. {
  11312. "AuthorizationHeaderToken": []
  11313. },
  11314. {
  11315. "SudoParam": []
  11316. },
  11317. {
  11318. "SudoHeader": []
  11319. }
  11320. ]
  11321. }