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 281KB

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