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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535
  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. "parameters": [
  71. {
  72. "type": "integer",
  73. "description": "page number of results to return (1-based)",
  74. "name": "page",
  75. "in": "query"
  76. },
  77. {
  78. "type": "integer",
  79. "description": "page size of results, maximum page size is 50",
  80. "name": "limit",
  81. "in": "query"
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "$ref": "#/responses/UserList"
  87. },
  88. "403": {
  89. "$ref": "#/responses/forbidden"
  90. }
  91. }
  92. },
  93. "post": {
  94. "consumes": [
  95. "application/json"
  96. ],
  97. "produces": [
  98. "application/json"
  99. ],
  100. "tags": [
  101. "admin"
  102. ],
  103. "summary": "Create a user",
  104. "operationId": "adminCreateUser",
  105. "parameters": [
  106. {
  107. "name": "body",
  108. "in": "body",
  109. "schema": {
  110. "$ref": "#/definitions/CreateUserOption"
  111. }
  112. }
  113. ],
  114. "responses": {
  115. "201": {
  116. "$ref": "#/responses/User"
  117. },
  118. "400": {
  119. "$ref": "#/responses/error"
  120. },
  121. "403": {
  122. "$ref": "#/responses/forbidden"
  123. },
  124. "422": {
  125. "$ref": "#/responses/validationError"
  126. }
  127. }
  128. }
  129. },
  130. "/admin/users/{username}": {
  131. "delete": {
  132. "produces": [
  133. "application/json"
  134. ],
  135. "tags": [
  136. "admin"
  137. ],
  138. "summary": "Delete a user",
  139. "operationId": "adminDeleteUser",
  140. "parameters": [
  141. {
  142. "type": "string",
  143. "description": "username of user to delete",
  144. "name": "username",
  145. "in": "path",
  146. "required": true
  147. }
  148. ],
  149. "responses": {
  150. "204": {
  151. "$ref": "#/responses/empty"
  152. },
  153. "403": {
  154. "$ref": "#/responses/forbidden"
  155. },
  156. "422": {
  157. "$ref": "#/responses/validationError"
  158. }
  159. }
  160. },
  161. "patch": {
  162. "consumes": [
  163. "application/json"
  164. ],
  165. "produces": [
  166. "application/json"
  167. ],
  168. "tags": [
  169. "admin"
  170. ],
  171. "summary": "Edit an existing user",
  172. "operationId": "adminEditUser",
  173. "parameters": [
  174. {
  175. "type": "string",
  176. "description": "username of user to edit",
  177. "name": "username",
  178. "in": "path",
  179. "required": true
  180. },
  181. {
  182. "name": "body",
  183. "in": "body",
  184. "schema": {
  185. "$ref": "#/definitions/EditUserOption"
  186. }
  187. }
  188. ],
  189. "responses": {
  190. "200": {
  191. "$ref": "#/responses/User"
  192. },
  193. "403": {
  194. "$ref": "#/responses/forbidden"
  195. },
  196. "422": {
  197. "$ref": "#/responses/validationError"
  198. }
  199. }
  200. }
  201. },
  202. "/admin/users/{username}/keys": {
  203. "post": {
  204. "consumes": [
  205. "application/json"
  206. ],
  207. "produces": [
  208. "application/json"
  209. ],
  210. "tags": [
  211. "admin"
  212. ],
  213. "summary": "Add a public key on behalf of a user",
  214. "operationId": "adminCreatePublicKey",
  215. "parameters": [
  216. {
  217. "type": "string",
  218. "description": "username of the user",
  219. "name": "username",
  220. "in": "path",
  221. "required": true
  222. },
  223. {
  224. "name": "key",
  225. "in": "body",
  226. "schema": {
  227. "$ref": "#/definitions/CreateKeyOption"
  228. }
  229. }
  230. ],
  231. "responses": {
  232. "201": {
  233. "$ref": "#/responses/PublicKey"
  234. },
  235. "403": {
  236. "$ref": "#/responses/forbidden"
  237. },
  238. "422": {
  239. "$ref": "#/responses/validationError"
  240. }
  241. }
  242. }
  243. },
  244. "/admin/users/{username}/keys/{id}": {
  245. "delete": {
  246. "produces": [
  247. "application/json"
  248. ],
  249. "tags": [
  250. "admin"
  251. ],
  252. "summary": "Delete a user's public key",
  253. "operationId": "adminDeleteUserPublicKey",
  254. "parameters": [
  255. {
  256. "type": "string",
  257. "description": "username of user",
  258. "name": "username",
  259. "in": "path",
  260. "required": true
  261. },
  262. {
  263. "type": "integer",
  264. "format": "int64",
  265. "description": "id of the key to delete",
  266. "name": "id",
  267. "in": "path",
  268. "required": true
  269. }
  270. ],
  271. "responses": {
  272. "204": {
  273. "$ref": "#/responses/empty"
  274. },
  275. "403": {
  276. "$ref": "#/responses/forbidden"
  277. },
  278. "404": {
  279. "$ref": "#/responses/notFound"
  280. }
  281. }
  282. }
  283. },
  284. "/admin/users/{username}/orgs": {
  285. "post": {
  286. "consumes": [
  287. "application/json"
  288. ],
  289. "produces": [
  290. "application/json"
  291. ],
  292. "tags": [
  293. "admin"
  294. ],
  295. "summary": "Create an organization",
  296. "operationId": "adminCreateOrg",
  297. "parameters": [
  298. {
  299. "type": "string",
  300. "description": "username of the user that will own the created organization",
  301. "name": "username",
  302. "in": "path",
  303. "required": true
  304. },
  305. {
  306. "name": "organization",
  307. "in": "body",
  308. "required": true,
  309. "schema": {
  310. "$ref": "#/definitions/CreateOrgOption"
  311. }
  312. }
  313. ],
  314. "responses": {
  315. "201": {
  316. "$ref": "#/responses/Organization"
  317. },
  318. "403": {
  319. "$ref": "#/responses/forbidden"
  320. },
  321. "422": {
  322. "$ref": "#/responses/validationError"
  323. }
  324. }
  325. }
  326. },
  327. "/admin/users/{username}/repos": {
  328. "post": {
  329. "consumes": [
  330. "application/json"
  331. ],
  332. "produces": [
  333. "application/json"
  334. ],
  335. "tags": [
  336. "admin"
  337. ],
  338. "summary": "Create a repository on behalf of a user",
  339. "operationId": "adminCreateRepo",
  340. "parameters": [
  341. {
  342. "type": "string",
  343. "description": "username of the user. This user will own the created repository",
  344. "name": "username",
  345. "in": "path",
  346. "required": true
  347. },
  348. {
  349. "name": "repository",
  350. "in": "body",
  351. "required": true,
  352. "schema": {
  353. "$ref": "#/definitions/CreateRepoOption"
  354. }
  355. }
  356. ],
  357. "responses": {
  358. "201": {
  359. "$ref": "#/responses/Repository"
  360. },
  361. "403": {
  362. "$ref": "#/responses/forbidden"
  363. },
  364. "404": {
  365. "$ref": "#/responses/notFound"
  366. },
  367. "409": {
  368. "$ref": "#/responses/error"
  369. },
  370. "422": {
  371. "$ref": "#/responses/validationError"
  372. }
  373. }
  374. }
  375. },
  376. "/markdown": {
  377. "post": {
  378. "consumes": [
  379. "application/json"
  380. ],
  381. "produces": [
  382. "text/html"
  383. ],
  384. "tags": [
  385. "miscellaneous"
  386. ],
  387. "summary": "Render a markdown document as HTML",
  388. "operationId": "renderMarkdown",
  389. "parameters": [
  390. {
  391. "name": "body",
  392. "in": "body",
  393. "schema": {
  394. "$ref": "#/definitions/MarkdownOption"
  395. }
  396. }
  397. ],
  398. "responses": {
  399. "200": {
  400. "$ref": "#/responses/MarkdownRender"
  401. },
  402. "422": {
  403. "$ref": "#/responses/validationError"
  404. }
  405. }
  406. }
  407. },
  408. "/markdown/raw": {
  409. "post": {
  410. "consumes": [
  411. "text/plain"
  412. ],
  413. "produces": [
  414. "text/html"
  415. ],
  416. "tags": [
  417. "miscellaneous"
  418. ],
  419. "summary": "Render raw markdown as HTML",
  420. "operationId": "renderMarkdownRaw",
  421. "parameters": [
  422. {
  423. "description": "Request body to render",
  424. "name": "body",
  425. "in": "body",
  426. "required": true,
  427. "schema": {
  428. "type": "string"
  429. }
  430. }
  431. ],
  432. "responses": {
  433. "200": {
  434. "$ref": "#/responses/MarkdownRender"
  435. },
  436. "422": {
  437. "$ref": "#/responses/validationError"
  438. }
  439. }
  440. }
  441. },
  442. "/notifications": {
  443. "get": {
  444. "consumes": [
  445. "application/json"
  446. ],
  447. "produces": [
  448. "application/json"
  449. ],
  450. "tags": [
  451. "notification"
  452. ],
  453. "summary": "List users's notification threads",
  454. "operationId": "notifyGetList",
  455. "parameters": [
  456. {
  457. "type": "string",
  458. "description": "If true, show notifications marked as read. Default value is false",
  459. "name": "all",
  460. "in": "query"
  461. },
  462. {
  463. "type": "string",
  464. "format": "date-time",
  465. "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
  466. "name": "since",
  467. "in": "query"
  468. },
  469. {
  470. "type": "string",
  471. "format": "date-time",
  472. "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
  473. "name": "before",
  474. "in": "query"
  475. },
  476. {
  477. "type": "integer",
  478. "description": "page number of results to return (1-based)",
  479. "name": "page",
  480. "in": "query"
  481. },
  482. {
  483. "type": "integer",
  484. "description": "page size of results, maximum page size is 50",
  485. "name": "limit",
  486. "in": "query"
  487. }
  488. ],
  489. "responses": {
  490. "200": {
  491. "$ref": "#/responses/NotificationThreadList"
  492. }
  493. }
  494. },
  495. "put": {
  496. "consumes": [
  497. "application/json"
  498. ],
  499. "produces": [
  500. "application/json"
  501. ],
  502. "tags": [
  503. "notification"
  504. ],
  505. "summary": "Mark notification threads as read",
  506. "operationId": "notifyReadList",
  507. "parameters": [
  508. {
  509. "type": "string",
  510. "format": "date-time",
  511. "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
  512. "name": "last_read_at",
  513. "in": "query"
  514. }
  515. ],
  516. "responses": {
  517. "205": {
  518. "$ref": "#/responses/empty"
  519. }
  520. }
  521. }
  522. },
  523. "/notifications/new": {
  524. "get": {
  525. "tags": [
  526. "notification"
  527. ],
  528. "summary": "Check if unread notifications exist",
  529. "operationId": "notifyNewAvailable",
  530. "responses": {
  531. "200": {
  532. "$ref": "#/responses/NotificationCount"
  533. }
  534. }
  535. }
  536. },
  537. "/notifications/threads/{id}": {
  538. "get": {
  539. "consumes": [
  540. "application/json"
  541. ],
  542. "produces": [
  543. "application/json"
  544. ],
  545. "tags": [
  546. "notification"
  547. ],
  548. "summary": "Get notification thread by ID",
  549. "operationId": "notifyGetThread",
  550. "parameters": [
  551. {
  552. "type": "string",
  553. "description": "id of notification thread",
  554. "name": "id",
  555. "in": "path",
  556. "required": true
  557. }
  558. ],
  559. "responses": {
  560. "200": {
  561. "$ref": "#/responses/NotificationThread"
  562. },
  563. "403": {
  564. "$ref": "#/responses/forbidden"
  565. },
  566. "404": {
  567. "$ref": "#/responses/notFound"
  568. }
  569. }
  570. },
  571. "patch": {
  572. "consumes": [
  573. "application/json"
  574. ],
  575. "produces": [
  576. "application/json"
  577. ],
  578. "tags": [
  579. "notification"
  580. ],
  581. "summary": "Mark notification thread as read by ID",
  582. "operationId": "notifyReadThread",
  583. "parameters": [
  584. {
  585. "type": "string",
  586. "description": "id of notification thread",
  587. "name": "id",
  588. "in": "path",
  589. "required": true
  590. }
  591. ],
  592. "responses": {
  593. "205": {
  594. "$ref": "#/responses/empty"
  595. },
  596. "403": {
  597. "$ref": "#/responses/forbidden"
  598. },
  599. "404": {
  600. "$ref": "#/responses/notFound"
  601. }
  602. }
  603. }
  604. },
  605. "/org/{org}/repos": {
  606. "post": {
  607. "consumes": [
  608. "application/json"
  609. ],
  610. "produces": [
  611. "application/json"
  612. ],
  613. "tags": [
  614. "organization"
  615. ],
  616. "summary": "Create a repository in an organization",
  617. "operationId": "createOrgRepoDeprecated",
  618. "deprecated": true,
  619. "parameters": [
  620. {
  621. "type": "string",
  622. "description": "name of organization",
  623. "name": "org",
  624. "in": "path",
  625. "required": true
  626. },
  627. {
  628. "name": "body",
  629. "in": "body",
  630. "schema": {
  631. "$ref": "#/definitions/CreateRepoOption"
  632. }
  633. }
  634. ],
  635. "responses": {
  636. "201": {
  637. "$ref": "#/responses/Repository"
  638. },
  639. "403": {
  640. "$ref": "#/responses/forbidden"
  641. },
  642. "422": {
  643. "$ref": "#/responses/validationError"
  644. }
  645. }
  646. }
  647. },
  648. "/orgs": {
  649. "get": {
  650. "produces": [
  651. "application/json"
  652. ],
  653. "tags": [
  654. "organization"
  655. ],
  656. "summary": "Get list of organizations",
  657. "operationId": "orgGetAll",
  658. "parameters": [
  659. {
  660. "type": "integer",
  661. "description": "page number of results to return (1-based)",
  662. "name": "page",
  663. "in": "query"
  664. },
  665. {
  666. "type": "integer",
  667. "description": "page size of results, maximum page size is 50",
  668. "name": "limit",
  669. "in": "query"
  670. }
  671. ],
  672. "responses": {
  673. "200": {
  674. "$ref": "#/responses/OrganizationList"
  675. }
  676. }
  677. },
  678. "post": {
  679. "consumes": [
  680. "application/json"
  681. ],
  682. "produces": [
  683. "application/json"
  684. ],
  685. "tags": [
  686. "organization"
  687. ],
  688. "summary": "Create an organization",
  689. "operationId": "orgCreate",
  690. "parameters": [
  691. {
  692. "name": "organization",
  693. "in": "body",
  694. "required": true,
  695. "schema": {
  696. "$ref": "#/definitions/CreateOrgOption"
  697. }
  698. }
  699. ],
  700. "responses": {
  701. "201": {
  702. "$ref": "#/responses/Organization"
  703. },
  704. "403": {
  705. "$ref": "#/responses/forbidden"
  706. },
  707. "422": {
  708. "$ref": "#/responses/validationError"
  709. }
  710. }
  711. }
  712. },
  713. "/orgs/{org}": {
  714. "get": {
  715. "produces": [
  716. "application/json"
  717. ],
  718. "tags": [
  719. "organization"
  720. ],
  721. "summary": "Get an organization",
  722. "operationId": "orgGet",
  723. "parameters": [
  724. {
  725. "type": "string",
  726. "description": "name of the organization to get",
  727. "name": "org",
  728. "in": "path",
  729. "required": true
  730. }
  731. ],
  732. "responses": {
  733. "200": {
  734. "$ref": "#/responses/Organization"
  735. }
  736. }
  737. },
  738. "delete": {
  739. "produces": [
  740. "application/json"
  741. ],
  742. "tags": [
  743. "organization"
  744. ],
  745. "summary": "Delete an organization",
  746. "operationId": "orgDelete",
  747. "parameters": [
  748. {
  749. "type": "string",
  750. "description": "organization that is to be deleted",
  751. "name": "org",
  752. "in": "path",
  753. "required": true
  754. }
  755. ],
  756. "responses": {
  757. "204": {
  758. "$ref": "#/responses/empty"
  759. }
  760. }
  761. },
  762. "patch": {
  763. "consumes": [
  764. "application/json"
  765. ],
  766. "produces": [
  767. "application/json"
  768. ],
  769. "tags": [
  770. "organization"
  771. ],
  772. "summary": "Edit an organization",
  773. "operationId": "orgEdit",
  774. "parameters": [
  775. {
  776. "type": "string",
  777. "description": "name of the organization to edit",
  778. "name": "org",
  779. "in": "path",
  780. "required": true
  781. },
  782. {
  783. "name": "body",
  784. "in": "body",
  785. "required": true,
  786. "schema": {
  787. "$ref": "#/definitions/EditOrgOption"
  788. }
  789. }
  790. ],
  791. "responses": {
  792. "200": {
  793. "$ref": "#/responses/Organization"
  794. }
  795. }
  796. }
  797. },
  798. "/orgs/{org}/hooks": {
  799. "get": {
  800. "produces": [
  801. "application/json"
  802. ],
  803. "tags": [
  804. "organization"
  805. ],
  806. "summary": "List an organization's webhooks",
  807. "operationId": "orgListHooks",
  808. "parameters": [
  809. {
  810. "type": "string",
  811. "description": "name of the organization",
  812. "name": "org",
  813. "in": "path",
  814. "required": true
  815. },
  816. {
  817. "type": "integer",
  818. "description": "page number of results to return (1-based)",
  819. "name": "page",
  820. "in": "query"
  821. },
  822. {
  823. "type": "integer",
  824. "description": "page size of results, maximum page size is 50",
  825. "name": "limit",
  826. "in": "query"
  827. }
  828. ],
  829. "responses": {
  830. "200": {
  831. "$ref": "#/responses/HookList"
  832. }
  833. }
  834. }
  835. },
  836. "/orgs/{org}/hooks/": {
  837. "post": {
  838. "consumes": [
  839. "application/json"
  840. ],
  841. "produces": [
  842. "application/json"
  843. ],
  844. "tags": [
  845. "organization"
  846. ],
  847. "summary": "Create a hook",
  848. "operationId": "orgCreateHook",
  849. "parameters": [
  850. {
  851. "type": "string",
  852. "description": "name of the organization",
  853. "name": "org",
  854. "in": "path",
  855. "required": true
  856. },
  857. {
  858. "name": "body",
  859. "in": "body",
  860. "required": true,
  861. "schema": {
  862. "$ref": "#/definitions/CreateHookOption"
  863. }
  864. }
  865. ],
  866. "responses": {
  867. "201": {
  868. "$ref": "#/responses/Hook"
  869. }
  870. }
  871. }
  872. },
  873. "/orgs/{org}/hooks/{id}": {
  874. "get": {
  875. "produces": [
  876. "application/json"
  877. ],
  878. "tags": [
  879. "organization"
  880. ],
  881. "summary": "Get a hook",
  882. "operationId": "orgGetHook",
  883. "parameters": [
  884. {
  885. "type": "string",
  886. "description": "name of the organization",
  887. "name": "org",
  888. "in": "path",
  889. "required": true
  890. },
  891. {
  892. "type": "integer",
  893. "format": "int64",
  894. "description": "id of the hook to get",
  895. "name": "id",
  896. "in": "path",
  897. "required": true
  898. }
  899. ],
  900. "responses": {
  901. "200": {
  902. "$ref": "#/responses/Hook"
  903. }
  904. }
  905. },
  906. "delete": {
  907. "produces": [
  908. "application/json"
  909. ],
  910. "tags": [
  911. "organization"
  912. ],
  913. "summary": "Delete a hook",
  914. "operationId": "orgDeleteHook",
  915. "parameters": [
  916. {
  917. "type": "string",
  918. "description": "name of the organization",
  919. "name": "org",
  920. "in": "path",
  921. "required": true
  922. },
  923. {
  924. "type": "integer",
  925. "format": "int64",
  926. "description": "id of the hook to delete",
  927. "name": "id",
  928. "in": "path",
  929. "required": true
  930. }
  931. ],
  932. "responses": {
  933. "204": {
  934. "$ref": "#/responses/empty"
  935. }
  936. }
  937. },
  938. "patch": {
  939. "consumes": [
  940. "application/json"
  941. ],
  942. "produces": [
  943. "application/json"
  944. ],
  945. "tags": [
  946. "organization"
  947. ],
  948. "summary": "Update a hook",
  949. "operationId": "orgEditHook",
  950. "parameters": [
  951. {
  952. "type": "string",
  953. "description": "name of the organization",
  954. "name": "org",
  955. "in": "path",
  956. "required": true
  957. },
  958. {
  959. "type": "integer",
  960. "format": "int64",
  961. "description": "id of the hook to update",
  962. "name": "id",
  963. "in": "path",
  964. "required": true
  965. },
  966. {
  967. "name": "body",
  968. "in": "body",
  969. "schema": {
  970. "$ref": "#/definitions/EditHookOption"
  971. }
  972. }
  973. ],
  974. "responses": {
  975. "200": {
  976. "$ref": "#/responses/Hook"
  977. }
  978. }
  979. }
  980. },
  981. "/orgs/{org}/labels": {
  982. "get": {
  983. "produces": [
  984. "application/json"
  985. ],
  986. "tags": [
  987. "organization"
  988. ],
  989. "summary": "List an organization's labels",
  990. "operationId": "orgListLabels",
  991. "parameters": [
  992. {
  993. "type": "string",
  994. "description": "name of the organization",
  995. "name": "org",
  996. "in": "path",
  997. "required": true
  998. },
  999. {
  1000. "type": "integer",
  1001. "description": "page number of results to return (1-based)",
  1002. "name": "page",
  1003. "in": "query"
  1004. },
  1005. {
  1006. "type": "integer",
  1007. "description": "page size of results, maximum page size is 50",
  1008. "name": "limit",
  1009. "in": "query"
  1010. }
  1011. ],
  1012. "responses": {
  1013. "200": {
  1014. "$ref": "#/responses/LabelList"
  1015. }
  1016. }
  1017. },
  1018. "post": {
  1019. "consumes": [
  1020. "application/json"
  1021. ],
  1022. "produces": [
  1023. "application/json"
  1024. ],
  1025. "tags": [
  1026. "organization"
  1027. ],
  1028. "summary": "Create a label for an organization",
  1029. "operationId": "orgCreateLabel",
  1030. "parameters": [
  1031. {
  1032. "type": "string",
  1033. "description": "name of the organization",
  1034. "name": "org",
  1035. "in": "path",
  1036. "required": true
  1037. },
  1038. {
  1039. "name": "body",
  1040. "in": "body",
  1041. "schema": {
  1042. "$ref": "#/definitions/CreateLabelOption"
  1043. }
  1044. }
  1045. ],
  1046. "responses": {
  1047. "201": {
  1048. "$ref": "#/responses/Label"
  1049. },
  1050. "422": {
  1051. "$ref": "#/responses/validationError"
  1052. }
  1053. }
  1054. }
  1055. },
  1056. "/orgs/{org}/labels/{id}": {
  1057. "get": {
  1058. "produces": [
  1059. "application/json"
  1060. ],
  1061. "tags": [
  1062. "organization"
  1063. ],
  1064. "summary": "Get a single label",
  1065. "operationId": "orgGetLabel",
  1066. "parameters": [
  1067. {
  1068. "type": "string",
  1069. "description": "name of the organization",
  1070. "name": "org",
  1071. "in": "path",
  1072. "required": true
  1073. },
  1074. {
  1075. "type": "integer",
  1076. "format": "int64",
  1077. "description": "id of the label to get",
  1078. "name": "id",
  1079. "in": "path",
  1080. "required": true
  1081. }
  1082. ],
  1083. "responses": {
  1084. "200": {
  1085. "$ref": "#/responses/Label"
  1086. }
  1087. }
  1088. },
  1089. "delete": {
  1090. "tags": [
  1091. "organization"
  1092. ],
  1093. "summary": "Delete a label",
  1094. "operationId": "orgDeleteLabel",
  1095. "parameters": [
  1096. {
  1097. "type": "string",
  1098. "description": "name of the organization",
  1099. "name": "org",
  1100. "in": "path",
  1101. "required": true
  1102. },
  1103. {
  1104. "type": "integer",
  1105. "format": "int64",
  1106. "description": "id of the label to delete",
  1107. "name": "id",
  1108. "in": "path",
  1109. "required": true
  1110. }
  1111. ],
  1112. "responses": {
  1113. "204": {
  1114. "$ref": "#/responses/empty"
  1115. }
  1116. }
  1117. },
  1118. "patch": {
  1119. "consumes": [
  1120. "application/json"
  1121. ],
  1122. "produces": [
  1123. "application/json"
  1124. ],
  1125. "tags": [
  1126. "organization"
  1127. ],
  1128. "summary": "Update a label",
  1129. "operationId": "orgEditLabel",
  1130. "parameters": [
  1131. {
  1132. "type": "string",
  1133. "description": "name of the organization",
  1134. "name": "org",
  1135. "in": "path",
  1136. "required": true
  1137. },
  1138. {
  1139. "type": "integer",
  1140. "format": "int64",
  1141. "description": "id of the label to edit",
  1142. "name": "id",
  1143. "in": "path",
  1144. "required": true
  1145. },
  1146. {
  1147. "name": "body",
  1148. "in": "body",
  1149. "schema": {
  1150. "$ref": "#/definitions/EditLabelOption"
  1151. }
  1152. }
  1153. ],
  1154. "responses": {
  1155. "200": {
  1156. "$ref": "#/responses/Label"
  1157. },
  1158. "422": {
  1159. "$ref": "#/responses/validationError"
  1160. }
  1161. }
  1162. }
  1163. },
  1164. "/orgs/{org}/members": {
  1165. "get": {
  1166. "produces": [
  1167. "application/json"
  1168. ],
  1169. "tags": [
  1170. "organization"
  1171. ],
  1172. "summary": "List an organization's members",
  1173. "operationId": "orgListMembers",
  1174. "parameters": [
  1175. {
  1176. "type": "string",
  1177. "description": "name of the organization",
  1178. "name": "org",
  1179. "in": "path",
  1180. "required": true
  1181. },
  1182. {
  1183. "type": "integer",
  1184. "description": "page number of results to return (1-based)",
  1185. "name": "page",
  1186. "in": "query"
  1187. },
  1188. {
  1189. "type": "integer",
  1190. "description": "page size of results, maximum page size is 50",
  1191. "name": "limit",
  1192. "in": "query"
  1193. }
  1194. ],
  1195. "responses": {
  1196. "200": {
  1197. "$ref": "#/responses/UserList"
  1198. }
  1199. }
  1200. }
  1201. },
  1202. "/orgs/{org}/members/{username}": {
  1203. "get": {
  1204. "tags": [
  1205. "organization"
  1206. ],
  1207. "summary": "Check if a user is a member of an organization",
  1208. "operationId": "orgIsMember",
  1209. "parameters": [
  1210. {
  1211. "type": "string",
  1212. "description": "name of the organization",
  1213. "name": "org",
  1214. "in": "path",
  1215. "required": true
  1216. },
  1217. {
  1218. "type": "string",
  1219. "description": "username of the user",
  1220. "name": "username",
  1221. "in": "path",
  1222. "required": true
  1223. }
  1224. ],
  1225. "responses": {
  1226. "204": {
  1227. "description": "user is a member"
  1228. },
  1229. "302": {
  1230. "description": "redirection to /orgs/{org}/public_members/{username}"
  1231. },
  1232. "404": {
  1233. "description": "user is not a member"
  1234. }
  1235. }
  1236. },
  1237. "delete": {
  1238. "produces": [
  1239. "application/json"
  1240. ],
  1241. "tags": [
  1242. "organization"
  1243. ],
  1244. "summary": "Remove a member from an organization",
  1245. "operationId": "orgDeleteMember",
  1246. "parameters": [
  1247. {
  1248. "type": "string",
  1249. "description": "name of the organization",
  1250. "name": "org",
  1251. "in": "path",
  1252. "required": true
  1253. },
  1254. {
  1255. "type": "string",
  1256. "description": "username of the user",
  1257. "name": "username",
  1258. "in": "path",
  1259. "required": true
  1260. }
  1261. ],
  1262. "responses": {
  1263. "204": {
  1264. "description": "member removed"
  1265. }
  1266. }
  1267. }
  1268. },
  1269. "/orgs/{org}/public_members": {
  1270. "get": {
  1271. "produces": [
  1272. "application/json"
  1273. ],
  1274. "tags": [
  1275. "organization"
  1276. ],
  1277. "summary": "List an organization's public members",
  1278. "operationId": "orgListPublicMembers",
  1279. "parameters": [
  1280. {
  1281. "type": "string",
  1282. "description": "name of the organization",
  1283. "name": "org",
  1284. "in": "path",
  1285. "required": true
  1286. },
  1287. {
  1288. "type": "integer",
  1289. "description": "page number of results to return (1-based)",
  1290. "name": "page",
  1291. "in": "query"
  1292. },
  1293. {
  1294. "type": "integer",
  1295. "description": "page size of results, maximum page size is 50",
  1296. "name": "limit",
  1297. "in": "query"
  1298. }
  1299. ],
  1300. "responses": {
  1301. "200": {
  1302. "$ref": "#/responses/UserList"
  1303. }
  1304. }
  1305. }
  1306. },
  1307. "/orgs/{org}/public_members/{username}": {
  1308. "get": {
  1309. "tags": [
  1310. "organization"
  1311. ],
  1312. "summary": "Check if a user is a public member of an organization",
  1313. "operationId": "orgIsPublicMember",
  1314. "parameters": [
  1315. {
  1316. "type": "string",
  1317. "description": "name of the organization",
  1318. "name": "org",
  1319. "in": "path",
  1320. "required": true
  1321. },
  1322. {
  1323. "type": "string",
  1324. "description": "username of the user",
  1325. "name": "username",
  1326. "in": "path",
  1327. "required": true
  1328. }
  1329. ],
  1330. "responses": {
  1331. "204": {
  1332. "description": "user is a public member"
  1333. },
  1334. "404": {
  1335. "description": "user is not a public member"
  1336. }
  1337. }
  1338. },
  1339. "put": {
  1340. "produces": [
  1341. "application/json"
  1342. ],
  1343. "tags": [
  1344. "organization"
  1345. ],
  1346. "summary": "Publicize a user's membership",
  1347. "operationId": "orgPublicizeMember",
  1348. "parameters": [
  1349. {
  1350. "type": "string",
  1351. "description": "name of the organization",
  1352. "name": "org",
  1353. "in": "path",
  1354. "required": true
  1355. },
  1356. {
  1357. "type": "string",
  1358. "description": "username of the user",
  1359. "name": "username",
  1360. "in": "path",
  1361. "required": true
  1362. }
  1363. ],
  1364. "responses": {
  1365. "204": {
  1366. "description": "membership publicized"
  1367. },
  1368. "403": {
  1369. "$ref": "#/responses/forbidden"
  1370. }
  1371. }
  1372. },
  1373. "delete": {
  1374. "produces": [
  1375. "application/json"
  1376. ],
  1377. "tags": [
  1378. "organization"
  1379. ],
  1380. "summary": "Conceal a user's membership",
  1381. "operationId": "orgConcealMember",
  1382. "parameters": [
  1383. {
  1384. "type": "string",
  1385. "description": "name of the organization",
  1386. "name": "org",
  1387. "in": "path",
  1388. "required": true
  1389. },
  1390. {
  1391. "type": "string",
  1392. "description": "username of the user",
  1393. "name": "username",
  1394. "in": "path",
  1395. "required": true
  1396. }
  1397. ],
  1398. "responses": {
  1399. "204": {
  1400. "$ref": "#/responses/empty"
  1401. },
  1402. "403": {
  1403. "$ref": "#/responses/forbidden"
  1404. }
  1405. }
  1406. }
  1407. },
  1408. "/orgs/{org}/repos": {
  1409. "get": {
  1410. "produces": [
  1411. "application/json"
  1412. ],
  1413. "tags": [
  1414. "organization"
  1415. ],
  1416. "summary": "List an organization's repos",
  1417. "operationId": "orgListRepos",
  1418. "parameters": [
  1419. {
  1420. "type": "string",
  1421. "description": "name of the organization",
  1422. "name": "org",
  1423. "in": "path",
  1424. "required": true
  1425. },
  1426. {
  1427. "type": "integer",
  1428. "description": "page number of results to return (1-based)",
  1429. "name": "page",
  1430. "in": "query"
  1431. },
  1432. {
  1433. "type": "integer",
  1434. "description": "page size of results, maximum page size is 50",
  1435. "name": "limit",
  1436. "in": "query"
  1437. }
  1438. ],
  1439. "responses": {
  1440. "200": {
  1441. "$ref": "#/responses/RepositoryList"
  1442. }
  1443. }
  1444. },
  1445. "post": {
  1446. "consumes": [
  1447. "application/json"
  1448. ],
  1449. "produces": [
  1450. "application/json"
  1451. ],
  1452. "tags": [
  1453. "organization"
  1454. ],
  1455. "summary": "Create a repository in an organization",
  1456. "operationId": "createOrgRepo",
  1457. "parameters": [
  1458. {
  1459. "type": "string",
  1460. "description": "name of organization",
  1461. "name": "org",
  1462. "in": "path",
  1463. "required": true
  1464. },
  1465. {
  1466. "name": "body",
  1467. "in": "body",
  1468. "schema": {
  1469. "$ref": "#/definitions/CreateRepoOption"
  1470. }
  1471. }
  1472. ],
  1473. "responses": {
  1474. "201": {
  1475. "$ref": "#/responses/Repository"
  1476. },
  1477. "403": {
  1478. "$ref": "#/responses/forbidden"
  1479. },
  1480. "404": {
  1481. "$ref": "#/responses/notFound"
  1482. }
  1483. }
  1484. }
  1485. },
  1486. "/orgs/{org}/teams": {
  1487. "get": {
  1488. "produces": [
  1489. "application/json"
  1490. ],
  1491. "tags": [
  1492. "organization"
  1493. ],
  1494. "summary": "List an organization's teams",
  1495. "operationId": "orgListTeams",
  1496. "parameters": [
  1497. {
  1498. "type": "string",
  1499. "description": "name of the organization",
  1500. "name": "org",
  1501. "in": "path",
  1502. "required": true
  1503. },
  1504. {
  1505. "type": "integer",
  1506. "description": "page number of results to return (1-based)",
  1507. "name": "page",
  1508. "in": "query"
  1509. },
  1510. {
  1511. "type": "integer",
  1512. "description": "page size of results, maximum page size is 50",
  1513. "name": "limit",
  1514. "in": "query"
  1515. }
  1516. ],
  1517. "responses": {
  1518. "200": {
  1519. "$ref": "#/responses/TeamList"
  1520. }
  1521. }
  1522. },
  1523. "post": {
  1524. "consumes": [
  1525. "application/json"
  1526. ],
  1527. "produces": [
  1528. "application/json"
  1529. ],
  1530. "tags": [
  1531. "organization"
  1532. ],
  1533. "summary": "Create a team",
  1534. "operationId": "orgCreateTeam",
  1535. "parameters": [
  1536. {
  1537. "type": "string",
  1538. "description": "name of the organization",
  1539. "name": "org",
  1540. "in": "path",
  1541. "required": true
  1542. },
  1543. {
  1544. "name": "body",
  1545. "in": "body",
  1546. "schema": {
  1547. "$ref": "#/definitions/CreateTeamOption"
  1548. }
  1549. }
  1550. ],
  1551. "responses": {
  1552. "201": {
  1553. "$ref": "#/responses/Team"
  1554. },
  1555. "422": {
  1556. "$ref": "#/responses/validationError"
  1557. }
  1558. }
  1559. }
  1560. },
  1561. "/orgs/{org}/teams/search": {
  1562. "get": {
  1563. "produces": [
  1564. "application/json"
  1565. ],
  1566. "tags": [
  1567. "organization"
  1568. ],
  1569. "summary": "Search for teams within an organization",
  1570. "operationId": "teamSearch",
  1571. "parameters": [
  1572. {
  1573. "type": "string",
  1574. "description": "name of the organization",
  1575. "name": "org",
  1576. "in": "path",
  1577. "required": true
  1578. },
  1579. {
  1580. "type": "string",
  1581. "description": "keywords to search",
  1582. "name": "q",
  1583. "in": "query"
  1584. },
  1585. {
  1586. "type": "boolean",
  1587. "description": "include search within team description (defaults to true)",
  1588. "name": "include_desc",
  1589. "in": "query"
  1590. },
  1591. {
  1592. "type": "integer",
  1593. "description": "page number of results to return (1-based)",
  1594. "name": "page",
  1595. "in": "query"
  1596. },
  1597. {
  1598. "type": "integer",
  1599. "description": "page size of results, maximum page size is 50",
  1600. "name": "limit",
  1601. "in": "query"
  1602. }
  1603. ],
  1604. "responses": {
  1605. "200": {
  1606. "description": "SearchResults of a successful search",
  1607. "schema": {
  1608. "type": "object",
  1609. "properties": {
  1610. "data": {
  1611. "type": "array",
  1612. "items": {
  1613. "$ref": "#/definitions/Team"
  1614. }
  1615. },
  1616. "ok": {
  1617. "type": "boolean"
  1618. }
  1619. }
  1620. }
  1621. }
  1622. }
  1623. }
  1624. },
  1625. "/repos/issues/search": {
  1626. "get": {
  1627. "produces": [
  1628. "application/json"
  1629. ],
  1630. "tags": [
  1631. "issue"
  1632. ],
  1633. "summary": "Search for issues across the repositories that the user has access to",
  1634. "operationId": "issueSearchIssues",
  1635. "parameters": [
  1636. {
  1637. "type": "string",
  1638. "description": "whether issue is open or closed",
  1639. "name": "state",
  1640. "in": "query"
  1641. },
  1642. {
  1643. "type": "string",
  1644. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  1645. "name": "labels",
  1646. "in": "query"
  1647. },
  1648. {
  1649. "type": "string",
  1650. "description": "search string",
  1651. "name": "q",
  1652. "in": "query"
  1653. },
  1654. {
  1655. "type": "integer",
  1656. "format": "int64",
  1657. "description": "repository to prioritize in the results",
  1658. "name": "priority_repo_id",
  1659. "in": "query"
  1660. },
  1661. {
  1662. "type": "string",
  1663. "description": "filter by type (issues / pulls) if set",
  1664. "name": "type",
  1665. "in": "query"
  1666. },
  1667. {
  1668. "type": "integer",
  1669. "description": "page number of requested issues",
  1670. "name": "page",
  1671. "in": "query"
  1672. }
  1673. ],
  1674. "responses": {
  1675. "200": {
  1676. "$ref": "#/responses/IssueList"
  1677. }
  1678. }
  1679. }
  1680. },
  1681. "/repos/migrate": {
  1682. "post": {
  1683. "consumes": [
  1684. "application/json"
  1685. ],
  1686. "produces": [
  1687. "application/json"
  1688. ],
  1689. "tags": [
  1690. "repository"
  1691. ],
  1692. "summary": "Migrate a remote git repository",
  1693. "operationId": "repoMigrate",
  1694. "parameters": [
  1695. {
  1696. "name": "body",
  1697. "in": "body",
  1698. "schema": {
  1699. "$ref": "#/definitions/MigrateRepoForm"
  1700. }
  1701. }
  1702. ],
  1703. "responses": {
  1704. "201": {
  1705. "$ref": "#/responses/Repository"
  1706. },
  1707. "403": {
  1708. "$ref": "#/responses/forbidden"
  1709. },
  1710. "422": {
  1711. "$ref": "#/responses/validationError"
  1712. }
  1713. }
  1714. }
  1715. },
  1716. "/repos/search": {
  1717. "get": {
  1718. "produces": [
  1719. "application/json"
  1720. ],
  1721. "tags": [
  1722. "repository"
  1723. ],
  1724. "summary": "Search for repositories",
  1725. "operationId": "repoSearch",
  1726. "parameters": [
  1727. {
  1728. "type": "string",
  1729. "description": "keyword",
  1730. "name": "q",
  1731. "in": "query"
  1732. },
  1733. {
  1734. "type": "boolean",
  1735. "description": "Limit search to repositories with keyword as topic",
  1736. "name": "topic",
  1737. "in": "query"
  1738. },
  1739. {
  1740. "type": "boolean",
  1741. "description": "include search of keyword within repository description",
  1742. "name": "includeDesc",
  1743. "in": "query"
  1744. },
  1745. {
  1746. "type": "integer",
  1747. "format": "int64",
  1748. "description": "search only for repos that the user with the given id owns or contributes to",
  1749. "name": "uid",
  1750. "in": "query"
  1751. },
  1752. {
  1753. "type": "integer",
  1754. "format": "int64",
  1755. "description": "repo owner to prioritize in the results",
  1756. "name": "priority_owner_id",
  1757. "in": "query"
  1758. },
  1759. {
  1760. "type": "integer",
  1761. "format": "int64",
  1762. "description": "search only for repos that the user with the given id has starred",
  1763. "name": "starredBy",
  1764. "in": "query"
  1765. },
  1766. {
  1767. "type": "boolean",
  1768. "description": "include private repositories this user has access to (defaults to true)",
  1769. "name": "private",
  1770. "in": "query"
  1771. },
  1772. {
  1773. "type": "boolean",
  1774. "description": "include template repositories this user has access to (defaults to true)",
  1775. "name": "template",
  1776. "in": "query"
  1777. },
  1778. {
  1779. "type": "string",
  1780. "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"",
  1781. "name": "mode",
  1782. "in": "query"
  1783. },
  1784. {
  1785. "type": "boolean",
  1786. "description": "if `uid` is given, search only for repos that the user owns",
  1787. "name": "exclusive",
  1788. "in": "query"
  1789. },
  1790. {
  1791. "type": "string",
  1792. "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"",
  1793. "name": "sort",
  1794. "in": "query"
  1795. },
  1796. {
  1797. "type": "string",
  1798. "description": "sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.",
  1799. "name": "order",
  1800. "in": "query"
  1801. },
  1802. {
  1803. "type": "integer",
  1804. "description": "page number of results to return (1-based)",
  1805. "name": "page",
  1806. "in": "query"
  1807. },
  1808. {
  1809. "type": "integer",
  1810. "description": "page size of results, maximum page size is 50",
  1811. "name": "limit",
  1812. "in": "query"
  1813. }
  1814. ],
  1815. "responses": {
  1816. "200": {
  1817. "$ref": "#/responses/SearchResults"
  1818. },
  1819. "422": {
  1820. "$ref": "#/responses/validationError"
  1821. }
  1822. }
  1823. }
  1824. },
  1825. "/repos/{owner}/{repo}": {
  1826. "get": {
  1827. "produces": [
  1828. "application/json"
  1829. ],
  1830. "tags": [
  1831. "repository"
  1832. ],
  1833. "summary": "Get a repository",
  1834. "operationId": "repoGet",
  1835. "parameters": [
  1836. {
  1837. "type": "string",
  1838. "description": "owner of the repo",
  1839. "name": "owner",
  1840. "in": "path",
  1841. "required": true
  1842. },
  1843. {
  1844. "type": "string",
  1845. "description": "name of the repo",
  1846. "name": "repo",
  1847. "in": "path",
  1848. "required": true
  1849. }
  1850. ],
  1851. "responses": {
  1852. "200": {
  1853. "$ref": "#/responses/Repository"
  1854. }
  1855. }
  1856. },
  1857. "delete": {
  1858. "produces": [
  1859. "application/json"
  1860. ],
  1861. "tags": [
  1862. "repository"
  1863. ],
  1864. "summary": "Delete a repository",
  1865. "operationId": "repoDelete",
  1866. "parameters": [
  1867. {
  1868. "type": "string",
  1869. "description": "owner of the repo to delete",
  1870. "name": "owner",
  1871. "in": "path",
  1872. "required": true
  1873. },
  1874. {
  1875. "type": "string",
  1876. "description": "name of the repo to delete",
  1877. "name": "repo",
  1878. "in": "path",
  1879. "required": true
  1880. }
  1881. ],
  1882. "responses": {
  1883. "204": {
  1884. "$ref": "#/responses/empty"
  1885. },
  1886. "403": {
  1887. "$ref": "#/responses/forbidden"
  1888. }
  1889. }
  1890. },
  1891. "patch": {
  1892. "produces": [
  1893. "application/json"
  1894. ],
  1895. "tags": [
  1896. "repository"
  1897. ],
  1898. "summary": "Edit a repository's properties. Only fields that are set will be changed.",
  1899. "operationId": "repoEdit",
  1900. "parameters": [
  1901. {
  1902. "type": "string",
  1903. "description": "owner of the repo to edit",
  1904. "name": "owner",
  1905. "in": "path",
  1906. "required": true
  1907. },
  1908. {
  1909. "type": "string",
  1910. "description": "name of the repo to edit",
  1911. "name": "repo",
  1912. "in": "path",
  1913. "required": true
  1914. },
  1915. {
  1916. "description": "Properties of a repo that you can edit",
  1917. "name": "body",
  1918. "in": "body",
  1919. "schema": {
  1920. "$ref": "#/definitions/EditRepoOption"
  1921. }
  1922. }
  1923. ],
  1924. "responses": {
  1925. "200": {
  1926. "$ref": "#/responses/Repository"
  1927. },
  1928. "403": {
  1929. "$ref": "#/responses/forbidden"
  1930. },
  1931. "422": {
  1932. "$ref": "#/responses/validationError"
  1933. }
  1934. }
  1935. }
  1936. },
  1937. "/repos/{owner}/{repo}/archive/{archive}": {
  1938. "get": {
  1939. "produces": [
  1940. "application/json"
  1941. ],
  1942. "tags": [
  1943. "repository"
  1944. ],
  1945. "summary": "Get an archive of a repository",
  1946. "operationId": "repoGetArchive",
  1947. "parameters": [
  1948. {
  1949. "type": "string",
  1950. "description": "owner of the repo",
  1951. "name": "owner",
  1952. "in": "path",
  1953. "required": true
  1954. },
  1955. {
  1956. "type": "string",
  1957. "description": "name of the repo",
  1958. "name": "repo",
  1959. "in": "path",
  1960. "required": true
  1961. },
  1962. {
  1963. "type": "string",
  1964. "description": "archive to download, consisting of a git reference and archive",
  1965. "name": "archive",
  1966. "in": "path",
  1967. "required": true
  1968. }
  1969. ],
  1970. "responses": {
  1971. "200": {
  1972. "description": "success"
  1973. },
  1974. "404": {
  1975. "$ref": "#/responses/notFound"
  1976. }
  1977. }
  1978. }
  1979. },
  1980. "/repos/{owner}/{repo}/branch_protections": {
  1981. "get": {
  1982. "produces": [
  1983. "application/json"
  1984. ],
  1985. "tags": [
  1986. "repository"
  1987. ],
  1988. "summary": "List branch protections for a repository",
  1989. "operationId": "repoListBranchProtection",
  1990. "parameters": [
  1991. {
  1992. "type": "string",
  1993. "description": "owner of the repo",
  1994. "name": "owner",
  1995. "in": "path",
  1996. "required": true
  1997. },
  1998. {
  1999. "type": "string",
  2000. "description": "name of the repo",
  2001. "name": "repo",
  2002. "in": "path",
  2003. "required": true
  2004. }
  2005. ],
  2006. "responses": {
  2007. "200": {
  2008. "$ref": "#/responses/BranchProtectionList"
  2009. }
  2010. }
  2011. },
  2012. "post": {
  2013. "consumes": [
  2014. "application/json"
  2015. ],
  2016. "produces": [
  2017. "application/json"
  2018. ],
  2019. "tags": [
  2020. "repository"
  2021. ],
  2022. "summary": "Create a branch protections for a repository",
  2023. "operationId": "repoCreateBranchProtection",
  2024. "parameters": [
  2025. {
  2026. "type": "string",
  2027. "description": "owner of the repo",
  2028. "name": "owner",
  2029. "in": "path",
  2030. "required": true
  2031. },
  2032. {
  2033. "type": "string",
  2034. "description": "name of the repo",
  2035. "name": "repo",
  2036. "in": "path",
  2037. "required": true
  2038. },
  2039. {
  2040. "name": "body",
  2041. "in": "body",
  2042. "schema": {
  2043. "$ref": "#/definitions/CreateBranchProtectionOption"
  2044. }
  2045. }
  2046. ],
  2047. "responses": {
  2048. "201": {
  2049. "$ref": "#/responses/BranchProtection"
  2050. },
  2051. "403": {
  2052. "$ref": "#/responses/forbidden"
  2053. },
  2054. "404": {
  2055. "$ref": "#/responses/notFound"
  2056. },
  2057. "422": {
  2058. "$ref": "#/responses/validationError"
  2059. }
  2060. }
  2061. }
  2062. },
  2063. "/repos/{owner}/{repo}/branch_protections/{name}": {
  2064. "get": {
  2065. "produces": [
  2066. "application/json"
  2067. ],
  2068. "tags": [
  2069. "repository"
  2070. ],
  2071. "summary": "Get a specific branch protection for the repository",
  2072. "operationId": "repoGetBranchProtection",
  2073. "parameters": [
  2074. {
  2075. "type": "string",
  2076. "description": "owner of the repo",
  2077. "name": "owner",
  2078. "in": "path",
  2079. "required": true
  2080. },
  2081. {
  2082. "type": "string",
  2083. "description": "name of the repo",
  2084. "name": "repo",
  2085. "in": "path",
  2086. "required": true
  2087. },
  2088. {
  2089. "type": "string",
  2090. "description": "name of protected branch",
  2091. "name": "name",
  2092. "in": "path",
  2093. "required": true
  2094. }
  2095. ],
  2096. "responses": {
  2097. "200": {
  2098. "$ref": "#/responses/BranchProtection"
  2099. },
  2100. "404": {
  2101. "$ref": "#/responses/notFound"
  2102. }
  2103. }
  2104. },
  2105. "delete": {
  2106. "produces": [
  2107. "application/json"
  2108. ],
  2109. "tags": [
  2110. "repository"
  2111. ],
  2112. "summary": "Delete a specific branch protection for the repository",
  2113. "operationId": "repoDeleteBranchProtection",
  2114. "parameters": [
  2115. {
  2116. "type": "string",
  2117. "description": "owner of the repo",
  2118. "name": "owner",
  2119. "in": "path",
  2120. "required": true
  2121. },
  2122. {
  2123. "type": "string",
  2124. "description": "name of the repo",
  2125. "name": "repo",
  2126. "in": "path",
  2127. "required": true
  2128. },
  2129. {
  2130. "type": "string",
  2131. "description": "name of protected branch",
  2132. "name": "name",
  2133. "in": "path",
  2134. "required": true
  2135. }
  2136. ],
  2137. "responses": {
  2138. "204": {
  2139. "$ref": "#/responses/empty"
  2140. },
  2141. "404": {
  2142. "$ref": "#/responses/notFound"
  2143. }
  2144. }
  2145. },
  2146. "patch": {
  2147. "consumes": [
  2148. "application/json"
  2149. ],
  2150. "produces": [
  2151. "application/json"
  2152. ],
  2153. "tags": [
  2154. "repository"
  2155. ],
  2156. "summary": "Edit a branch protections for a repository. Only fields that are set will be changed",
  2157. "operationId": "repoEditBranchProtection",
  2158. "parameters": [
  2159. {
  2160. "type": "string",
  2161. "description": "owner of the repo",
  2162. "name": "owner",
  2163. "in": "path",
  2164. "required": true
  2165. },
  2166. {
  2167. "type": "string",
  2168. "description": "name of the repo",
  2169. "name": "repo",
  2170. "in": "path",
  2171. "required": true
  2172. },
  2173. {
  2174. "type": "string",
  2175. "description": "name of protected branch",
  2176. "name": "name",
  2177. "in": "path",
  2178. "required": true
  2179. },
  2180. {
  2181. "name": "body",
  2182. "in": "body",
  2183. "schema": {
  2184. "$ref": "#/definitions/EditBranchProtectionOption"
  2185. }
  2186. }
  2187. ],
  2188. "responses": {
  2189. "200": {
  2190. "$ref": "#/responses/BranchProtection"
  2191. },
  2192. "404": {
  2193. "$ref": "#/responses/notFound"
  2194. },
  2195. "422": {
  2196. "$ref": "#/responses/validationError"
  2197. }
  2198. }
  2199. }
  2200. },
  2201. "/repos/{owner}/{repo}/branches": {
  2202. "get": {
  2203. "produces": [
  2204. "application/json"
  2205. ],
  2206. "tags": [
  2207. "repository"
  2208. ],
  2209. "summary": "List a repository's branches",
  2210. "operationId": "repoListBranches",
  2211. "parameters": [
  2212. {
  2213. "type": "string",
  2214. "description": "owner of the repo",
  2215. "name": "owner",
  2216. "in": "path",
  2217. "required": true
  2218. },
  2219. {
  2220. "type": "string",
  2221. "description": "name of the repo",
  2222. "name": "repo",
  2223. "in": "path",
  2224. "required": true
  2225. }
  2226. ],
  2227. "responses": {
  2228. "200": {
  2229. "$ref": "#/responses/BranchList"
  2230. }
  2231. }
  2232. }
  2233. },
  2234. "/repos/{owner}/{repo}/branches/{branch}": {
  2235. "get": {
  2236. "produces": [
  2237. "application/json"
  2238. ],
  2239. "tags": [
  2240. "repository"
  2241. ],
  2242. "summary": "Retrieve a specific branch from a repository, including its effective branch protection",
  2243. "operationId": "repoGetBranch",
  2244. "parameters": [
  2245. {
  2246. "type": "string",
  2247. "description": "owner of the repo",
  2248. "name": "owner",
  2249. "in": "path",
  2250. "required": true
  2251. },
  2252. {
  2253. "type": "string",
  2254. "description": "name of the repo",
  2255. "name": "repo",
  2256. "in": "path",
  2257. "required": true
  2258. },
  2259. {
  2260. "type": "string",
  2261. "description": "branch to get",
  2262. "name": "branch",
  2263. "in": "path",
  2264. "required": true
  2265. }
  2266. ],
  2267. "responses": {
  2268. "200": {
  2269. "$ref": "#/responses/Branch"
  2270. }
  2271. }
  2272. }
  2273. },
  2274. "/repos/{owner}/{repo}/collaborators": {
  2275. "get": {
  2276. "produces": [
  2277. "application/json"
  2278. ],
  2279. "tags": [
  2280. "repository"
  2281. ],
  2282. "summary": "List a repository's collaborators",
  2283. "operationId": "repoListCollaborators",
  2284. "parameters": [
  2285. {
  2286. "type": "string",
  2287. "description": "owner of the repo",
  2288. "name": "owner",
  2289. "in": "path",
  2290. "required": true
  2291. },
  2292. {
  2293. "type": "string",
  2294. "description": "name of the repo",
  2295. "name": "repo",
  2296. "in": "path",
  2297. "required": true
  2298. },
  2299. {
  2300. "type": "integer",
  2301. "description": "page number of results to return (1-based)",
  2302. "name": "page",
  2303. "in": "query"
  2304. },
  2305. {
  2306. "type": "integer",
  2307. "description": "page size of results, maximum page size is 50",
  2308. "name": "limit",
  2309. "in": "query"
  2310. }
  2311. ],
  2312. "responses": {
  2313. "200": {
  2314. "$ref": "#/responses/UserList"
  2315. }
  2316. }
  2317. }
  2318. },
  2319. "/repos/{owner}/{repo}/collaborators/{collaborator}": {
  2320. "get": {
  2321. "produces": [
  2322. "application/json"
  2323. ],
  2324. "tags": [
  2325. "repository"
  2326. ],
  2327. "summary": "Check if a user is a collaborator of a repository",
  2328. "operationId": "repoCheckCollaborator",
  2329. "parameters": [
  2330. {
  2331. "type": "string",
  2332. "description": "owner of the repo",
  2333. "name": "owner",
  2334. "in": "path",
  2335. "required": true
  2336. },
  2337. {
  2338. "type": "string",
  2339. "description": "name of the repo",
  2340. "name": "repo",
  2341. "in": "path",
  2342. "required": true
  2343. },
  2344. {
  2345. "type": "string",
  2346. "description": "username of the collaborator",
  2347. "name": "collaborator",
  2348. "in": "path",
  2349. "required": true
  2350. }
  2351. ],
  2352. "responses": {
  2353. "204": {
  2354. "$ref": "#/responses/empty"
  2355. },
  2356. "404": {
  2357. "$ref": "#/responses/notFound"
  2358. },
  2359. "422": {
  2360. "$ref": "#/responses/validationError"
  2361. }
  2362. }
  2363. },
  2364. "put": {
  2365. "produces": [
  2366. "application/json"
  2367. ],
  2368. "tags": [
  2369. "repository"
  2370. ],
  2371. "summary": "Add a collaborator to a repository",
  2372. "operationId": "repoAddCollaborator",
  2373. "parameters": [
  2374. {
  2375. "type": "string",
  2376. "description": "owner of the repo",
  2377. "name": "owner",
  2378. "in": "path",
  2379. "required": true
  2380. },
  2381. {
  2382. "type": "string",
  2383. "description": "name of the repo",
  2384. "name": "repo",
  2385. "in": "path",
  2386. "required": true
  2387. },
  2388. {
  2389. "type": "string",
  2390. "description": "username of the collaborator to add",
  2391. "name": "collaborator",
  2392. "in": "path",
  2393. "required": true
  2394. },
  2395. {
  2396. "name": "body",
  2397. "in": "body",
  2398. "schema": {
  2399. "$ref": "#/definitions/AddCollaboratorOption"
  2400. }
  2401. }
  2402. ],
  2403. "responses": {
  2404. "204": {
  2405. "$ref": "#/responses/empty"
  2406. },
  2407. "422": {
  2408. "$ref": "#/responses/validationError"
  2409. }
  2410. }
  2411. },
  2412. "delete": {
  2413. "produces": [
  2414. "application/json"
  2415. ],
  2416. "tags": [
  2417. "repository"
  2418. ],
  2419. "summary": "Delete a collaborator from a repository",
  2420. "operationId": "repoDeleteCollaborator",
  2421. "parameters": [
  2422. {
  2423. "type": "string",
  2424. "description": "owner of the repo",
  2425. "name": "owner",
  2426. "in": "path",
  2427. "required": true
  2428. },
  2429. {
  2430. "type": "string",
  2431. "description": "name of the repo",
  2432. "name": "repo",
  2433. "in": "path",
  2434. "required": true
  2435. },
  2436. {
  2437. "type": "string",
  2438. "description": "username of the collaborator to delete",
  2439. "name": "collaborator",
  2440. "in": "path",
  2441. "required": true
  2442. }
  2443. ],
  2444. "responses": {
  2445. "204": {
  2446. "$ref": "#/responses/empty"
  2447. },
  2448. "422": {
  2449. "$ref": "#/responses/validationError"
  2450. }
  2451. }
  2452. }
  2453. },
  2454. "/repos/{owner}/{repo}/commits": {
  2455. "get": {
  2456. "produces": [
  2457. "application/json"
  2458. ],
  2459. "tags": [
  2460. "repository"
  2461. ],
  2462. "summary": "Get a list of all commits from a repository",
  2463. "operationId": "repoGetAllCommits",
  2464. "parameters": [
  2465. {
  2466. "type": "string",
  2467. "description": "owner of the repo",
  2468. "name": "owner",
  2469. "in": "path",
  2470. "required": true
  2471. },
  2472. {
  2473. "type": "string",
  2474. "description": "name of the repo",
  2475. "name": "repo",
  2476. "in": "path",
  2477. "required": true
  2478. },
  2479. {
  2480. "type": "string",
  2481. "description": "SHA or branch to start listing commits from (usually 'master')",
  2482. "name": "sha",
  2483. "in": "query"
  2484. },
  2485. {
  2486. "type": "integer",
  2487. "description": "page number of results to return (1-based)",
  2488. "name": "page",
  2489. "in": "query"
  2490. },
  2491. {
  2492. "type": "integer",
  2493. "description": "page size of results, maximum page size is 50",
  2494. "name": "limit",
  2495. "in": "query"
  2496. }
  2497. ],
  2498. "responses": {
  2499. "200": {
  2500. "$ref": "#/responses/CommitList"
  2501. },
  2502. "404": {
  2503. "$ref": "#/responses/notFound"
  2504. },
  2505. "409": {
  2506. "$ref": "#/responses/EmptyRepository"
  2507. }
  2508. }
  2509. }
  2510. },
  2511. "/repos/{owner}/{repo}/commits/{ref}": {
  2512. "get": {
  2513. "produces": [
  2514. "application/json"
  2515. ],
  2516. "tags": [
  2517. "repository"
  2518. ],
  2519. "summary": "Get a single commit from a repository",
  2520. "operationId": "repoGetSingleCommitByRef",
  2521. "parameters": [
  2522. {
  2523. "type": "string",
  2524. "description": "owner of the repo",
  2525. "name": "owner",
  2526. "in": "path",
  2527. "required": true
  2528. },
  2529. {
  2530. "type": "string",
  2531. "description": "name of the repo",
  2532. "name": "repo",
  2533. "in": "path",
  2534. "required": true
  2535. },
  2536. {
  2537. "type": "string",
  2538. "description": "a git ref",
  2539. "name": "ref",
  2540. "in": "path",
  2541. "required": true
  2542. }
  2543. ],
  2544. "responses": {
  2545. "200": {
  2546. "$ref": "#/responses/Commit"
  2547. },
  2548. "404": {
  2549. "$ref": "#/responses/notFound"
  2550. },
  2551. "422": {
  2552. "$ref": "#/responses/validationError"
  2553. }
  2554. }
  2555. }
  2556. },
  2557. "/repos/{owner}/{repo}/commits/{ref}/statuses": {
  2558. "get": {
  2559. "produces": [
  2560. "application/json"
  2561. ],
  2562. "tags": [
  2563. "repository"
  2564. ],
  2565. "summary": "Get a commit's combined status, by branch/tag/commit reference",
  2566. "operationId": "repoGetCombinedStatusByRef",
  2567. "parameters": [
  2568. {
  2569. "type": "string",
  2570. "description": "owner of the repo",
  2571. "name": "owner",
  2572. "in": "path",
  2573. "required": true
  2574. },
  2575. {
  2576. "type": "string",
  2577. "description": "name of the repo",
  2578. "name": "repo",
  2579. "in": "path",
  2580. "required": true
  2581. },
  2582. {
  2583. "type": "string",
  2584. "description": "name of branch/tag/commit",
  2585. "name": "ref",
  2586. "in": "path",
  2587. "required": true
  2588. },
  2589. {
  2590. "type": "integer",
  2591. "description": "page number of results",
  2592. "name": "page",
  2593. "in": "query"
  2594. }
  2595. ],
  2596. "responses": {
  2597. "200": {
  2598. "$ref": "#/responses/Status"
  2599. },
  2600. "400": {
  2601. "$ref": "#/responses/error"
  2602. }
  2603. }
  2604. }
  2605. },
  2606. "/repos/{owner}/{repo}/contents": {
  2607. "get": {
  2608. "produces": [
  2609. "application/json"
  2610. ],
  2611. "tags": [
  2612. "repository"
  2613. ],
  2614. "summary": "Gets the metadata of all the entries of the root dir",
  2615. "operationId": "repoGetContentsList",
  2616. "parameters": [
  2617. {
  2618. "type": "string",
  2619. "description": "owner of the repo",
  2620. "name": "owner",
  2621. "in": "path",
  2622. "required": true
  2623. },
  2624. {
  2625. "type": "string",
  2626. "description": "name of the repo",
  2627. "name": "repo",
  2628. "in": "path",
  2629. "required": true
  2630. },
  2631. {
  2632. "type": "string",
  2633. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  2634. "name": "ref",
  2635. "in": "query"
  2636. }
  2637. ],
  2638. "responses": {
  2639. "200": {
  2640. "$ref": "#/responses/ContentsListResponse"
  2641. },
  2642. "404": {
  2643. "$ref": "#/responses/notFound"
  2644. }
  2645. }
  2646. }
  2647. },
  2648. "/repos/{owner}/{repo}/contents/{filepath}": {
  2649. "get": {
  2650. "produces": [
  2651. "application/json"
  2652. ],
  2653. "tags": [
  2654. "repository"
  2655. ],
  2656. "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir",
  2657. "operationId": "repoGetContents",
  2658. "parameters": [
  2659. {
  2660. "type": "string",
  2661. "description": "owner of the repo",
  2662. "name": "owner",
  2663. "in": "path",
  2664. "required": true
  2665. },
  2666. {
  2667. "type": "string",
  2668. "description": "name of the repo",
  2669. "name": "repo",
  2670. "in": "path",
  2671. "required": true
  2672. },
  2673. {
  2674. "type": "string",
  2675. "description": "path of the dir, file, symlink or submodule in the repo",
  2676. "name": "filepath",
  2677. "in": "path",
  2678. "required": true
  2679. },
  2680. {
  2681. "type": "string",
  2682. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  2683. "name": "ref",
  2684. "in": "query"
  2685. }
  2686. ],
  2687. "responses": {
  2688. "200": {
  2689. "$ref": "#/responses/ContentsResponse"
  2690. },
  2691. "404": {
  2692. "$ref": "#/responses/notFound"
  2693. }
  2694. }
  2695. },
  2696. "put": {
  2697. "consumes": [
  2698. "application/json"
  2699. ],
  2700. "produces": [
  2701. "application/json"
  2702. ],
  2703. "tags": [
  2704. "repository"
  2705. ],
  2706. "summary": "Update a file in a repository",
  2707. "operationId": "repoUpdateFile",
  2708. "parameters": [
  2709. {
  2710. "type": "string",
  2711. "description": "owner of the repo",
  2712. "name": "owner",
  2713. "in": "path",
  2714. "required": true
  2715. },
  2716. {
  2717. "type": "string",
  2718. "description": "name of the repo",
  2719. "name": "repo",
  2720. "in": "path",
  2721. "required": true
  2722. },
  2723. {
  2724. "type": "string",
  2725. "description": "path of the file to update",
  2726. "name": "filepath",
  2727. "in": "path",
  2728. "required": true
  2729. },
  2730. {
  2731. "name": "body",
  2732. "in": "body",
  2733. "required": true,
  2734. "schema": {
  2735. "$ref": "#/definitions/UpdateFileOptions"
  2736. }
  2737. }
  2738. ],
  2739. "responses": {
  2740. "200": {
  2741. "$ref": "#/responses/FileResponse"
  2742. }
  2743. }
  2744. },
  2745. "post": {
  2746. "consumes": [
  2747. "application/json"
  2748. ],
  2749. "produces": [
  2750. "application/json"
  2751. ],
  2752. "tags": [
  2753. "repository"
  2754. ],
  2755. "summary": "Create a file in a repository",
  2756. "operationId": "repoCreateFile",
  2757. "parameters": [
  2758. {
  2759. "type": "string",
  2760. "description": "owner of the repo",
  2761. "name": "owner",
  2762. "in": "path",
  2763. "required": true
  2764. },
  2765. {
  2766. "type": "string",
  2767. "description": "name of the repo",
  2768. "name": "repo",
  2769. "in": "path",
  2770. "required": true
  2771. },
  2772. {
  2773. "type": "string",
  2774. "description": "path of the file to create",
  2775. "name": "filepath",
  2776. "in": "path",
  2777. "required": true
  2778. },
  2779. {
  2780. "name": "body",
  2781. "in": "body",
  2782. "required": true,
  2783. "schema": {
  2784. "$ref": "#/definitions/CreateFileOptions"
  2785. }
  2786. }
  2787. ],
  2788. "responses": {
  2789. "201": {
  2790. "$ref": "#/responses/FileResponse"
  2791. }
  2792. }
  2793. },
  2794. "delete": {
  2795. "consumes": [
  2796. "application/json"
  2797. ],
  2798. "produces": [
  2799. "application/json"
  2800. ],
  2801. "tags": [
  2802. "repository"
  2803. ],
  2804. "summary": "Delete a file in a repository",
  2805. "operationId": "repoDeleteFile",
  2806. "parameters": [
  2807. {
  2808. "type": "string",
  2809. "description": "owner of the repo",
  2810. "name": "owner",
  2811. "in": "path",
  2812. "required": true
  2813. },
  2814. {
  2815. "type": "string",
  2816. "description": "name of the repo",
  2817. "name": "repo",
  2818. "in": "path",
  2819. "required": true
  2820. },
  2821. {
  2822. "type": "string",
  2823. "description": "path of the file to delete",
  2824. "name": "filepath",
  2825. "in": "path",
  2826. "required": true
  2827. },
  2828. {
  2829. "name": "body",
  2830. "in": "body",
  2831. "required": true,
  2832. "schema": {
  2833. "$ref": "#/definitions/DeleteFileOptions"
  2834. }
  2835. }
  2836. ],
  2837. "responses": {
  2838. "200": {
  2839. "$ref": "#/responses/FileDeleteResponse"
  2840. },
  2841. "400": {
  2842. "$ref": "#/responses/error"
  2843. },
  2844. "403": {
  2845. "$ref": "#/responses/error"
  2846. },
  2847. "404": {
  2848. "$ref": "#/responses/error"
  2849. }
  2850. }
  2851. }
  2852. },
  2853. "/repos/{owner}/{repo}/editorconfig/{filepath}": {
  2854. "get": {
  2855. "produces": [
  2856. "application/json"
  2857. ],
  2858. "tags": [
  2859. "repository"
  2860. ],
  2861. "summary": "Get the EditorConfig definitions of a file in a repository",
  2862. "operationId": "repoGetEditorConfig",
  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. "type": "string",
  2880. "description": "filepath of file to get",
  2881. "name": "filepath",
  2882. "in": "path",
  2883. "required": true
  2884. }
  2885. ],
  2886. "responses": {
  2887. "200": {
  2888. "description": "success"
  2889. },
  2890. "404": {
  2891. "$ref": "#/responses/notFound"
  2892. }
  2893. }
  2894. }
  2895. },
  2896. "/repos/{owner}/{repo}/forks": {
  2897. "get": {
  2898. "produces": [
  2899. "application/json"
  2900. ],
  2901. "tags": [
  2902. "repository"
  2903. ],
  2904. "summary": "List a repository's forks",
  2905. "operationId": "listForks",
  2906. "parameters": [
  2907. {
  2908. "type": "string",
  2909. "description": "owner of the repo",
  2910. "name": "owner",
  2911. "in": "path",
  2912. "required": true
  2913. },
  2914. {
  2915. "type": "string",
  2916. "description": "name of the repo",
  2917. "name": "repo",
  2918. "in": "path",
  2919. "required": true
  2920. },
  2921. {
  2922. "type": "integer",
  2923. "description": "page number of results to return (1-based)",
  2924. "name": "page",
  2925. "in": "query"
  2926. },
  2927. {
  2928. "type": "integer",
  2929. "description": "page size of results, maximum page size is 50",
  2930. "name": "limit",
  2931. "in": "query"
  2932. }
  2933. ],
  2934. "responses": {
  2935. "200": {
  2936. "$ref": "#/responses/RepositoryList"
  2937. }
  2938. }
  2939. },
  2940. "post": {
  2941. "produces": [
  2942. "application/json"
  2943. ],
  2944. "tags": [
  2945. "repository"
  2946. ],
  2947. "summary": "Fork a repository",
  2948. "operationId": "createFork",
  2949. "parameters": [
  2950. {
  2951. "type": "string",
  2952. "description": "owner of the repo to fork",
  2953. "name": "owner",
  2954. "in": "path",
  2955. "required": true
  2956. },
  2957. {
  2958. "type": "string",
  2959. "description": "name of the repo to fork",
  2960. "name": "repo",
  2961. "in": "path",
  2962. "required": true
  2963. },
  2964. {
  2965. "name": "body",
  2966. "in": "body",
  2967. "schema": {
  2968. "$ref": "#/definitions/CreateForkOption"
  2969. }
  2970. }
  2971. ],
  2972. "responses": {
  2973. "202": {
  2974. "$ref": "#/responses/Repository"
  2975. },
  2976. "403": {
  2977. "$ref": "#/responses/forbidden"
  2978. },
  2979. "422": {
  2980. "$ref": "#/responses/validationError"
  2981. }
  2982. }
  2983. }
  2984. },
  2985. "/repos/{owner}/{repo}/git/blobs/{sha}": {
  2986. "get": {
  2987. "produces": [
  2988. "application/json"
  2989. ],
  2990. "tags": [
  2991. "repository"
  2992. ],
  2993. "summary": "Gets the blob of a repository.",
  2994. "operationId": "GetBlob",
  2995. "parameters": [
  2996. {
  2997. "type": "string",
  2998. "description": "owner of the repo",
  2999. "name": "owner",
  3000. "in": "path",
  3001. "required": true
  3002. },
  3003. {
  3004. "type": "string",
  3005. "description": "name of the repo",
  3006. "name": "repo",
  3007. "in": "path",
  3008. "required": true
  3009. },
  3010. {
  3011. "type": "string",
  3012. "description": "sha of the commit",
  3013. "name": "sha",
  3014. "in": "path",
  3015. "required": true
  3016. }
  3017. ],
  3018. "responses": {
  3019. "200": {
  3020. "$ref": "#/responses/GitBlobResponse"
  3021. },
  3022. "400": {
  3023. "$ref": "#/responses/error"
  3024. }
  3025. }
  3026. }
  3027. },
  3028. "/repos/{owner}/{repo}/git/commits/{sha}": {
  3029. "get": {
  3030. "produces": [
  3031. "application/json"
  3032. ],
  3033. "tags": [
  3034. "repository"
  3035. ],
  3036. "summary": "Get a single commit from a repository",
  3037. "operationId": "repoGetSingleCommitBySHA",
  3038. "parameters": [
  3039. {
  3040. "type": "string",
  3041. "description": "owner of the repo",
  3042. "name": "owner",
  3043. "in": "path",
  3044. "required": true
  3045. },
  3046. {
  3047. "type": "string",
  3048. "description": "name of the repo",
  3049. "name": "repo",
  3050. "in": "path",
  3051. "required": true
  3052. },
  3053. {
  3054. "type": "string",
  3055. "description": "the commit hash",
  3056. "name": "sha",
  3057. "in": "path",
  3058. "required": true
  3059. }
  3060. ],
  3061. "responses": {
  3062. "200": {
  3063. "$ref": "#/responses/Commit"
  3064. },
  3065. "404": {
  3066. "$ref": "#/responses/notFound"
  3067. },
  3068. "422": {
  3069. "$ref": "#/responses/validationError"
  3070. }
  3071. }
  3072. }
  3073. },
  3074. "/repos/{owner}/{repo}/git/refs": {
  3075. "get": {
  3076. "produces": [
  3077. "application/json"
  3078. ],
  3079. "tags": [
  3080. "repository"
  3081. ],
  3082. "summary": "Get specified ref or filtered repository's refs",
  3083. "operationId": "repoListAllGitRefs",
  3084. "parameters": [
  3085. {
  3086. "type": "string",
  3087. "description": "owner of the repo",
  3088. "name": "owner",
  3089. "in": "path",
  3090. "required": true
  3091. },
  3092. {
  3093. "type": "string",
  3094. "description": "name of the repo",
  3095. "name": "repo",
  3096. "in": "path",
  3097. "required": true
  3098. }
  3099. ],
  3100. "responses": {
  3101. "200": {
  3102. "$ref": "#/responses/ReferenceList"
  3103. },
  3104. "404": {
  3105. "$ref": "#/responses/notFound"
  3106. }
  3107. }
  3108. }
  3109. },
  3110. "/repos/{owner}/{repo}/git/refs/{ref}": {
  3111. "get": {
  3112. "produces": [
  3113. "application/json"
  3114. ],
  3115. "tags": [
  3116. "repository"
  3117. ],
  3118. "summary": "Get specified ref or filtered repository's refs",
  3119. "operationId": "repoListGitRefs",
  3120. "parameters": [
  3121. {
  3122. "type": "string",
  3123. "description": "owner of the repo",
  3124. "name": "owner",
  3125. "in": "path",
  3126. "required": true
  3127. },
  3128. {
  3129. "type": "string",
  3130. "description": "name of the repo",
  3131. "name": "repo",
  3132. "in": "path",
  3133. "required": true
  3134. },
  3135. {
  3136. "type": "string",
  3137. "description": "part or full name of the ref",
  3138. "name": "ref",
  3139. "in": "path",
  3140. "required": true
  3141. }
  3142. ],
  3143. "responses": {
  3144. "200": {
  3145. "$ref": "#/responses/ReferenceList"
  3146. },
  3147. "404": {
  3148. "$ref": "#/responses/notFound"
  3149. }
  3150. }
  3151. }
  3152. },
  3153. "/repos/{owner}/{repo}/git/tags/{sha}": {
  3154. "get": {
  3155. "produces": [
  3156. "application/json"
  3157. ],
  3158. "tags": [
  3159. "repository"
  3160. ],
  3161. "summary": "Gets the tag object of an annotated tag (not lightweight tags)",
  3162. "operationId": "GetTag",
  3163. "parameters": [
  3164. {
  3165. "type": "string",
  3166. "description": "owner of the repo",
  3167. "name": "owner",
  3168. "in": "path",
  3169. "required": true
  3170. },
  3171. {
  3172. "type": "string",
  3173. "description": "name of the repo",
  3174. "name": "repo",
  3175. "in": "path",
  3176. "required": true
  3177. },
  3178. {
  3179. "type": "string",
  3180. "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.",
  3181. "name": "sha",
  3182. "in": "path",
  3183. "required": true
  3184. }
  3185. ],
  3186. "responses": {
  3187. "200": {
  3188. "$ref": "#/responses/AnnotatedTag"
  3189. },
  3190. "400": {
  3191. "$ref": "#/responses/error"
  3192. }
  3193. }
  3194. }
  3195. },
  3196. "/repos/{owner}/{repo}/git/trees/{sha}": {
  3197. "get": {
  3198. "produces": [
  3199. "application/json"
  3200. ],
  3201. "tags": [
  3202. "repository"
  3203. ],
  3204. "summary": "Gets the tree of a repository.",
  3205. "operationId": "GetTree",
  3206. "parameters": [
  3207. {
  3208. "type": "string",
  3209. "description": "owner of the repo",
  3210. "name": "owner",
  3211. "in": "path",
  3212. "required": true
  3213. },
  3214. {
  3215. "type": "string",
  3216. "description": "name of the repo",
  3217. "name": "repo",
  3218. "in": "path",
  3219. "required": true
  3220. },
  3221. {
  3222. "type": "string",
  3223. "description": "sha of the commit",
  3224. "name": "sha",
  3225. "in": "path",
  3226. "required": true
  3227. },
  3228. {
  3229. "type": "boolean",
  3230. "description": "show all directories and files",
  3231. "name": "recursive",
  3232. "in": "query"
  3233. },
  3234. {
  3235. "type": "integer",
  3236. "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",
  3237. "name": "page",
  3238. "in": "query"
  3239. },
  3240. {
  3241. "type": "integer",
  3242. "description": "number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE",
  3243. "name": "per_page",
  3244. "in": "query"
  3245. }
  3246. ],
  3247. "responses": {
  3248. "200": {
  3249. "$ref": "#/responses/GitTreeResponse"
  3250. },
  3251. "400": {
  3252. "$ref": "#/responses/error"
  3253. }
  3254. }
  3255. }
  3256. },
  3257. "/repos/{owner}/{repo}/hooks": {
  3258. "get": {
  3259. "produces": [
  3260. "application/json"
  3261. ],
  3262. "tags": [
  3263. "repository"
  3264. ],
  3265. "summary": "List the hooks in a repository",
  3266. "operationId": "repoListHooks",
  3267. "parameters": [
  3268. {
  3269. "type": "string",
  3270. "description": "owner of the repo",
  3271. "name": "owner",
  3272. "in": "path",
  3273. "required": true
  3274. },
  3275. {
  3276. "type": "string",
  3277. "description": "name of the repo",
  3278. "name": "repo",
  3279. "in": "path",
  3280. "required": true
  3281. },
  3282. {
  3283. "type": "integer",
  3284. "description": "page number of results to return (1-based)",
  3285. "name": "page",
  3286. "in": "query"
  3287. },
  3288. {
  3289. "type": "integer",
  3290. "description": "page size of results, maximum page size is 50",
  3291. "name": "limit",
  3292. "in": "query"
  3293. }
  3294. ],
  3295. "responses": {
  3296. "200": {
  3297. "$ref": "#/responses/HookList"
  3298. }
  3299. }
  3300. },
  3301. "post": {
  3302. "consumes": [
  3303. "application/json"
  3304. ],
  3305. "produces": [
  3306. "application/json"
  3307. ],
  3308. "tags": [
  3309. "repository"
  3310. ],
  3311. "summary": "Create a hook",
  3312. "operationId": "repoCreateHook",
  3313. "parameters": [
  3314. {
  3315. "type": "string",
  3316. "description": "owner of the repo",
  3317. "name": "owner",
  3318. "in": "path",
  3319. "required": true
  3320. },
  3321. {
  3322. "type": "string",
  3323. "description": "name of the repo",
  3324. "name": "repo",
  3325. "in": "path",
  3326. "required": true
  3327. },
  3328. {
  3329. "name": "body",
  3330. "in": "body",
  3331. "schema": {
  3332. "$ref": "#/definitions/CreateHookOption"
  3333. }
  3334. }
  3335. ],
  3336. "responses": {
  3337. "201": {
  3338. "$ref": "#/responses/Hook"
  3339. }
  3340. }
  3341. }
  3342. },
  3343. "/repos/{owner}/{repo}/hooks/git": {
  3344. "get": {
  3345. "produces": [
  3346. "application/json"
  3347. ],
  3348. "tags": [
  3349. "repository"
  3350. ],
  3351. "summary": "List the Git hooks in a repository",
  3352. "operationId": "repoListGitHooks",
  3353. "parameters": [
  3354. {
  3355. "type": "string",
  3356. "description": "owner of the repo",
  3357. "name": "owner",
  3358. "in": "path",
  3359. "required": true
  3360. },
  3361. {
  3362. "type": "string",
  3363. "description": "name of the repo",
  3364. "name": "repo",
  3365. "in": "path",
  3366. "required": true
  3367. }
  3368. ],
  3369. "responses": {
  3370. "200": {
  3371. "$ref": "#/responses/GitHookList"
  3372. }
  3373. }
  3374. }
  3375. },
  3376. "/repos/{owner}/{repo}/hooks/git/{id}": {
  3377. "get": {
  3378. "produces": [
  3379. "application/json"
  3380. ],
  3381. "tags": [
  3382. "repository"
  3383. ],
  3384. "summary": "Get a Git hook",
  3385. "operationId": "repoGetGitHook",
  3386. "parameters": [
  3387. {
  3388. "type": "string",
  3389. "description": "owner of the repo",
  3390. "name": "owner",
  3391. "in": "path",
  3392. "required": true
  3393. },
  3394. {
  3395. "type": "string",
  3396. "description": "name of the repo",
  3397. "name": "repo",
  3398. "in": "path",
  3399. "required": true
  3400. },
  3401. {
  3402. "type": "string",
  3403. "description": "id of the hook to get",
  3404. "name": "id",
  3405. "in": "path",
  3406. "required": true
  3407. }
  3408. ],
  3409. "responses": {
  3410. "200": {
  3411. "$ref": "#/responses/GitHook"
  3412. },
  3413. "404": {
  3414. "$ref": "#/responses/notFound"
  3415. }
  3416. }
  3417. },
  3418. "delete": {
  3419. "produces": [
  3420. "application/json"
  3421. ],
  3422. "tags": [
  3423. "repository"
  3424. ],
  3425. "summary": "Delete a Git hook in a repository",
  3426. "operationId": "repoDeleteGitHook",
  3427. "parameters": [
  3428. {
  3429. "type": "string",
  3430. "description": "owner of the repo",
  3431. "name": "owner",
  3432. "in": "path",
  3433. "required": true
  3434. },
  3435. {
  3436. "type": "string",
  3437. "description": "name of the repo",
  3438. "name": "repo",
  3439. "in": "path",
  3440. "required": true
  3441. },
  3442. {
  3443. "type": "string",
  3444. "description": "id of the hook to get",
  3445. "name": "id",
  3446. "in": "path",
  3447. "required": true
  3448. }
  3449. ],
  3450. "responses": {
  3451. "204": {
  3452. "$ref": "#/responses/empty"
  3453. },
  3454. "404": {
  3455. "$ref": "#/responses/notFound"
  3456. }
  3457. }
  3458. },
  3459. "patch": {
  3460. "produces": [
  3461. "application/json"
  3462. ],
  3463. "tags": [
  3464. "repository"
  3465. ],
  3466. "summary": "Edit a Git hook in a repository",
  3467. "operationId": "repoEditGitHook",
  3468. "parameters": [
  3469. {
  3470. "type": "string",
  3471. "description": "owner of the repo",
  3472. "name": "owner",
  3473. "in": "path",
  3474. "required": true
  3475. },
  3476. {
  3477. "type": "string",
  3478. "description": "name of the repo",
  3479. "name": "repo",
  3480. "in": "path",
  3481. "required": true
  3482. },
  3483. {
  3484. "type": "string",
  3485. "description": "id of the hook to get",
  3486. "name": "id",
  3487. "in": "path",
  3488. "required": true
  3489. },
  3490. {
  3491. "name": "body",
  3492. "in": "body",
  3493. "schema": {
  3494. "$ref": "#/definitions/EditGitHookOption"
  3495. }
  3496. }
  3497. ],
  3498. "responses": {
  3499. "200": {
  3500. "$ref": "#/responses/GitHook"
  3501. },
  3502. "404": {
  3503. "$ref": "#/responses/notFound"
  3504. }
  3505. }
  3506. }
  3507. },
  3508. "/repos/{owner}/{repo}/hooks/{id}": {
  3509. "get": {
  3510. "produces": [
  3511. "application/json"
  3512. ],
  3513. "tags": [
  3514. "repository"
  3515. ],
  3516. "summary": "Get a hook",
  3517. "operationId": "repoGetHook",
  3518. "parameters": [
  3519. {
  3520. "type": "string",
  3521. "description": "owner of the repo",
  3522. "name": "owner",
  3523. "in": "path",
  3524. "required": true
  3525. },
  3526. {
  3527. "type": "string",
  3528. "description": "name of the repo",
  3529. "name": "repo",
  3530. "in": "path",
  3531. "required": true
  3532. },
  3533. {
  3534. "type": "integer",
  3535. "format": "int64",
  3536. "description": "id of the hook to get",
  3537. "name": "id",
  3538. "in": "path",
  3539. "required": true
  3540. }
  3541. ],
  3542. "responses": {
  3543. "200": {
  3544. "$ref": "#/responses/Hook"
  3545. },
  3546. "404": {
  3547. "$ref": "#/responses/notFound"
  3548. }
  3549. }
  3550. },
  3551. "delete": {
  3552. "produces": [
  3553. "application/json"
  3554. ],
  3555. "tags": [
  3556. "repository"
  3557. ],
  3558. "summary": "Delete a hook in a repository",
  3559. "operationId": "repoDeleteHook",
  3560. "parameters": [
  3561. {
  3562. "type": "string",
  3563. "description": "owner of the repo",
  3564. "name": "owner",
  3565. "in": "path",
  3566. "required": true
  3567. },
  3568. {
  3569. "type": "string",
  3570. "description": "name of the repo",
  3571. "name": "repo",
  3572. "in": "path",
  3573. "required": true
  3574. },
  3575. {
  3576. "type": "integer",
  3577. "format": "int64",
  3578. "description": "id of the hook to delete",
  3579. "name": "id",
  3580. "in": "path",
  3581. "required": true
  3582. }
  3583. ],
  3584. "responses": {
  3585. "204": {
  3586. "$ref": "#/responses/empty"
  3587. },
  3588. "404": {
  3589. "$ref": "#/responses/notFound"
  3590. }
  3591. }
  3592. },
  3593. "patch": {
  3594. "produces": [
  3595. "application/json"
  3596. ],
  3597. "tags": [
  3598. "repository"
  3599. ],
  3600. "summary": "Edit a hook in a repository",
  3601. "operationId": "repoEditHook",
  3602. "parameters": [
  3603. {
  3604. "type": "string",
  3605. "description": "owner of the repo",
  3606. "name": "owner",
  3607. "in": "path",
  3608. "required": true
  3609. },
  3610. {
  3611. "type": "string",
  3612. "description": "name of the repo",
  3613. "name": "repo",
  3614. "in": "path",
  3615. "required": true
  3616. },
  3617. {
  3618. "type": "integer",
  3619. "format": "int64",
  3620. "description": "index of the hook",
  3621. "name": "id",
  3622. "in": "path",
  3623. "required": true
  3624. },
  3625. {
  3626. "name": "body",
  3627. "in": "body",
  3628. "schema": {
  3629. "$ref": "#/definitions/EditHookOption"
  3630. }
  3631. }
  3632. ],
  3633. "responses": {
  3634. "200": {
  3635. "$ref": "#/responses/Hook"
  3636. }
  3637. }
  3638. }
  3639. },
  3640. "/repos/{owner}/{repo}/hooks/{id}/tests": {
  3641. "post": {
  3642. "produces": [
  3643. "application/json"
  3644. ],
  3645. "tags": [
  3646. "repository"
  3647. ],
  3648. "summary": "Test a push webhook",
  3649. "operationId": "repoTestHook",
  3650. "parameters": [
  3651. {
  3652. "type": "string",
  3653. "description": "owner of the repo",
  3654. "name": "owner",
  3655. "in": "path",
  3656. "required": true
  3657. },
  3658. {
  3659. "type": "string",
  3660. "description": "name of the repo",
  3661. "name": "repo",
  3662. "in": "path",
  3663. "required": true
  3664. },
  3665. {
  3666. "type": "integer",
  3667. "format": "int64",
  3668. "description": "id of the hook to test",
  3669. "name": "id",
  3670. "in": "path",
  3671. "required": true
  3672. }
  3673. ],
  3674. "responses": {
  3675. "204": {
  3676. "$ref": "#/responses/empty"
  3677. }
  3678. }
  3679. }
  3680. },
  3681. "/repos/{owner}/{repo}/issues": {
  3682. "get": {
  3683. "produces": [
  3684. "application/json"
  3685. ],
  3686. "tags": [
  3687. "issue"
  3688. ],
  3689. "summary": "List a repository's issues",
  3690. "operationId": "issueListIssues",
  3691. "parameters": [
  3692. {
  3693. "type": "string",
  3694. "description": "owner of the repo",
  3695. "name": "owner",
  3696. "in": "path",
  3697. "required": true
  3698. },
  3699. {
  3700. "type": "string",
  3701. "description": "name of the repo",
  3702. "name": "repo",
  3703. "in": "path",
  3704. "required": true
  3705. },
  3706. {
  3707. "type": "string",
  3708. "description": "whether issue is open or closed",
  3709. "name": "state",
  3710. "in": "query"
  3711. },
  3712. {
  3713. "type": "string",
  3714. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  3715. "name": "labels",
  3716. "in": "query"
  3717. },
  3718. {
  3719. "type": "string",
  3720. "description": "search string",
  3721. "name": "q",
  3722. "in": "query"
  3723. },
  3724. {
  3725. "type": "string",
  3726. "description": "filter by type (issues / pulls) if set",
  3727. "name": "type",
  3728. "in": "query"
  3729. },
  3730. {
  3731. "type": "integer",
  3732. "description": "page number of results to return (1-based)",
  3733. "name": "page",
  3734. "in": "query"
  3735. },
  3736. {
  3737. "type": "integer",
  3738. "description": "page size of results, maximum page size is 50",
  3739. "name": "limit",
  3740. "in": "query"
  3741. }
  3742. ],
  3743. "responses": {
  3744. "200": {
  3745. "$ref": "#/responses/IssueList"
  3746. }
  3747. }
  3748. },
  3749. "post": {
  3750. "consumes": [
  3751. "application/json"
  3752. ],
  3753. "produces": [
  3754. "application/json"
  3755. ],
  3756. "tags": [
  3757. "issue"
  3758. ],
  3759. "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  3760. "operationId": "issueCreateIssue",
  3761. "parameters": [
  3762. {
  3763. "type": "string",
  3764. "description": "owner of the repo",
  3765. "name": "owner",
  3766. "in": "path",
  3767. "required": true
  3768. },
  3769. {
  3770. "type": "string",
  3771. "description": "name of the repo",
  3772. "name": "repo",
  3773. "in": "path",
  3774. "required": true
  3775. },
  3776. {
  3777. "name": "body",
  3778. "in": "body",
  3779. "schema": {
  3780. "$ref": "#/definitions/CreateIssueOption"
  3781. }
  3782. }
  3783. ],
  3784. "responses": {
  3785. "201": {
  3786. "$ref": "#/responses/Issue"
  3787. },
  3788. "403": {
  3789. "$ref": "#/responses/forbidden"
  3790. },
  3791. "412": {
  3792. "$ref": "#/responses/error"
  3793. },
  3794. "422": {
  3795. "$ref": "#/responses/validationError"
  3796. }
  3797. }
  3798. }
  3799. },
  3800. "/repos/{owner}/{repo}/issues/comments": {
  3801. "get": {
  3802. "produces": [
  3803. "application/json"
  3804. ],
  3805. "tags": [
  3806. "issue"
  3807. ],
  3808. "summary": "List all comments in a repository",
  3809. "operationId": "issueGetRepoComments",
  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": "string",
  3827. "format": "date-time",
  3828. "description": "if provided, only comments updated since the provided time are returned.",
  3829. "name": "since",
  3830. "in": "query"
  3831. },
  3832. {
  3833. "type": "string",
  3834. "format": "date-time",
  3835. "description": "if provided, only comments updated before the provided time are returned.",
  3836. "name": "before",
  3837. "in": "query"
  3838. },
  3839. {
  3840. "type": "integer",
  3841. "description": "page number of results to return (1-based)",
  3842. "name": "page",
  3843. "in": "query"
  3844. },
  3845. {
  3846. "type": "integer",
  3847. "description": "page size of results, maximum page size is 50",
  3848. "name": "limit",
  3849. "in": "query"
  3850. }
  3851. ],
  3852. "responses": {
  3853. "200": {
  3854. "$ref": "#/responses/CommentList"
  3855. }
  3856. }
  3857. }
  3858. },
  3859. "/repos/{owner}/{repo}/issues/comments/{id}": {
  3860. "get": {
  3861. "consumes": [
  3862. "application/json"
  3863. ],
  3864. "produces": [
  3865. "application/json"
  3866. ],
  3867. "tags": [
  3868. "issue"
  3869. ],
  3870. "summary": "Get a comment",
  3871. "operationId": "issueGetComment",
  3872. "parameters": [
  3873. {
  3874. "type": "string",
  3875. "description": "owner of the repo",
  3876. "name": "owner",
  3877. "in": "path",
  3878. "required": true
  3879. },
  3880. {
  3881. "type": "string",
  3882. "description": "name of the repo",
  3883. "name": "repo",
  3884. "in": "path",
  3885. "required": true
  3886. },
  3887. {
  3888. "type": "integer",
  3889. "format": "int64",
  3890. "description": "id of the comment",
  3891. "name": "id",
  3892. "in": "path",
  3893. "required": true
  3894. }
  3895. ],
  3896. "responses": {
  3897. "200": {
  3898. "$ref": "#/responses/Comment"
  3899. },
  3900. "204": {
  3901. "$ref": "#/responses/empty"
  3902. },
  3903. "403": {
  3904. "$ref": "#/responses/forbidden"
  3905. },
  3906. "404": {
  3907. "$ref": "#/responses/notFound"
  3908. }
  3909. }
  3910. },
  3911. "delete": {
  3912. "tags": [
  3913. "issue"
  3914. ],
  3915. "summary": "Delete a comment",
  3916. "operationId": "issueDeleteComment",
  3917. "parameters": [
  3918. {
  3919. "type": "string",
  3920. "description": "owner of the repo",
  3921. "name": "owner",
  3922. "in": "path",
  3923. "required": true
  3924. },
  3925. {
  3926. "type": "string",
  3927. "description": "name of the repo",
  3928. "name": "repo",
  3929. "in": "path",
  3930. "required": true
  3931. },
  3932. {
  3933. "type": "integer",
  3934. "format": "int64",
  3935. "description": "id of comment to delete",
  3936. "name": "id",
  3937. "in": "path",
  3938. "required": true
  3939. }
  3940. ],
  3941. "responses": {
  3942. "204": {
  3943. "$ref": "#/responses/empty"
  3944. },
  3945. "403": {
  3946. "$ref": "#/responses/forbidden"
  3947. },
  3948. "404": {
  3949. "$ref": "#/responses/notFound"
  3950. }
  3951. }
  3952. },
  3953. "patch": {
  3954. "consumes": [
  3955. "application/json"
  3956. ],
  3957. "produces": [
  3958. "application/json"
  3959. ],
  3960. "tags": [
  3961. "issue"
  3962. ],
  3963. "summary": "Edit a comment",
  3964. "operationId": "issueEditComment",
  3965. "parameters": [
  3966. {
  3967. "type": "string",
  3968. "description": "owner of the repo",
  3969. "name": "owner",
  3970. "in": "path",
  3971. "required": true
  3972. },
  3973. {
  3974. "type": "string",
  3975. "description": "name of the repo",
  3976. "name": "repo",
  3977. "in": "path",
  3978. "required": true
  3979. },
  3980. {
  3981. "type": "integer",
  3982. "format": "int64",
  3983. "description": "id of the comment to edit",
  3984. "name": "id",
  3985. "in": "path",
  3986. "required": true
  3987. },
  3988. {
  3989. "name": "body",
  3990. "in": "body",
  3991. "schema": {
  3992. "$ref": "#/definitions/EditIssueCommentOption"
  3993. }
  3994. }
  3995. ],
  3996. "responses": {
  3997. "200": {
  3998. "$ref": "#/responses/Comment"
  3999. },
  4000. "204": {
  4001. "$ref": "#/responses/empty"
  4002. },
  4003. "403": {
  4004. "$ref": "#/responses/forbidden"
  4005. },
  4006. "404": {
  4007. "$ref": "#/responses/notFound"
  4008. }
  4009. }
  4010. }
  4011. },
  4012. "/repos/{owner}/{repo}/issues/comments/{id}/reactions": {
  4013. "get": {
  4014. "consumes": [
  4015. "application/json"
  4016. ],
  4017. "produces": [
  4018. "application/json"
  4019. ],
  4020. "tags": [
  4021. "issue"
  4022. ],
  4023. "summary": "Get a list of reactions from a comment of an issue",
  4024. "operationId": "issueGetCommentReactions",
  4025. "parameters": [
  4026. {
  4027. "type": "string",
  4028. "description": "owner of the repo",
  4029. "name": "owner",
  4030. "in": "path",
  4031. "required": true
  4032. },
  4033. {
  4034. "type": "string",
  4035. "description": "name of the repo",
  4036. "name": "repo",
  4037. "in": "path",
  4038. "required": true
  4039. },
  4040. {
  4041. "type": "integer",
  4042. "format": "int64",
  4043. "description": "id of the comment to edit",
  4044. "name": "id",
  4045. "in": "path",
  4046. "required": true
  4047. }
  4048. ],
  4049. "responses": {
  4050. "200": {
  4051. "$ref": "#/responses/ReactionList"
  4052. },
  4053. "403": {
  4054. "$ref": "#/responses/forbidden"
  4055. }
  4056. }
  4057. },
  4058. "post": {
  4059. "consumes": [
  4060. "application/json"
  4061. ],
  4062. "produces": [
  4063. "application/json"
  4064. ],
  4065. "tags": [
  4066. "issue"
  4067. ],
  4068. "summary": "Add a reaction to a comment of an issue",
  4069. "operationId": "issuePostCommentReaction",
  4070. "parameters": [
  4071. {
  4072. "type": "string",
  4073. "description": "owner of the repo",
  4074. "name": "owner",
  4075. "in": "path",
  4076. "required": true
  4077. },
  4078. {
  4079. "type": "string",
  4080. "description": "name of the repo",
  4081. "name": "repo",
  4082. "in": "path",
  4083. "required": true
  4084. },
  4085. {
  4086. "type": "integer",
  4087. "format": "int64",
  4088. "description": "id of the comment to edit",
  4089. "name": "id",
  4090. "in": "path",
  4091. "required": true
  4092. },
  4093. {
  4094. "name": "content",
  4095. "in": "body",
  4096. "schema": {
  4097. "$ref": "#/definitions/EditReactionOption"
  4098. }
  4099. }
  4100. ],
  4101. "responses": {
  4102. "200": {
  4103. "$ref": "#/responses/Reaction"
  4104. },
  4105. "201": {
  4106. "$ref": "#/responses/Reaction"
  4107. },
  4108. "403": {
  4109. "$ref": "#/responses/forbidden"
  4110. }
  4111. }
  4112. },
  4113. "delete": {
  4114. "consumes": [
  4115. "application/json"
  4116. ],
  4117. "produces": [
  4118. "application/json"
  4119. ],
  4120. "tags": [
  4121. "issue"
  4122. ],
  4123. "summary": "Remove a reaction from a comment of an issue",
  4124. "operationId": "issueDeleteCommentReaction",
  4125. "parameters": [
  4126. {
  4127. "type": "string",
  4128. "description": "owner of the repo",
  4129. "name": "owner",
  4130. "in": "path",
  4131. "required": true
  4132. },
  4133. {
  4134. "type": "string",
  4135. "description": "name of the repo",
  4136. "name": "repo",
  4137. "in": "path",
  4138. "required": true
  4139. },
  4140. {
  4141. "type": "integer",
  4142. "format": "int64",
  4143. "description": "id of the comment to edit",
  4144. "name": "id",
  4145. "in": "path",
  4146. "required": true
  4147. },
  4148. {
  4149. "name": "content",
  4150. "in": "body",
  4151. "schema": {
  4152. "$ref": "#/definitions/EditReactionOption"
  4153. }
  4154. }
  4155. ],
  4156. "responses": {
  4157. "200": {
  4158. "$ref": "#/responses/empty"
  4159. },
  4160. "403": {
  4161. "$ref": "#/responses/forbidden"
  4162. }
  4163. }
  4164. }
  4165. },
  4166. "/repos/{owner}/{repo}/issues/{index}": {
  4167. "get": {
  4168. "produces": [
  4169. "application/json"
  4170. ],
  4171. "tags": [
  4172. "issue"
  4173. ],
  4174. "summary": "Get an issue",
  4175. "operationId": "issueGetIssue",
  4176. "parameters": [
  4177. {
  4178. "type": "string",
  4179. "description": "owner of the repo",
  4180. "name": "owner",
  4181. "in": "path",
  4182. "required": true
  4183. },
  4184. {
  4185. "type": "string",
  4186. "description": "name of the repo",
  4187. "name": "repo",
  4188. "in": "path",
  4189. "required": true
  4190. },
  4191. {
  4192. "type": "integer",
  4193. "format": "int64",
  4194. "description": "index of the issue to get",
  4195. "name": "index",
  4196. "in": "path",
  4197. "required": true
  4198. }
  4199. ],
  4200. "responses": {
  4201. "200": {
  4202. "$ref": "#/responses/Issue"
  4203. },
  4204. "404": {
  4205. "$ref": "#/responses/notFound"
  4206. }
  4207. }
  4208. },
  4209. "patch": {
  4210. "consumes": [
  4211. "application/json"
  4212. ],
  4213. "produces": [
  4214. "application/json"
  4215. ],
  4216. "tags": [
  4217. "issue"
  4218. ],
  4219. "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  4220. "operationId": "issueEditIssue",
  4221. "parameters": [
  4222. {
  4223. "type": "string",
  4224. "description": "owner of the repo",
  4225. "name": "owner",
  4226. "in": "path",
  4227. "required": true
  4228. },
  4229. {
  4230. "type": "string",
  4231. "description": "name of the repo",
  4232. "name": "repo",
  4233. "in": "path",
  4234. "required": true
  4235. },
  4236. {
  4237. "type": "integer",
  4238. "format": "int64",
  4239. "description": "index of the issue to edit",
  4240. "name": "index",
  4241. "in": "path",
  4242. "required": true
  4243. },
  4244. {
  4245. "name": "body",
  4246. "in": "body",
  4247. "schema": {
  4248. "$ref": "#/definitions/EditIssueOption"
  4249. }
  4250. }
  4251. ],
  4252. "responses": {
  4253. "201": {
  4254. "$ref": "#/responses/Issue"
  4255. },
  4256. "403": {
  4257. "$ref": "#/responses/forbidden"
  4258. },
  4259. "404": {
  4260. "$ref": "#/responses/notFound"
  4261. },
  4262. "412": {
  4263. "$ref": "#/responses/error"
  4264. }
  4265. }
  4266. }
  4267. },
  4268. "/repos/{owner}/{repo}/issues/{index}/comments": {
  4269. "get": {
  4270. "produces": [
  4271. "application/json"
  4272. ],
  4273. "tags": [
  4274. "issue"
  4275. ],
  4276. "summary": "List all comments on an issue",
  4277. "operationId": "issueGetComments",
  4278. "parameters": [
  4279. {
  4280. "type": "string",
  4281. "description": "owner of the repo",
  4282. "name": "owner",
  4283. "in": "path",
  4284. "required": true
  4285. },
  4286. {
  4287. "type": "string",
  4288. "description": "name of the repo",
  4289. "name": "repo",
  4290. "in": "path",
  4291. "required": true
  4292. },
  4293. {
  4294. "type": "integer",
  4295. "format": "int64",
  4296. "description": "index of the issue",
  4297. "name": "index",
  4298. "in": "path",
  4299. "required": true
  4300. },
  4301. {
  4302. "type": "string",
  4303. "format": "date-time",
  4304. "description": "if provided, only comments updated since the specified time are returned.",
  4305. "name": "since",
  4306. "in": "query"
  4307. },
  4308. {
  4309. "type": "string",
  4310. "format": "date-time",
  4311. "description": "if provided, only comments updated before the provided time are returned.",
  4312. "name": "before",
  4313. "in": "query"
  4314. }
  4315. ],
  4316. "responses": {
  4317. "200": {
  4318. "$ref": "#/responses/CommentList"
  4319. }
  4320. }
  4321. },
  4322. "post": {
  4323. "consumes": [
  4324. "application/json"
  4325. ],
  4326. "produces": [
  4327. "application/json"
  4328. ],
  4329. "tags": [
  4330. "issue"
  4331. ],
  4332. "summary": "Add a comment to an issue",
  4333. "operationId": "issueCreateComment",
  4334. "parameters": [
  4335. {
  4336. "type": "string",
  4337. "description": "owner of the repo",
  4338. "name": "owner",
  4339. "in": "path",
  4340. "required": true
  4341. },
  4342. {
  4343. "type": "string",
  4344. "description": "name of the repo",
  4345. "name": "repo",
  4346. "in": "path",
  4347. "required": true
  4348. },
  4349. {
  4350. "type": "integer",
  4351. "format": "int64",
  4352. "description": "index of the issue",
  4353. "name": "index",
  4354. "in": "path",
  4355. "required": true
  4356. },
  4357. {
  4358. "name": "body",
  4359. "in": "body",
  4360. "schema": {
  4361. "$ref": "#/definitions/CreateIssueCommentOption"
  4362. }
  4363. }
  4364. ],
  4365. "responses": {
  4366. "201": {
  4367. "$ref": "#/responses/Comment"
  4368. },
  4369. "403": {
  4370. "$ref": "#/responses/forbidden"
  4371. }
  4372. }
  4373. }
  4374. },
  4375. "/repos/{owner}/{repo}/issues/{index}/comments/{id}": {
  4376. "delete": {
  4377. "tags": [
  4378. "issue"
  4379. ],
  4380. "summary": "Delete a comment",
  4381. "operationId": "issueDeleteCommentDeprecated",
  4382. "deprecated": true,
  4383. "parameters": [
  4384. {
  4385. "type": "string",
  4386. "description": "owner of the repo",
  4387. "name": "owner",
  4388. "in": "path",
  4389. "required": true
  4390. },
  4391. {
  4392. "type": "string",
  4393. "description": "name of the repo",
  4394. "name": "repo",
  4395. "in": "path",
  4396. "required": true
  4397. },
  4398. {
  4399. "type": "integer",
  4400. "description": "this parameter is ignored",
  4401. "name": "index",
  4402. "in": "path",
  4403. "required": true
  4404. },
  4405. {
  4406. "type": "integer",
  4407. "format": "int64",
  4408. "description": "id of comment to delete",
  4409. "name": "id",
  4410. "in": "path",
  4411. "required": true
  4412. }
  4413. ],
  4414. "responses": {
  4415. "204": {
  4416. "$ref": "#/responses/empty"
  4417. },
  4418. "403": {
  4419. "$ref": "#/responses/forbidden"
  4420. },
  4421. "404": {
  4422. "$ref": "#/responses/notFound"
  4423. }
  4424. }
  4425. },
  4426. "patch": {
  4427. "consumes": [
  4428. "application/json"
  4429. ],
  4430. "produces": [
  4431. "application/json"
  4432. ],
  4433. "tags": [
  4434. "issue"
  4435. ],
  4436. "summary": "Edit a comment",
  4437. "operationId": "issueEditCommentDeprecated",
  4438. "deprecated": true,
  4439. "parameters": [
  4440. {
  4441. "type": "string",
  4442. "description": "owner of the repo",
  4443. "name": "owner",
  4444. "in": "path",
  4445. "required": true
  4446. },
  4447. {
  4448. "type": "string",
  4449. "description": "name of the repo",
  4450. "name": "repo",
  4451. "in": "path",
  4452. "required": true
  4453. },
  4454. {
  4455. "type": "integer",
  4456. "description": "this parameter is ignored",
  4457. "name": "index",
  4458. "in": "path",
  4459. "required": true
  4460. },
  4461. {
  4462. "type": "integer",
  4463. "format": "int64",
  4464. "description": "id of the comment to edit",
  4465. "name": "id",
  4466. "in": "path",
  4467. "required": true
  4468. },
  4469. {
  4470. "name": "body",
  4471. "in": "body",
  4472. "schema": {
  4473. "$ref": "#/definitions/EditIssueCommentOption"
  4474. }
  4475. }
  4476. ],
  4477. "responses": {
  4478. "200": {
  4479. "$ref": "#/responses/Comment"
  4480. },
  4481. "204": {
  4482. "$ref": "#/responses/empty"
  4483. },
  4484. "403": {
  4485. "$ref": "#/responses/forbidden"
  4486. },
  4487. "404": {
  4488. "$ref": "#/responses/notFound"
  4489. }
  4490. }
  4491. }
  4492. },
  4493. "/repos/{owner}/{repo}/issues/{index}/deadline": {
  4494. "post": {
  4495. "consumes": [
  4496. "application/json"
  4497. ],
  4498. "produces": [
  4499. "application/json"
  4500. ],
  4501. "tags": [
  4502. "issue"
  4503. ],
  4504. "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.",
  4505. "operationId": "issueEditIssueDeadline",
  4506. "parameters": [
  4507. {
  4508. "type": "string",
  4509. "description": "owner of the repo",
  4510. "name": "owner",
  4511. "in": "path",
  4512. "required": true
  4513. },
  4514. {
  4515. "type": "string",
  4516. "description": "name of the repo",
  4517. "name": "repo",
  4518. "in": "path",
  4519. "required": true
  4520. },
  4521. {
  4522. "type": "integer",
  4523. "format": "int64",
  4524. "description": "index of the issue to create or update a deadline on",
  4525. "name": "index",
  4526. "in": "path",
  4527. "required": true
  4528. },
  4529. {
  4530. "name": "body",
  4531. "in": "body",
  4532. "schema": {
  4533. "$ref": "#/definitions/EditDeadlineOption"
  4534. }
  4535. }
  4536. ],
  4537. "responses": {
  4538. "201": {
  4539. "$ref": "#/responses/IssueDeadline"
  4540. },
  4541. "403": {
  4542. "$ref": "#/responses/forbidden"
  4543. },
  4544. "404": {
  4545. "$ref": "#/responses/notFound"
  4546. }
  4547. }
  4548. }
  4549. },
  4550. "/repos/{owner}/{repo}/issues/{index}/labels": {
  4551. "get": {
  4552. "produces": [
  4553. "application/json"
  4554. ],
  4555. "tags": [
  4556. "issue"
  4557. ],
  4558. "summary": "Get an issue's labels",
  4559. "operationId": "issueGetLabels",
  4560. "parameters": [
  4561. {
  4562. "type": "string",
  4563. "description": "owner of the repo",
  4564. "name": "owner",
  4565. "in": "path",
  4566. "required": true
  4567. },
  4568. {
  4569. "type": "string",
  4570. "description": "name of the repo",
  4571. "name": "repo",
  4572. "in": "path",
  4573. "required": true
  4574. },
  4575. {
  4576. "type": "integer",
  4577. "format": "int64",
  4578. "description": "index of the issue",
  4579. "name": "index",
  4580. "in": "path",
  4581. "required": true
  4582. }
  4583. ],
  4584. "responses": {
  4585. "200": {
  4586. "$ref": "#/responses/LabelList"
  4587. },
  4588. "404": {
  4589. "$ref": "#/responses/notFound"
  4590. }
  4591. }
  4592. },
  4593. "put": {
  4594. "consumes": [
  4595. "application/json"
  4596. ],
  4597. "produces": [
  4598. "application/json"
  4599. ],
  4600. "tags": [
  4601. "issue"
  4602. ],
  4603. "summary": "Replace an issue's labels",
  4604. "operationId": "issueReplaceLabels",
  4605. "parameters": [
  4606. {
  4607. "type": "string",
  4608. "description": "owner of the repo",
  4609. "name": "owner",
  4610. "in": "path",
  4611. "required": true
  4612. },
  4613. {
  4614. "type": "string",
  4615. "description": "name of the repo",
  4616. "name": "repo",
  4617. "in": "path",
  4618. "required": true
  4619. },
  4620. {
  4621. "type": "integer",
  4622. "format": "int64",
  4623. "description": "index of the issue",
  4624. "name": "index",
  4625. "in": "path",
  4626. "required": true
  4627. },
  4628. {
  4629. "name": "body",
  4630. "in": "body",
  4631. "schema": {
  4632. "$ref": "#/definitions/IssueLabelsOption"
  4633. }
  4634. }
  4635. ],
  4636. "responses": {
  4637. "200": {
  4638. "$ref": "#/responses/LabelList"
  4639. },
  4640. "403": {
  4641. "$ref": "#/responses/forbidden"
  4642. }
  4643. }
  4644. },
  4645. "post": {
  4646. "consumes": [
  4647. "application/json"
  4648. ],
  4649. "produces": [
  4650. "application/json"
  4651. ],
  4652. "tags": [
  4653. "issue"
  4654. ],
  4655. "summary": "Add a label to an issue",
  4656. "operationId": "issueAddLabel",
  4657. "parameters": [
  4658. {
  4659. "type": "string",
  4660. "description": "owner of the repo",
  4661. "name": "owner",
  4662. "in": "path",
  4663. "required": true
  4664. },
  4665. {
  4666. "type": "string",
  4667. "description": "name of the repo",
  4668. "name": "repo",
  4669. "in": "path",
  4670. "required": true
  4671. },
  4672. {
  4673. "type": "integer",
  4674. "format": "int64",
  4675. "description": "index of the issue",
  4676. "name": "index",
  4677. "in": "path",
  4678. "required": true
  4679. },
  4680. {
  4681. "name": "body",
  4682. "in": "body",
  4683. "schema": {
  4684. "$ref": "#/definitions/IssueLabelsOption"
  4685. }
  4686. }
  4687. ],
  4688. "responses": {
  4689. "200": {
  4690. "$ref": "#/responses/LabelList"
  4691. },
  4692. "403": {
  4693. "$ref": "#/responses/forbidden"
  4694. }
  4695. }
  4696. },
  4697. "delete": {
  4698. "produces": [
  4699. "application/json"
  4700. ],
  4701. "tags": [
  4702. "issue"
  4703. ],
  4704. "summary": "Remove all labels from an issue",
  4705. "operationId": "issueClearLabels",
  4706. "parameters": [
  4707. {
  4708. "type": "string",
  4709. "description": "owner of the repo",
  4710. "name": "owner",
  4711. "in": "path",
  4712. "required": true
  4713. },
  4714. {
  4715. "type": "string",
  4716. "description": "name of the repo",
  4717. "name": "repo",
  4718. "in": "path",
  4719. "required": true
  4720. },
  4721. {
  4722. "type": "integer",
  4723. "format": "int64",
  4724. "description": "index of the issue",
  4725. "name": "index",
  4726. "in": "path",
  4727. "required": true
  4728. }
  4729. ],
  4730. "responses": {
  4731. "204": {
  4732. "$ref": "#/responses/empty"
  4733. },
  4734. "403": {
  4735. "$ref": "#/responses/forbidden"
  4736. }
  4737. }
  4738. }
  4739. },
  4740. "/repos/{owner}/{repo}/issues/{index}/labels/{id}": {
  4741. "delete": {
  4742. "produces": [
  4743. "application/json"
  4744. ],
  4745. "tags": [
  4746. "issue"
  4747. ],
  4748. "summary": "Remove a label from an issue",
  4749. "operationId": "issueRemoveLabel",
  4750. "parameters": [
  4751. {
  4752. "type": "string",
  4753. "description": "owner of the repo",
  4754. "name": "owner",
  4755. "in": "path",
  4756. "required": true
  4757. },
  4758. {
  4759. "type": "string",
  4760. "description": "name of the repo",
  4761. "name": "repo",
  4762. "in": "path",
  4763. "required": true
  4764. },
  4765. {
  4766. "type": "integer",
  4767. "format": "int64",
  4768. "description": "index of the issue",
  4769. "name": "index",
  4770. "in": "path",
  4771. "required": true
  4772. },
  4773. {
  4774. "type": "integer",
  4775. "format": "int64",
  4776. "description": "id of the label to remove",
  4777. "name": "id",
  4778. "in": "path",
  4779. "required": true
  4780. }
  4781. ],
  4782. "responses": {
  4783. "204": {
  4784. "$ref": "#/responses/empty"
  4785. },
  4786. "403": {
  4787. "$ref": "#/responses/forbidden"
  4788. },
  4789. "422": {
  4790. "$ref": "#/responses/validationError"
  4791. }
  4792. }
  4793. }
  4794. },
  4795. "/repos/{owner}/{repo}/issues/{index}/reactions": {
  4796. "get": {
  4797. "consumes": [
  4798. "application/json"
  4799. ],
  4800. "produces": [
  4801. "application/json"
  4802. ],
  4803. "tags": [
  4804. "issue"
  4805. ],
  4806. "summary": "Get a list reactions of an issue",
  4807. "operationId": "issueGetIssueReactions",
  4808. "parameters": [
  4809. {
  4810. "type": "string",
  4811. "description": "owner of the repo",
  4812. "name": "owner",
  4813. "in": "path",
  4814. "required": true
  4815. },
  4816. {
  4817. "type": "string",
  4818. "description": "name of the repo",
  4819. "name": "repo",
  4820. "in": "path",
  4821. "required": true
  4822. },
  4823. {
  4824. "type": "integer",
  4825. "format": "int64",
  4826. "description": "index of the issue",
  4827. "name": "index",
  4828. "in": "path",
  4829. "required": true
  4830. },
  4831. {
  4832. "type": "integer",
  4833. "description": "page number of results to return (1-based)",
  4834. "name": "page",
  4835. "in": "query"
  4836. },
  4837. {
  4838. "type": "integer",
  4839. "description": "page size of results, maximum page size is 50",
  4840. "name": "limit",
  4841. "in": "query"
  4842. }
  4843. ],
  4844. "responses": {
  4845. "200": {
  4846. "$ref": "#/responses/ReactionList"
  4847. },
  4848. "403": {
  4849. "$ref": "#/responses/forbidden"
  4850. }
  4851. }
  4852. },
  4853. "post": {
  4854. "consumes": [
  4855. "application/json"
  4856. ],
  4857. "produces": [
  4858. "application/json"
  4859. ],
  4860. "tags": [
  4861. "issue"
  4862. ],
  4863. "summary": "Add a reaction to an issue",
  4864. "operationId": "issuePostIssueReaction",
  4865. "parameters": [
  4866. {
  4867. "type": "string",
  4868. "description": "owner of the repo",
  4869. "name": "owner",
  4870. "in": "path",
  4871. "required": true
  4872. },
  4873. {
  4874. "type": "string",
  4875. "description": "name of the repo",
  4876. "name": "repo",
  4877. "in": "path",
  4878. "required": true
  4879. },
  4880. {
  4881. "type": "integer",
  4882. "format": "int64",
  4883. "description": "index of the issue",
  4884. "name": "index",
  4885. "in": "path",
  4886. "required": true
  4887. },
  4888. {
  4889. "name": "content",
  4890. "in": "body",
  4891. "schema": {
  4892. "$ref": "#/definitions/EditReactionOption"
  4893. }
  4894. }
  4895. ],
  4896. "responses": {
  4897. "200": {
  4898. "$ref": "#/responses/Reaction"
  4899. },
  4900. "201": {
  4901. "$ref": "#/responses/Reaction"
  4902. },
  4903. "403": {
  4904. "$ref": "#/responses/forbidden"
  4905. }
  4906. }
  4907. },
  4908. "delete": {
  4909. "consumes": [
  4910. "application/json"
  4911. ],
  4912. "produces": [
  4913. "application/json"
  4914. ],
  4915. "tags": [
  4916. "issue"
  4917. ],
  4918. "summary": "Remove a reaction from an issue",
  4919. "operationId": "issueDeleteIssueReaction",
  4920. "parameters": [
  4921. {
  4922. "type": "string",
  4923. "description": "owner of the repo",
  4924. "name": "owner",
  4925. "in": "path",
  4926. "required": true
  4927. },
  4928. {
  4929. "type": "string",
  4930. "description": "name of the repo",
  4931. "name": "repo",
  4932. "in": "path",
  4933. "required": true
  4934. },
  4935. {
  4936. "type": "integer",
  4937. "format": "int64",
  4938. "description": "index of the issue",
  4939. "name": "index",
  4940. "in": "path",
  4941. "required": true
  4942. },
  4943. {
  4944. "name": "content",
  4945. "in": "body",
  4946. "schema": {
  4947. "$ref": "#/definitions/EditReactionOption"
  4948. }
  4949. }
  4950. ],
  4951. "responses": {
  4952. "200": {
  4953. "$ref": "#/responses/empty"
  4954. },
  4955. "403": {
  4956. "$ref": "#/responses/forbidden"
  4957. }
  4958. }
  4959. }
  4960. },
  4961. "/repos/{owner}/{repo}/issues/{index}/stopwatch/delete": {
  4962. "delete": {
  4963. "consumes": [
  4964. "application/json"
  4965. ],
  4966. "produces": [
  4967. "application/json"
  4968. ],
  4969. "tags": [
  4970. "issue"
  4971. ],
  4972. "summary": "Delete an issue's existing stopwatch.",
  4973. "operationId": "issueDeleteStopWatch",
  4974. "parameters": [
  4975. {
  4976. "type": "string",
  4977. "description": "owner of the repo",
  4978. "name": "owner",
  4979. "in": "path",
  4980. "required": true
  4981. },
  4982. {
  4983. "type": "string",
  4984. "description": "name of the repo",
  4985. "name": "repo",
  4986. "in": "path",
  4987. "required": true
  4988. },
  4989. {
  4990. "type": "integer",
  4991. "format": "int64",
  4992. "description": "index of the issue to stop the stopwatch on",
  4993. "name": "index",
  4994. "in": "path",
  4995. "required": true
  4996. }
  4997. ],
  4998. "responses": {
  4999. "204": {
  5000. "$ref": "#/responses/empty"
  5001. },
  5002. "403": {
  5003. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  5004. },
  5005. "404": {
  5006. "$ref": "#/responses/notFound"
  5007. },
  5008. "409": {
  5009. "description": "Cannot cancel a non existent stopwatch"
  5010. }
  5011. }
  5012. }
  5013. },
  5014. "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": {
  5015. "post": {
  5016. "consumes": [
  5017. "application/json"
  5018. ],
  5019. "produces": [
  5020. "application/json"
  5021. ],
  5022. "tags": [
  5023. "issue"
  5024. ],
  5025. "summary": "Start stopwatch on an issue.",
  5026. "operationId": "issueStartStopWatch",
  5027. "parameters": [
  5028. {
  5029. "type": "string",
  5030. "description": "owner of the repo",
  5031. "name": "owner",
  5032. "in": "path",
  5033. "required": true
  5034. },
  5035. {
  5036. "type": "string",
  5037. "description": "name of the repo",
  5038. "name": "repo",
  5039. "in": "path",
  5040. "required": true
  5041. },
  5042. {
  5043. "type": "integer",
  5044. "format": "int64",
  5045. "description": "index of the issue to create the stopwatch on",
  5046. "name": "index",
  5047. "in": "path",
  5048. "required": true
  5049. }
  5050. ],
  5051. "responses": {
  5052. "201": {
  5053. "$ref": "#/responses/empty"
  5054. },
  5055. "403": {
  5056. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  5057. },
  5058. "404": {
  5059. "$ref": "#/responses/notFound"
  5060. },
  5061. "409": {
  5062. "description": "Cannot start a stopwatch again if it already exists"
  5063. }
  5064. }
  5065. }
  5066. },
  5067. "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": {
  5068. "post": {
  5069. "consumes": [
  5070. "application/json"
  5071. ],
  5072. "produces": [
  5073. "application/json"
  5074. ],
  5075. "tags": [
  5076. "issue"
  5077. ],
  5078. "summary": "Stop an issue's existing stopwatch.",
  5079. "operationId": "issueStopStopWatch",
  5080. "parameters": [
  5081. {
  5082. "type": "string",
  5083. "description": "owner of the repo",
  5084. "name": "owner",
  5085. "in": "path",
  5086. "required": true
  5087. },
  5088. {
  5089. "type": "string",
  5090. "description": "name of the repo",
  5091. "name": "repo",
  5092. "in": "path",
  5093. "required": true
  5094. },
  5095. {
  5096. "type": "integer",
  5097. "format": "int64",
  5098. "description": "index of the issue to stop the stopwatch on",
  5099. "name": "index",
  5100. "in": "path",
  5101. "required": true
  5102. }
  5103. ],
  5104. "responses": {
  5105. "201": {
  5106. "$ref": "#/responses/empty"
  5107. },
  5108. "403": {
  5109. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  5110. },
  5111. "404": {
  5112. "$ref": "#/responses/notFound"
  5113. },
  5114. "409": {
  5115. "description": "Cannot stop a non existent stopwatch"
  5116. }
  5117. }
  5118. }
  5119. },
  5120. "/repos/{owner}/{repo}/issues/{index}/subscriptions": {
  5121. "get": {
  5122. "consumes": [
  5123. "application/json"
  5124. ],
  5125. "produces": [
  5126. "application/json"
  5127. ],
  5128. "tags": [
  5129. "issue"
  5130. ],
  5131. "summary": "Get users who subscribed on an issue.",
  5132. "operationId": "issueSubscriptions",
  5133. "parameters": [
  5134. {
  5135. "type": "string",
  5136. "description": "owner of the repo",
  5137. "name": "owner",
  5138. "in": "path",
  5139. "required": true
  5140. },
  5141. {
  5142. "type": "string",
  5143. "description": "name of the repo",
  5144. "name": "repo",
  5145. "in": "path",
  5146. "required": true
  5147. },
  5148. {
  5149. "type": "integer",
  5150. "format": "int64",
  5151. "description": "index of the issue",
  5152. "name": "index",
  5153. "in": "path",
  5154. "required": true
  5155. },
  5156. {
  5157. "type": "integer",
  5158. "description": "page number of results to return (1-based)",
  5159. "name": "page",
  5160. "in": "query"
  5161. },
  5162. {
  5163. "type": "integer",
  5164. "description": "page size of results, maximum page size is 50",
  5165. "name": "limit",
  5166. "in": "query"
  5167. }
  5168. ],
  5169. "responses": {
  5170. "200": {
  5171. "$ref": "#/responses/UserList"
  5172. },
  5173. "404": {
  5174. "$ref": "#/responses/notFound"
  5175. }
  5176. }
  5177. }
  5178. },
  5179. "/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}": {
  5180. "put": {
  5181. "consumes": [
  5182. "application/json"
  5183. ],
  5184. "produces": [
  5185. "application/json"
  5186. ],
  5187. "tags": [
  5188. "issue"
  5189. ],
  5190. "summary": "Subscribe user to issue",
  5191. "operationId": "issueAddSubscription",
  5192. "parameters": [
  5193. {
  5194. "type": "string",
  5195. "description": "owner of the repo",
  5196. "name": "owner",
  5197. "in": "path",
  5198. "required": true
  5199. },
  5200. {
  5201. "type": "string",
  5202. "description": "name of the repo",
  5203. "name": "repo",
  5204. "in": "path",
  5205. "required": true
  5206. },
  5207. {
  5208. "type": "integer",
  5209. "format": "int64",
  5210. "description": "index of the issue",
  5211. "name": "index",
  5212. "in": "path",
  5213. "required": true
  5214. },
  5215. {
  5216. "type": "string",
  5217. "description": "user to subscribe",
  5218. "name": "user",
  5219. "in": "path",
  5220. "required": true
  5221. }
  5222. ],
  5223. "responses": {
  5224. "201": {
  5225. "$ref": "#/responses/empty"
  5226. },
  5227. "304": {
  5228. "description": "User can only subscribe itself if he is no admin"
  5229. },
  5230. "404": {
  5231. "$ref": "#/responses/notFound"
  5232. }
  5233. }
  5234. },
  5235. "delete": {
  5236. "consumes": [
  5237. "application/json"
  5238. ],
  5239. "produces": [
  5240. "application/json"
  5241. ],
  5242. "tags": [
  5243. "issue"
  5244. ],
  5245. "summary": "Unsubscribe user from issue",
  5246. "operationId": "issueDeleteSubscription",
  5247. "parameters": [
  5248. {
  5249. "type": "string",
  5250. "description": "owner of the repo",
  5251. "name": "owner",
  5252. "in": "path",
  5253. "required": true
  5254. },
  5255. {
  5256. "type": "string",
  5257. "description": "name of the repo",
  5258. "name": "repo",
  5259. "in": "path",
  5260. "required": true
  5261. },
  5262. {
  5263. "type": "integer",
  5264. "format": "int64",
  5265. "description": "index of the issue",
  5266. "name": "index",
  5267. "in": "path",
  5268. "required": true
  5269. },
  5270. {
  5271. "type": "string",
  5272. "description": "user witch unsubscribe",
  5273. "name": "user",
  5274. "in": "path",
  5275. "required": true
  5276. }
  5277. ],
  5278. "responses": {
  5279. "201": {
  5280. "$ref": "#/responses/empty"
  5281. },
  5282. "304": {
  5283. "description": "User can only subscribe itself if he is no admin"
  5284. },
  5285. "404": {
  5286. "$ref": "#/responses/notFound"
  5287. }
  5288. }
  5289. }
  5290. },
  5291. "/repos/{owner}/{repo}/issues/{index}/times": {
  5292. "get": {
  5293. "produces": [
  5294. "application/json"
  5295. ],
  5296. "tags": [
  5297. "issue"
  5298. ],
  5299. "summary": "List an issue's tracked times",
  5300. "operationId": "issueTrackedTimes",
  5301. "parameters": [
  5302. {
  5303. "type": "string",
  5304. "description": "owner of the repo",
  5305. "name": "owner",
  5306. "in": "path",
  5307. "required": true
  5308. },
  5309. {
  5310. "type": "string",
  5311. "description": "name of the repo",
  5312. "name": "repo",
  5313. "in": "path",
  5314. "required": true
  5315. },
  5316. {
  5317. "type": "integer",
  5318. "format": "int64",
  5319. "description": "index of the issue",
  5320. "name": "index",
  5321. "in": "path",
  5322. "required": true
  5323. },
  5324. {
  5325. "type": "string",
  5326. "format": "date-time",
  5327. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  5328. "name": "since",
  5329. "in": "query"
  5330. },
  5331. {
  5332. "type": "string",
  5333. "format": "date-time",
  5334. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  5335. "name": "before",
  5336. "in": "query"
  5337. },
  5338. {
  5339. "type": "integer",
  5340. "description": "page number of results to return (1-based)",
  5341. "name": "page",
  5342. "in": "query"
  5343. },
  5344. {
  5345. "type": "integer",
  5346. "description": "page size of results, maximum page size is 50",
  5347. "name": "limit",
  5348. "in": "query"
  5349. }
  5350. ],
  5351. "responses": {
  5352. "200": {
  5353. "$ref": "#/responses/TrackedTimeList"
  5354. },
  5355. "404": {
  5356. "$ref": "#/responses/notFound"
  5357. }
  5358. }
  5359. },
  5360. "post": {
  5361. "consumes": [
  5362. "application/json"
  5363. ],
  5364. "produces": [
  5365. "application/json"
  5366. ],
  5367. "tags": [
  5368. "issue"
  5369. ],
  5370. "summary": "Add tracked time to a issue",
  5371. "operationId": "issueAddTime",
  5372. "parameters": [
  5373. {
  5374. "type": "string",
  5375. "description": "owner of the repo",
  5376. "name": "owner",
  5377. "in": "path",
  5378. "required": true
  5379. },
  5380. {
  5381. "type": "string",
  5382. "description": "name of the repo",
  5383. "name": "repo",
  5384. "in": "path",
  5385. "required": true
  5386. },
  5387. {
  5388. "type": "integer",
  5389. "format": "int64",
  5390. "description": "index of the issue",
  5391. "name": "index",
  5392. "in": "path",
  5393. "required": true
  5394. },
  5395. {
  5396. "name": "body",
  5397. "in": "body",
  5398. "schema": {
  5399. "$ref": "#/definitions/AddTimeOption"
  5400. }
  5401. }
  5402. ],
  5403. "responses": {
  5404. "200": {
  5405. "$ref": "#/responses/TrackedTime"
  5406. },
  5407. "400": {
  5408. "$ref": "#/responses/error"
  5409. },
  5410. "403": {
  5411. "$ref": "#/responses/forbidden"
  5412. }
  5413. }
  5414. },
  5415. "delete": {
  5416. "consumes": [
  5417. "application/json"
  5418. ],
  5419. "produces": [
  5420. "application/json"
  5421. ],
  5422. "tags": [
  5423. "issue"
  5424. ],
  5425. "summary": "Reset a tracked time of an issue",
  5426. "operationId": "issueResetTime",
  5427. "parameters": [
  5428. {
  5429. "type": "string",
  5430. "description": "owner of the repo",
  5431. "name": "owner",
  5432. "in": "path",
  5433. "required": true
  5434. },
  5435. {
  5436. "type": "string",
  5437. "description": "name of the repo",
  5438. "name": "repo",
  5439. "in": "path",
  5440. "required": true
  5441. },
  5442. {
  5443. "type": "integer",
  5444. "format": "int64",
  5445. "description": "index of the issue to add tracked time to",
  5446. "name": "index",
  5447. "in": "path",
  5448. "required": true
  5449. }
  5450. ],
  5451. "responses": {
  5452. "204": {
  5453. "$ref": "#/responses/empty"
  5454. },
  5455. "400": {
  5456. "$ref": "#/responses/error"
  5457. },
  5458. "403": {
  5459. "$ref": "#/responses/forbidden"
  5460. }
  5461. }
  5462. }
  5463. },
  5464. "/repos/{owner}/{repo}/issues/{index}/times/{id}": {
  5465. "delete": {
  5466. "consumes": [
  5467. "application/json"
  5468. ],
  5469. "produces": [
  5470. "application/json"
  5471. ],
  5472. "tags": [
  5473. "issue"
  5474. ],
  5475. "summary": "Delete specific tracked time",
  5476. "operationId": "issueDeleteTime",
  5477. "parameters": [
  5478. {
  5479. "type": "string",
  5480. "description": "owner of the repo",
  5481. "name": "owner",
  5482. "in": "path",
  5483. "required": true
  5484. },
  5485. {
  5486. "type": "string",
  5487. "description": "name of the repo",
  5488. "name": "repo",
  5489. "in": "path",
  5490. "required": true
  5491. },
  5492. {
  5493. "type": "integer",
  5494. "format": "int64",
  5495. "description": "index of the issue",
  5496. "name": "index",
  5497. "in": "path",
  5498. "required": true
  5499. },
  5500. {
  5501. "type": "integer",
  5502. "format": "int64",
  5503. "description": "id of time to delete",
  5504. "name": "id",
  5505. "in": "path",
  5506. "required": true
  5507. }
  5508. ],
  5509. "responses": {
  5510. "204": {
  5511. "$ref": "#/responses/empty"
  5512. },
  5513. "400": {
  5514. "$ref": "#/responses/error"
  5515. },
  5516. "403": {
  5517. "$ref": "#/responses/forbidden"
  5518. }
  5519. }
  5520. }
  5521. },
  5522. "/repos/{owner}/{repo}/keys": {
  5523. "get": {
  5524. "produces": [
  5525. "application/json"
  5526. ],
  5527. "tags": [
  5528. "repository"
  5529. ],
  5530. "summary": "List a repository's keys",
  5531. "operationId": "repoListKeys",
  5532. "parameters": [
  5533. {
  5534. "type": "string",
  5535. "description": "owner of the repo",
  5536. "name": "owner",
  5537. "in": "path",
  5538. "required": true
  5539. },
  5540. {
  5541. "type": "string",
  5542. "description": "name of the repo",
  5543. "name": "repo",
  5544. "in": "path",
  5545. "required": true
  5546. },
  5547. {
  5548. "type": "integer",
  5549. "description": "the key_id to search for",
  5550. "name": "key_id",
  5551. "in": "query"
  5552. },
  5553. {
  5554. "type": "string",
  5555. "description": "fingerprint of the key",
  5556. "name": "fingerprint",
  5557. "in": "query"
  5558. },
  5559. {
  5560. "type": "integer",
  5561. "description": "page number of results to return (1-based)",
  5562. "name": "page",
  5563. "in": "query"
  5564. },
  5565. {
  5566. "type": "integer",
  5567. "description": "page size of results, maximum page size is 50",
  5568. "name": "limit",
  5569. "in": "query"
  5570. }
  5571. ],
  5572. "responses": {
  5573. "200": {
  5574. "$ref": "#/responses/DeployKeyList"
  5575. }
  5576. }
  5577. },
  5578. "post": {
  5579. "consumes": [
  5580. "application/json"
  5581. ],
  5582. "produces": [
  5583. "application/json"
  5584. ],
  5585. "tags": [
  5586. "repository"
  5587. ],
  5588. "summary": "Add a key to a repository",
  5589. "operationId": "repoCreateKey",
  5590. "parameters": [
  5591. {
  5592. "type": "string",
  5593. "description": "owner of the repo",
  5594. "name": "owner",
  5595. "in": "path",
  5596. "required": true
  5597. },
  5598. {
  5599. "type": "string",
  5600. "description": "name of the repo",
  5601. "name": "repo",
  5602. "in": "path",
  5603. "required": true
  5604. },
  5605. {
  5606. "name": "body",
  5607. "in": "body",
  5608. "schema": {
  5609. "$ref": "#/definitions/CreateKeyOption"
  5610. }
  5611. }
  5612. ],
  5613. "responses": {
  5614. "201": {
  5615. "$ref": "#/responses/DeployKey"
  5616. },
  5617. "422": {
  5618. "$ref": "#/responses/validationError"
  5619. }
  5620. }
  5621. }
  5622. },
  5623. "/repos/{owner}/{repo}/keys/{id}": {
  5624. "get": {
  5625. "produces": [
  5626. "application/json"
  5627. ],
  5628. "tags": [
  5629. "repository"
  5630. ],
  5631. "summary": "Get a repository's key by id",
  5632. "operationId": "repoGetKey",
  5633. "parameters": [
  5634. {
  5635. "type": "string",
  5636. "description": "owner of the repo",
  5637. "name": "owner",
  5638. "in": "path",
  5639. "required": true
  5640. },
  5641. {
  5642. "type": "string",
  5643. "description": "name of the repo",
  5644. "name": "repo",
  5645. "in": "path",
  5646. "required": true
  5647. },
  5648. {
  5649. "type": "integer",
  5650. "format": "int64",
  5651. "description": "id of the key to get",
  5652. "name": "id",
  5653. "in": "path",
  5654. "required": true
  5655. }
  5656. ],
  5657. "responses": {
  5658. "200": {
  5659. "$ref": "#/responses/DeployKey"
  5660. }
  5661. }
  5662. },
  5663. "delete": {
  5664. "tags": [
  5665. "repository"
  5666. ],
  5667. "summary": "Delete a key from a repository",
  5668. "operationId": "repoDeleteKey",
  5669. "parameters": [
  5670. {
  5671. "type": "string",
  5672. "description": "owner of the repo",
  5673. "name": "owner",
  5674. "in": "path",
  5675. "required": true
  5676. },
  5677. {
  5678. "type": "string",
  5679. "description": "name of the repo",
  5680. "name": "repo",
  5681. "in": "path",
  5682. "required": true
  5683. },
  5684. {
  5685. "type": "integer",
  5686. "format": "int64",
  5687. "description": "id of the key to delete",
  5688. "name": "id",
  5689. "in": "path",
  5690. "required": true
  5691. }
  5692. ],
  5693. "responses": {
  5694. "204": {
  5695. "$ref": "#/responses/empty"
  5696. },
  5697. "403": {
  5698. "$ref": "#/responses/forbidden"
  5699. }
  5700. }
  5701. }
  5702. },
  5703. "/repos/{owner}/{repo}/labels": {
  5704. "get": {
  5705. "produces": [
  5706. "application/json"
  5707. ],
  5708. "tags": [
  5709. "issue"
  5710. ],
  5711. "summary": "Get all of a repository's labels",
  5712. "operationId": "issueListLabels",
  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. "type": "integer",
  5730. "description": "page number of results to return (1-based)",
  5731. "name": "page",
  5732. "in": "query"
  5733. },
  5734. {
  5735. "type": "integer",
  5736. "description": "page size of results, maximum page size is 50",
  5737. "name": "limit",
  5738. "in": "query"
  5739. }
  5740. ],
  5741. "responses": {
  5742. "200": {
  5743. "$ref": "#/responses/LabelList"
  5744. }
  5745. }
  5746. },
  5747. "post": {
  5748. "consumes": [
  5749. "application/json"
  5750. ],
  5751. "produces": [
  5752. "application/json"
  5753. ],
  5754. "tags": [
  5755. "issue"
  5756. ],
  5757. "summary": "Create a label",
  5758. "operationId": "issueCreateLabel",
  5759. "parameters": [
  5760. {
  5761. "type": "string",
  5762. "description": "owner of the repo",
  5763. "name": "owner",
  5764. "in": "path",
  5765. "required": true
  5766. },
  5767. {
  5768. "type": "string",
  5769. "description": "name of the repo",
  5770. "name": "repo",
  5771. "in": "path",
  5772. "required": true
  5773. },
  5774. {
  5775. "name": "body",
  5776. "in": "body",
  5777. "schema": {
  5778. "$ref": "#/definitions/CreateLabelOption"
  5779. }
  5780. }
  5781. ],
  5782. "responses": {
  5783. "201": {
  5784. "$ref": "#/responses/Label"
  5785. },
  5786. "422": {
  5787. "$ref": "#/responses/validationError"
  5788. }
  5789. }
  5790. }
  5791. },
  5792. "/repos/{owner}/{repo}/labels/{id}": {
  5793. "get": {
  5794. "produces": [
  5795. "application/json"
  5796. ],
  5797. "tags": [
  5798. "issue"
  5799. ],
  5800. "summary": "Get a single label",
  5801. "operationId": "issueGetLabel",
  5802. "parameters": [
  5803. {
  5804. "type": "string",
  5805. "description": "owner of the repo",
  5806. "name": "owner",
  5807. "in": "path",
  5808. "required": true
  5809. },
  5810. {
  5811. "type": "string",
  5812. "description": "name of the repo",
  5813. "name": "repo",
  5814. "in": "path",
  5815. "required": true
  5816. },
  5817. {
  5818. "type": "integer",
  5819. "format": "int64",
  5820. "description": "id of the label to get",
  5821. "name": "id",
  5822. "in": "path",
  5823. "required": true
  5824. }
  5825. ],
  5826. "responses": {
  5827. "200": {
  5828. "$ref": "#/responses/Label"
  5829. }
  5830. }
  5831. },
  5832. "delete": {
  5833. "tags": [
  5834. "issue"
  5835. ],
  5836. "summary": "Delete a label",
  5837. "operationId": "issueDeleteLabel",
  5838. "parameters": [
  5839. {
  5840. "type": "string",
  5841. "description": "owner of the repo",
  5842. "name": "owner",
  5843. "in": "path",
  5844. "required": true
  5845. },
  5846. {
  5847. "type": "string",
  5848. "description": "name of the repo",
  5849. "name": "repo",
  5850. "in": "path",
  5851. "required": true
  5852. },
  5853. {
  5854. "type": "integer",
  5855. "format": "int64",
  5856. "description": "id of the label to delete",
  5857. "name": "id",
  5858. "in": "path",
  5859. "required": true
  5860. }
  5861. ],
  5862. "responses": {
  5863. "204": {
  5864. "$ref": "#/responses/empty"
  5865. }
  5866. }
  5867. },
  5868. "patch": {
  5869. "consumes": [
  5870. "application/json"
  5871. ],
  5872. "produces": [
  5873. "application/json"
  5874. ],
  5875. "tags": [
  5876. "issue"
  5877. ],
  5878. "summary": "Update a label",
  5879. "operationId": "issueEditLabel",
  5880. "parameters": [
  5881. {
  5882. "type": "string",
  5883. "description": "owner of the repo",
  5884. "name": "owner",
  5885. "in": "path",
  5886. "required": true
  5887. },
  5888. {
  5889. "type": "string",
  5890. "description": "name of the repo",
  5891. "name": "repo",
  5892. "in": "path",
  5893. "required": true
  5894. },
  5895. {
  5896. "type": "integer",
  5897. "format": "int64",
  5898. "description": "id of the label to edit",
  5899. "name": "id",
  5900. "in": "path",
  5901. "required": true
  5902. },
  5903. {
  5904. "name": "body",
  5905. "in": "body",
  5906. "schema": {
  5907. "$ref": "#/definitions/EditLabelOption"
  5908. }
  5909. }
  5910. ],
  5911. "responses": {
  5912. "200": {
  5913. "$ref": "#/responses/Label"
  5914. },
  5915. "422": {
  5916. "$ref": "#/responses/validationError"
  5917. }
  5918. }
  5919. }
  5920. },
  5921. "/repos/{owner}/{repo}/milestones": {
  5922. "get": {
  5923. "produces": [
  5924. "application/json"
  5925. ],
  5926. "tags": [
  5927. "issue"
  5928. ],
  5929. "summary": "Get all of a repository's opened milestones",
  5930. "operationId": "issueGetMilestonesList",
  5931. "parameters": [
  5932. {
  5933. "type": "string",
  5934. "description": "owner of the repo",
  5935. "name": "owner",
  5936. "in": "path",
  5937. "required": true
  5938. },
  5939. {
  5940. "type": "string",
  5941. "description": "name of the repo",
  5942. "name": "repo",
  5943. "in": "path",
  5944. "required": true
  5945. },
  5946. {
  5947. "type": "string",
  5948. "description": "Milestone state, Recognised values are open, closed and all. Defaults to \"open\"",
  5949. "name": "state",
  5950. "in": "query"
  5951. },
  5952. {
  5953. "type": "integer",
  5954. "description": "page number of results to return (1-based)",
  5955. "name": "page",
  5956. "in": "query"
  5957. },
  5958. {
  5959. "type": "integer",
  5960. "description": "page size of results, maximum page size is 50",
  5961. "name": "limit",
  5962. "in": "query"
  5963. }
  5964. ],
  5965. "responses": {
  5966. "200": {
  5967. "$ref": "#/responses/MilestoneList"
  5968. }
  5969. }
  5970. },
  5971. "post": {
  5972. "consumes": [
  5973. "application/json"
  5974. ],
  5975. "produces": [
  5976. "application/json"
  5977. ],
  5978. "tags": [
  5979. "issue"
  5980. ],
  5981. "summary": "Create a milestone",
  5982. "operationId": "issueCreateMilestone",
  5983. "parameters": [
  5984. {
  5985. "type": "string",
  5986. "description": "owner of the repo",
  5987. "name": "owner",
  5988. "in": "path",
  5989. "required": true
  5990. },
  5991. {
  5992. "type": "string",
  5993. "description": "name of the repo",
  5994. "name": "repo",
  5995. "in": "path",
  5996. "required": true
  5997. },
  5998. {
  5999. "name": "body",
  6000. "in": "body",
  6001. "schema": {
  6002. "$ref": "#/definitions/CreateMilestoneOption"
  6003. }
  6004. }
  6005. ],
  6006. "responses": {
  6007. "201": {
  6008. "$ref": "#/responses/Milestone"
  6009. }
  6010. }
  6011. }
  6012. },
  6013. "/repos/{owner}/{repo}/milestones/{id}": {
  6014. "get": {
  6015. "produces": [
  6016. "application/json"
  6017. ],
  6018. "tags": [
  6019. "issue"
  6020. ],
  6021. "summary": "Get a milestone",
  6022. "operationId": "issueGetMilestone",
  6023. "parameters": [
  6024. {
  6025. "type": "string",
  6026. "description": "owner of the repo",
  6027. "name": "owner",
  6028. "in": "path",
  6029. "required": true
  6030. },
  6031. {
  6032. "type": "string",
  6033. "description": "name of the repo",
  6034. "name": "repo",
  6035. "in": "path",
  6036. "required": true
  6037. },
  6038. {
  6039. "type": "integer",
  6040. "format": "int64",
  6041. "description": "id of the milestone",
  6042. "name": "id",
  6043. "in": "path",
  6044. "required": true
  6045. }
  6046. ],
  6047. "responses": {
  6048. "200": {
  6049. "$ref": "#/responses/Milestone"
  6050. }
  6051. }
  6052. },
  6053. "delete": {
  6054. "tags": [
  6055. "issue"
  6056. ],
  6057. "summary": "Delete a milestone",
  6058. "operationId": "issueDeleteMilestone",
  6059. "parameters": [
  6060. {
  6061. "type": "string",
  6062. "description": "owner of the repo",
  6063. "name": "owner",
  6064. "in": "path",
  6065. "required": true
  6066. },
  6067. {
  6068. "type": "string",
  6069. "description": "name of the repo",
  6070. "name": "repo",
  6071. "in": "path",
  6072. "required": true
  6073. },
  6074. {
  6075. "type": "integer",
  6076. "format": "int64",
  6077. "description": "id of the milestone to delete",
  6078. "name": "id",
  6079. "in": "path",
  6080. "required": true
  6081. }
  6082. ],
  6083. "responses": {
  6084. "204": {
  6085. "$ref": "#/responses/empty"
  6086. }
  6087. }
  6088. },
  6089. "patch": {
  6090. "consumes": [
  6091. "application/json"
  6092. ],
  6093. "produces": [
  6094. "application/json"
  6095. ],
  6096. "tags": [
  6097. "issue"
  6098. ],
  6099. "summary": "Update a milestone",
  6100. "operationId": "issueEditMilestone",
  6101. "parameters": [
  6102. {
  6103. "type": "string",
  6104. "description": "owner of the repo",
  6105. "name": "owner",
  6106. "in": "path",
  6107. "required": true
  6108. },
  6109. {
  6110. "type": "string",
  6111. "description": "name of the repo",
  6112. "name": "repo",
  6113. "in": "path",
  6114. "required": true
  6115. },
  6116. {
  6117. "type": "integer",
  6118. "format": "int64",
  6119. "description": "id of the milestone",
  6120. "name": "id",
  6121. "in": "path",
  6122. "required": true
  6123. },
  6124. {
  6125. "name": "body",
  6126. "in": "body",
  6127. "schema": {
  6128. "$ref": "#/definitions/EditMilestoneOption"
  6129. }
  6130. }
  6131. ],
  6132. "responses": {
  6133. "200": {
  6134. "$ref": "#/responses/Milestone"
  6135. }
  6136. }
  6137. }
  6138. },
  6139. "/repos/{owner}/{repo}/mirror-sync": {
  6140. "post": {
  6141. "produces": [
  6142. "application/json"
  6143. ],
  6144. "tags": [
  6145. "repository"
  6146. ],
  6147. "summary": "Sync a mirrored repository",
  6148. "operationId": "repoMirrorSync",
  6149. "parameters": [
  6150. {
  6151. "type": "string",
  6152. "description": "owner of the repo to sync",
  6153. "name": "owner",
  6154. "in": "path",
  6155. "required": true
  6156. },
  6157. {
  6158. "type": "string",
  6159. "description": "name of the repo to sync",
  6160. "name": "repo",
  6161. "in": "path",
  6162. "required": true
  6163. }
  6164. ],
  6165. "responses": {
  6166. "200": {
  6167. "$ref": "#/responses/empty"
  6168. },
  6169. "403": {
  6170. "$ref": "#/responses/forbidden"
  6171. }
  6172. }
  6173. }
  6174. },
  6175. "/repos/{owner}/{repo}/notifications": {
  6176. "get": {
  6177. "consumes": [
  6178. "application/json"
  6179. ],
  6180. "produces": [
  6181. "application/json"
  6182. ],
  6183. "tags": [
  6184. "notification"
  6185. ],
  6186. "summary": "List users's notification threads on a specific repo",
  6187. "operationId": "notifyGetRepoList",
  6188. "parameters": [
  6189. {
  6190. "type": "string",
  6191. "description": "owner of the repo",
  6192. "name": "owner",
  6193. "in": "path",
  6194. "required": true
  6195. },
  6196. {
  6197. "type": "string",
  6198. "description": "name of the repo",
  6199. "name": "repo",
  6200. "in": "path",
  6201. "required": true
  6202. },
  6203. {
  6204. "type": "string",
  6205. "description": "If true, show notifications marked as read. Default value is false",
  6206. "name": "all",
  6207. "in": "query"
  6208. },
  6209. {
  6210. "type": "string",
  6211. "format": "date-time",
  6212. "description": "Only show notifications updated after the given time. This is a timestamp in RFC 3339 format",
  6213. "name": "since",
  6214. "in": "query"
  6215. },
  6216. {
  6217. "type": "string",
  6218. "format": "date-time",
  6219. "description": "Only show notifications updated before the given time. This is a timestamp in RFC 3339 format",
  6220. "name": "before",
  6221. "in": "query"
  6222. },
  6223. {
  6224. "type": "integer",
  6225. "description": "page number of results to return (1-based)",
  6226. "name": "page",
  6227. "in": "query"
  6228. },
  6229. {
  6230. "type": "integer",
  6231. "description": "page size of results, maximum page size is 50",
  6232. "name": "limit",
  6233. "in": "query"
  6234. }
  6235. ],
  6236. "responses": {
  6237. "200": {
  6238. "$ref": "#/responses/NotificationThreadList"
  6239. }
  6240. }
  6241. },
  6242. "put": {
  6243. "consumes": [
  6244. "application/json"
  6245. ],
  6246. "produces": [
  6247. "application/json"
  6248. ],
  6249. "tags": [
  6250. "notification"
  6251. ],
  6252. "summary": "Mark notification threads as read on a specific repo",
  6253. "operationId": "notifyReadRepoList",
  6254. "parameters": [
  6255. {
  6256. "type": "string",
  6257. "description": "owner of the repo",
  6258. "name": "owner",
  6259. "in": "path",
  6260. "required": true
  6261. },
  6262. {
  6263. "type": "string",
  6264. "description": "name of the repo",
  6265. "name": "repo",
  6266. "in": "path",
  6267. "required": true
  6268. },
  6269. {
  6270. "type": "string",
  6271. "format": "date-time",
  6272. "description": "Describes the last point that notifications were checked. Anything updated since this time will not be updated.",
  6273. "name": "last_read_at",
  6274. "in": "query"
  6275. }
  6276. ],
  6277. "responses": {
  6278. "205": {
  6279. "$ref": "#/responses/empty"
  6280. }
  6281. }
  6282. }
  6283. },
  6284. "/repos/{owner}/{repo}/pulls": {
  6285. "get": {
  6286. "produces": [
  6287. "application/json"
  6288. ],
  6289. "tags": [
  6290. "repository"
  6291. ],
  6292. "summary": "List a repo's pull requests",
  6293. "operationId": "repoListPullRequests",
  6294. "parameters": [
  6295. {
  6296. "type": "string",
  6297. "description": "owner of the repo",
  6298. "name": "owner",
  6299. "in": "path",
  6300. "required": true
  6301. },
  6302. {
  6303. "type": "string",
  6304. "description": "name of the repo",
  6305. "name": "repo",
  6306. "in": "path",
  6307. "required": true
  6308. },
  6309. {
  6310. "enum": [
  6311. "closed",
  6312. "open",
  6313. "all"
  6314. ],
  6315. "type": "string",
  6316. "description": "State of pull request: open or closed (optional)",
  6317. "name": "state",
  6318. "in": "query"
  6319. },
  6320. {
  6321. "enum": [
  6322. "oldest",
  6323. "recentupdate",
  6324. "leastupdate",
  6325. "mostcomment",
  6326. "leastcomment",
  6327. "priority"
  6328. ],
  6329. "type": "string",
  6330. "description": "Type of sort",
  6331. "name": "sort",
  6332. "in": "query"
  6333. },
  6334. {
  6335. "type": "integer",
  6336. "format": "int64",
  6337. "description": "ID of the milestone",
  6338. "name": "milestone",
  6339. "in": "query"
  6340. },
  6341. {
  6342. "type": "array",
  6343. "items": {
  6344. "type": "integer",
  6345. "format": "int64"
  6346. },
  6347. "collectionFormat": "multi",
  6348. "description": "Label IDs",
  6349. "name": "labels",
  6350. "in": "query"
  6351. },
  6352. {
  6353. "type": "integer",
  6354. "description": "page number of results to return (1-based)",
  6355. "name": "page",
  6356. "in": "query"
  6357. },
  6358. {
  6359. "type": "integer",
  6360. "description": "page size of results, maximum page size is 50",
  6361. "name": "limit",
  6362. "in": "query"
  6363. }
  6364. ],
  6365. "responses": {
  6366. "200": {
  6367. "$ref": "#/responses/PullRequestList"
  6368. }
  6369. }
  6370. },
  6371. "post": {
  6372. "consumes": [
  6373. "application/json"
  6374. ],
  6375. "produces": [
  6376. "application/json"
  6377. ],
  6378. "tags": [
  6379. "repository"
  6380. ],
  6381. "summary": "Create a pull request",
  6382. "operationId": "repoCreatePullRequest",
  6383. "parameters": [
  6384. {
  6385. "type": "string",
  6386. "description": "owner of the repo",
  6387. "name": "owner",
  6388. "in": "path",
  6389. "required": true
  6390. },
  6391. {
  6392. "type": "string",
  6393. "description": "name of the repo",
  6394. "name": "repo",
  6395. "in": "path",
  6396. "required": true
  6397. },
  6398. {
  6399. "name": "body",
  6400. "in": "body",
  6401. "schema": {
  6402. "$ref": "#/definitions/CreatePullRequestOption"
  6403. }
  6404. }
  6405. ],
  6406. "responses": {
  6407. "201": {
  6408. "$ref": "#/responses/PullRequest"
  6409. },
  6410. "409": {
  6411. "$ref": "#/responses/error"
  6412. },
  6413. "422": {
  6414. "$ref": "#/responses/validationError"
  6415. }
  6416. }
  6417. }
  6418. },
  6419. "/repos/{owner}/{repo}/pulls/{index}": {
  6420. "get": {
  6421. "produces": [
  6422. "application/json"
  6423. ],
  6424. "tags": [
  6425. "repository"
  6426. ],
  6427. "summary": "Get a pull request",
  6428. "operationId": "repoGetPullRequest",
  6429. "parameters": [
  6430. {
  6431. "type": "string",
  6432. "description": "owner of the repo",
  6433. "name": "owner",
  6434. "in": "path",
  6435. "required": true
  6436. },
  6437. {
  6438. "type": "string",
  6439. "description": "name of the repo",
  6440. "name": "repo",
  6441. "in": "path",
  6442. "required": true
  6443. },
  6444. {
  6445. "type": "integer",
  6446. "format": "int64",
  6447. "description": "index of the pull request to get",
  6448. "name": "index",
  6449. "in": "path",
  6450. "required": true
  6451. }
  6452. ],
  6453. "responses": {
  6454. "200": {
  6455. "$ref": "#/responses/PullRequest"
  6456. },
  6457. "404": {
  6458. "$ref": "#/responses/notFound"
  6459. }
  6460. }
  6461. },
  6462. "patch": {
  6463. "consumes": [
  6464. "application/json"
  6465. ],
  6466. "produces": [
  6467. "application/json"
  6468. ],
  6469. "tags": [
  6470. "repository"
  6471. ],
  6472. "summary": "Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.",
  6473. "operationId": "repoEditPullRequest",
  6474. "parameters": [
  6475. {
  6476. "type": "string",
  6477. "description": "owner of the repo",
  6478. "name": "owner",
  6479. "in": "path",
  6480. "required": true
  6481. },
  6482. {
  6483. "type": "string",
  6484. "description": "name of the repo",
  6485. "name": "repo",
  6486. "in": "path",
  6487. "required": true
  6488. },
  6489. {
  6490. "type": "integer",
  6491. "format": "int64",
  6492. "description": "index of the pull request to edit",
  6493. "name": "index",
  6494. "in": "path",
  6495. "required": true
  6496. },
  6497. {
  6498. "name": "body",
  6499. "in": "body",
  6500. "schema": {
  6501. "$ref": "#/definitions/EditPullRequestOption"
  6502. }
  6503. }
  6504. ],
  6505. "responses": {
  6506. "201": {
  6507. "$ref": "#/responses/PullRequest"
  6508. },
  6509. "403": {
  6510. "$ref": "#/responses/forbidden"
  6511. },
  6512. "412": {
  6513. "$ref": "#/responses/error"
  6514. },
  6515. "422": {
  6516. "$ref": "#/responses/validationError"
  6517. }
  6518. }
  6519. }
  6520. },
  6521. "/repos/{owner}/{repo}/pulls/{index}/merge": {
  6522. "get": {
  6523. "produces": [
  6524. "application/json"
  6525. ],
  6526. "tags": [
  6527. "repository"
  6528. ],
  6529. "summary": "Check if a pull request has been merged",
  6530. "operationId": "repoPullRequestIsMerged",
  6531. "parameters": [
  6532. {
  6533. "type": "string",
  6534. "description": "owner of the repo",
  6535. "name": "owner",
  6536. "in": "path",
  6537. "required": true
  6538. },
  6539. {
  6540. "type": "string",
  6541. "description": "name of the repo",
  6542. "name": "repo",
  6543. "in": "path",
  6544. "required": true
  6545. },
  6546. {
  6547. "type": "integer",
  6548. "format": "int64",
  6549. "description": "index of the pull request",
  6550. "name": "index",
  6551. "in": "path",
  6552. "required": true
  6553. }
  6554. ],
  6555. "responses": {
  6556. "204": {
  6557. "description": "pull request has been merged"
  6558. },
  6559. "404": {
  6560. "description": "pull request has not been merged"
  6561. }
  6562. }
  6563. },
  6564. "post": {
  6565. "produces": [
  6566. "application/json"
  6567. ],
  6568. "tags": [
  6569. "repository"
  6570. ],
  6571. "summary": "Merge a pull request",
  6572. "operationId": "repoMergePullRequest",
  6573. "parameters": [
  6574. {
  6575. "type": "string",
  6576. "description": "owner of the repo",
  6577. "name": "owner",
  6578. "in": "path",
  6579. "required": true
  6580. },
  6581. {
  6582. "type": "string",
  6583. "description": "name of the repo",
  6584. "name": "repo",
  6585. "in": "path",
  6586. "required": true
  6587. },
  6588. {
  6589. "type": "integer",
  6590. "format": "int64",
  6591. "description": "index of the pull request to merge",
  6592. "name": "index",
  6593. "in": "path",
  6594. "required": true
  6595. },
  6596. {
  6597. "name": "body",
  6598. "in": "body",
  6599. "schema": {
  6600. "$ref": "#/definitions/MergePullRequestOption"
  6601. }
  6602. }
  6603. ],
  6604. "responses": {
  6605. "200": {
  6606. "$ref": "#/responses/empty"
  6607. },
  6608. "405": {
  6609. "$ref": "#/responses/empty"
  6610. },
  6611. "409": {
  6612. "$ref": "#/responses/error"
  6613. }
  6614. }
  6615. }
  6616. },
  6617. "/repos/{owner}/{repo}/raw/{filepath}": {
  6618. "get": {
  6619. "produces": [
  6620. "application/json"
  6621. ],
  6622. "tags": [
  6623. "repository"
  6624. ],
  6625. "summary": "Get a file from a repository",
  6626. "operationId": "repoGetRawFile",
  6627. "parameters": [
  6628. {
  6629. "type": "string",
  6630. "description": "owner of the repo",
  6631. "name": "owner",
  6632. "in": "path",
  6633. "required": true
  6634. },
  6635. {
  6636. "type": "string",
  6637. "description": "name of the repo",
  6638. "name": "repo",
  6639. "in": "path",
  6640. "required": true
  6641. },
  6642. {
  6643. "type": "string",
  6644. "description": "filepath of the file to get",
  6645. "name": "filepath",
  6646. "in": "path",
  6647. "required": true
  6648. }
  6649. ],
  6650. "responses": {
  6651. "200": {
  6652. "description": "success"
  6653. },
  6654. "404": {
  6655. "$ref": "#/responses/notFound"
  6656. }
  6657. }
  6658. }
  6659. },
  6660. "/repos/{owner}/{repo}/releases": {
  6661. "get": {
  6662. "produces": [
  6663. "application/json"
  6664. ],
  6665. "tags": [
  6666. "repository"
  6667. ],
  6668. "summary": "List a repo's releases",
  6669. "operationId": "repoListReleases",
  6670. "parameters": [
  6671. {
  6672. "type": "string",
  6673. "description": "owner of the repo",
  6674. "name": "owner",
  6675. "in": "path",
  6676. "required": true
  6677. },
  6678. {
  6679. "type": "string",
  6680. "description": "name of the repo",
  6681. "name": "repo",
  6682. "in": "path",
  6683. "required": true
  6684. },
  6685. {
  6686. "type": "integer",
  6687. "description": "items count every page wants to load",
  6688. "name": "per_page",
  6689. "in": "query"
  6690. },
  6691. {
  6692. "type": "integer",
  6693. "description": "page number of results to return (1-based)",
  6694. "name": "page",
  6695. "in": "query"
  6696. },
  6697. {
  6698. "type": "integer",
  6699. "description": "page size of results, maximum page size is 50",
  6700. "name": "limit",
  6701. "in": "query"
  6702. }
  6703. ],
  6704. "responses": {
  6705. "200": {
  6706. "$ref": "#/responses/ReleaseList"
  6707. }
  6708. }
  6709. },
  6710. "post": {
  6711. "consumes": [
  6712. "application/json"
  6713. ],
  6714. "produces": [
  6715. "application/json"
  6716. ],
  6717. "tags": [
  6718. "repository"
  6719. ],
  6720. "summary": "Create a release",
  6721. "operationId": "repoCreateRelease",
  6722. "parameters": [
  6723. {
  6724. "type": "string",
  6725. "description": "owner of the repo",
  6726. "name": "owner",
  6727. "in": "path",
  6728. "required": true
  6729. },
  6730. {
  6731. "type": "string",
  6732. "description": "name of the repo",
  6733. "name": "repo",
  6734. "in": "path",
  6735. "required": true
  6736. },
  6737. {
  6738. "name": "body",
  6739. "in": "body",
  6740. "schema": {
  6741. "$ref": "#/definitions/CreateReleaseOption"
  6742. }
  6743. }
  6744. ],
  6745. "responses": {
  6746. "201": {
  6747. "$ref": "#/responses/Release"
  6748. },
  6749. "409": {
  6750. "$ref": "#/responses/error"
  6751. }
  6752. }
  6753. }
  6754. },
  6755. "/repos/{owner}/{repo}/releases/{id}": {
  6756. "get": {
  6757. "produces": [
  6758. "application/json"
  6759. ],
  6760. "tags": [
  6761. "repository"
  6762. ],
  6763. "summary": "Get a release",
  6764. "operationId": "repoGetRelease",
  6765. "parameters": [
  6766. {
  6767. "type": "string",
  6768. "description": "owner of the repo",
  6769. "name": "owner",
  6770. "in": "path",
  6771. "required": true
  6772. },
  6773. {
  6774. "type": "string",
  6775. "description": "name of the repo",
  6776. "name": "repo",
  6777. "in": "path",
  6778. "required": true
  6779. },
  6780. {
  6781. "type": "integer",
  6782. "format": "int64",
  6783. "description": "id of the release to get",
  6784. "name": "id",
  6785. "in": "path",
  6786. "required": true
  6787. }
  6788. ],
  6789. "responses": {
  6790. "200": {
  6791. "$ref": "#/responses/Release"
  6792. }
  6793. }
  6794. },
  6795. "delete": {
  6796. "tags": [
  6797. "repository"
  6798. ],
  6799. "summary": "Delete a release",
  6800. "operationId": "repoDeleteRelease",
  6801. "parameters": [
  6802. {
  6803. "type": "string",
  6804. "description": "owner of the repo",
  6805. "name": "owner",
  6806. "in": "path",
  6807. "required": true
  6808. },
  6809. {
  6810. "type": "string",
  6811. "description": "name of the repo",
  6812. "name": "repo",
  6813. "in": "path",
  6814. "required": true
  6815. },
  6816. {
  6817. "type": "integer",
  6818. "format": "int64",
  6819. "description": "id of the release to delete",
  6820. "name": "id",
  6821. "in": "path",
  6822. "required": true
  6823. }
  6824. ],
  6825. "responses": {
  6826. "204": {
  6827. "$ref": "#/responses/empty"
  6828. }
  6829. }
  6830. },
  6831. "patch": {
  6832. "consumes": [
  6833. "application/json"
  6834. ],
  6835. "produces": [
  6836. "application/json"
  6837. ],
  6838. "tags": [
  6839. "repository"
  6840. ],
  6841. "summary": "Update a release",
  6842. "operationId": "repoEditRelease",
  6843. "parameters": [
  6844. {
  6845. "type": "string",
  6846. "description": "owner of the repo",
  6847. "name": "owner",
  6848. "in": "path",
  6849. "required": true
  6850. },
  6851. {
  6852. "type": "string",
  6853. "description": "name of the repo",
  6854. "name": "repo",
  6855. "in": "path",
  6856. "required": true
  6857. },
  6858. {
  6859. "type": "integer",
  6860. "format": "int64",
  6861. "description": "id of the release to edit",
  6862. "name": "id",
  6863. "in": "path",
  6864. "required": true
  6865. },
  6866. {
  6867. "name": "body",
  6868. "in": "body",
  6869. "schema": {
  6870. "$ref": "#/definitions/EditReleaseOption"
  6871. }
  6872. }
  6873. ],
  6874. "responses": {
  6875. "200": {
  6876. "$ref": "#/responses/Release"
  6877. }
  6878. }
  6879. }
  6880. },
  6881. "/repos/{owner}/{repo}/releases/{id}/assets": {
  6882. "get": {
  6883. "produces": [
  6884. "application/json"
  6885. ],
  6886. "tags": [
  6887. "repository"
  6888. ],
  6889. "summary": "List release's attachments",
  6890. "operationId": "repoListReleaseAttachments",
  6891. "parameters": [
  6892. {
  6893. "type": "string",
  6894. "description": "owner of the repo",
  6895. "name": "owner",
  6896. "in": "path",
  6897. "required": true
  6898. },
  6899. {
  6900. "type": "string",
  6901. "description": "name of the repo",
  6902. "name": "repo",
  6903. "in": "path",
  6904. "required": true
  6905. },
  6906. {
  6907. "type": "integer",
  6908. "format": "int64",
  6909. "description": "id of the release",
  6910. "name": "id",
  6911. "in": "path",
  6912. "required": true
  6913. }
  6914. ],
  6915. "responses": {
  6916. "200": {
  6917. "$ref": "#/responses/AttachmentList"
  6918. }
  6919. }
  6920. },
  6921. "post": {
  6922. "consumes": [
  6923. "multipart/form-data"
  6924. ],
  6925. "produces": [
  6926. "application/json"
  6927. ],
  6928. "tags": [
  6929. "repository"
  6930. ],
  6931. "summary": "Create a release attachment",
  6932. "operationId": "repoCreateReleaseAttachment",
  6933. "parameters": [
  6934. {
  6935. "type": "string",
  6936. "description": "owner of the repo",
  6937. "name": "owner",
  6938. "in": "path",
  6939. "required": true
  6940. },
  6941. {
  6942. "type": "string",
  6943. "description": "name of the repo",
  6944. "name": "repo",
  6945. "in": "path",
  6946. "required": true
  6947. },
  6948. {
  6949. "type": "integer",
  6950. "format": "int64",
  6951. "description": "id of the release",
  6952. "name": "id",
  6953. "in": "path",
  6954. "required": true
  6955. },
  6956. {
  6957. "type": "string",
  6958. "description": "name of the attachment",
  6959. "name": "name",
  6960. "in": "query"
  6961. },
  6962. {
  6963. "type": "file",
  6964. "description": "attachment to upload",
  6965. "name": "attachment",
  6966. "in": "formData",
  6967. "required": true
  6968. }
  6969. ],
  6970. "responses": {
  6971. "201": {
  6972. "$ref": "#/responses/Attachment"
  6973. },
  6974. "400": {
  6975. "$ref": "#/responses/error"
  6976. }
  6977. }
  6978. }
  6979. },
  6980. "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": {
  6981. "get": {
  6982. "produces": [
  6983. "application/json"
  6984. ],
  6985. "tags": [
  6986. "repository"
  6987. ],
  6988. "summary": "Get a release attachment",
  6989. "operationId": "repoGetReleaseAttachment",
  6990. "parameters": [
  6991. {
  6992. "type": "string",
  6993. "description": "owner of the repo",
  6994. "name": "owner",
  6995. "in": "path",
  6996. "required": true
  6997. },
  6998. {
  6999. "type": "string",
  7000. "description": "name of the repo",
  7001. "name": "repo",
  7002. "in": "path",
  7003. "required": true
  7004. },
  7005. {
  7006. "type": "integer",
  7007. "format": "int64",
  7008. "description": "id of the release",
  7009. "name": "id",
  7010. "in": "path",
  7011. "required": true
  7012. },
  7013. {
  7014. "type": "integer",
  7015. "format": "int64",
  7016. "description": "id of the attachment to get",
  7017. "name": "attachment_id",
  7018. "in": "path",
  7019. "required": true
  7020. }
  7021. ],
  7022. "responses": {
  7023. "200": {
  7024. "$ref": "#/responses/Attachment"
  7025. }
  7026. }
  7027. },
  7028. "delete": {
  7029. "produces": [
  7030. "application/json"
  7031. ],
  7032. "tags": [
  7033. "repository"
  7034. ],
  7035. "summary": "Delete a release attachment",
  7036. "operationId": "repoDeleteReleaseAttachment",
  7037. "parameters": [
  7038. {
  7039. "type": "string",
  7040. "description": "owner of the repo",
  7041. "name": "owner",
  7042. "in": "path",
  7043. "required": true
  7044. },
  7045. {
  7046. "type": "string",
  7047. "description": "name of the repo",
  7048. "name": "repo",
  7049. "in": "path",
  7050. "required": true
  7051. },
  7052. {
  7053. "type": "integer",
  7054. "format": "int64",
  7055. "description": "id of the release",
  7056. "name": "id",
  7057. "in": "path",
  7058. "required": true
  7059. },
  7060. {
  7061. "type": "integer",
  7062. "format": "int64",
  7063. "description": "id of the attachment to delete",
  7064. "name": "attachment_id",
  7065. "in": "path",
  7066. "required": true
  7067. }
  7068. ],
  7069. "responses": {
  7070. "204": {
  7071. "$ref": "#/responses/empty"
  7072. }
  7073. }
  7074. },
  7075. "patch": {
  7076. "consumes": [
  7077. "application/json"
  7078. ],
  7079. "produces": [
  7080. "application/json"
  7081. ],
  7082. "tags": [
  7083. "repository"
  7084. ],
  7085. "summary": "Edit a release attachment",
  7086. "operationId": "repoEditReleaseAttachment",
  7087. "parameters": [
  7088. {
  7089. "type": "string",
  7090. "description": "owner of the repo",
  7091. "name": "owner",
  7092. "in": "path",
  7093. "required": true
  7094. },
  7095. {
  7096. "type": "string",
  7097. "description": "name of the repo",
  7098. "name": "repo",
  7099. "in": "path",
  7100. "required": true
  7101. },
  7102. {
  7103. "type": "integer",
  7104. "format": "int64",
  7105. "description": "id of the release",
  7106. "name": "id",
  7107. "in": "path",
  7108. "required": true
  7109. },
  7110. {
  7111. "type": "integer",
  7112. "format": "int64",
  7113. "description": "id of the attachment to edit",
  7114. "name": "attachment_id",
  7115. "in": "path",
  7116. "required": true
  7117. },
  7118. {
  7119. "name": "body",
  7120. "in": "body",
  7121. "schema": {
  7122. "$ref": "#/definitions/EditAttachmentOptions"
  7123. }
  7124. }
  7125. ],
  7126. "responses": {
  7127. "201": {
  7128. "$ref": "#/responses/Attachment"
  7129. }
  7130. }
  7131. }
  7132. },
  7133. "/repos/{owner}/{repo}/signing-key.gpg": {
  7134. "get": {
  7135. "produces": [
  7136. "text/plain"
  7137. ],
  7138. "tags": [
  7139. "repository"
  7140. ],
  7141. "summary": "Get signing-key.gpg for given repository",
  7142. "operationId": "repoSigningKey",
  7143. "parameters": [
  7144. {
  7145. "type": "string",
  7146. "description": "owner of the repo",
  7147. "name": "owner",
  7148. "in": "path",
  7149. "required": true
  7150. },
  7151. {
  7152. "type": "string",
  7153. "description": "name of the repo",
  7154. "name": "repo",
  7155. "in": "path",
  7156. "required": true
  7157. }
  7158. ],
  7159. "responses": {
  7160. "200": {
  7161. "description": "GPG armored public key",
  7162. "schema": {
  7163. "type": "string"
  7164. }
  7165. }
  7166. }
  7167. }
  7168. },
  7169. "/repos/{owner}/{repo}/stargazers": {
  7170. "get": {
  7171. "produces": [
  7172. "application/json"
  7173. ],
  7174. "tags": [
  7175. "repository"
  7176. ],
  7177. "summary": "List a repo's stargazers",
  7178. "operationId": "repoListStargazers",
  7179. "parameters": [
  7180. {
  7181. "type": "string",
  7182. "description": "owner of the repo",
  7183. "name": "owner",
  7184. "in": "path",
  7185. "required": true
  7186. },
  7187. {
  7188. "type": "string",
  7189. "description": "name of the repo",
  7190. "name": "repo",
  7191. "in": "path",
  7192. "required": true
  7193. },
  7194. {
  7195. "type": "integer",
  7196. "description": "page number of results to return (1-based)",
  7197. "name": "page",
  7198. "in": "query"
  7199. },
  7200. {
  7201. "type": "integer",
  7202. "description": "page size of results, maximum page size is 50",
  7203. "name": "limit",
  7204. "in": "query"
  7205. }
  7206. ],
  7207. "responses": {
  7208. "200": {
  7209. "$ref": "#/responses/UserList"
  7210. }
  7211. }
  7212. }
  7213. },
  7214. "/repos/{owner}/{repo}/statuses/{sha}": {
  7215. "get": {
  7216. "produces": [
  7217. "application/json"
  7218. ],
  7219. "tags": [
  7220. "repository"
  7221. ],
  7222. "summary": "Get a commit's statuses",
  7223. "operationId": "repoListStatuses",
  7224. "parameters": [
  7225. {
  7226. "type": "string",
  7227. "description": "owner of the repo",
  7228. "name": "owner",
  7229. "in": "path",
  7230. "required": true
  7231. },
  7232. {
  7233. "type": "string",
  7234. "description": "name of the repo",
  7235. "name": "repo",
  7236. "in": "path",
  7237. "required": true
  7238. },
  7239. {
  7240. "type": "string",
  7241. "description": "sha of the commit",
  7242. "name": "sha",
  7243. "in": "path",
  7244. "required": true
  7245. },
  7246. {
  7247. "enum": [
  7248. "oldest",
  7249. "recentupdate",
  7250. "leastupdate",
  7251. "leastindex",
  7252. "highestindex"
  7253. ],
  7254. "type": "string",
  7255. "description": "type of sort",
  7256. "name": "sort",
  7257. "in": "query"
  7258. },
  7259. {
  7260. "enum": [
  7261. "pending",
  7262. "success",
  7263. "error",
  7264. "failure",
  7265. "warning"
  7266. ],
  7267. "type": "string",
  7268. "description": "type of state",
  7269. "name": "state",
  7270. "in": "query"
  7271. },
  7272. {
  7273. "type": "integer",
  7274. "description": "page number of results to return (1-based)",
  7275. "name": "page",
  7276. "in": "query"
  7277. },
  7278. {
  7279. "type": "integer",
  7280. "description": "page size of results, maximum page size is 50",
  7281. "name": "limit",
  7282. "in": "query"
  7283. }
  7284. ],
  7285. "responses": {
  7286. "200": {
  7287. "$ref": "#/responses/StatusList"
  7288. },
  7289. "400": {
  7290. "$ref": "#/responses/error"
  7291. }
  7292. }
  7293. },
  7294. "post": {
  7295. "produces": [
  7296. "application/json"
  7297. ],
  7298. "tags": [
  7299. "repository"
  7300. ],
  7301. "summary": "Create a commit status",
  7302. "operationId": "repoCreateStatus",
  7303. "parameters": [
  7304. {
  7305. "type": "string",
  7306. "description": "owner of the repo",
  7307. "name": "owner",
  7308. "in": "path",
  7309. "required": true
  7310. },
  7311. {
  7312. "type": "string",
  7313. "description": "name of the repo",
  7314. "name": "repo",
  7315. "in": "path",
  7316. "required": true
  7317. },
  7318. {
  7319. "type": "string",
  7320. "description": "sha of the commit",
  7321. "name": "sha",
  7322. "in": "path",
  7323. "required": true
  7324. },
  7325. {
  7326. "name": "body",
  7327. "in": "body",
  7328. "schema": {
  7329. "$ref": "#/definitions/CreateStatusOption"
  7330. }
  7331. }
  7332. ],
  7333. "responses": {
  7334. "201": {
  7335. "$ref": "#/responses/Status"
  7336. },
  7337. "400": {
  7338. "$ref": "#/responses/error"
  7339. }
  7340. }
  7341. }
  7342. },
  7343. "/repos/{owner}/{repo}/subscribers": {
  7344. "get": {
  7345. "produces": [
  7346. "application/json"
  7347. ],
  7348. "tags": [
  7349. "repository"
  7350. ],
  7351. "summary": "List a repo's watchers",
  7352. "operationId": "repoListSubscribers",
  7353. "parameters": [
  7354. {
  7355. "type": "string",
  7356. "description": "owner of the repo",
  7357. "name": "owner",
  7358. "in": "path",
  7359. "required": true
  7360. },
  7361. {
  7362. "type": "string",
  7363. "description": "name of the repo",
  7364. "name": "repo",
  7365. "in": "path",
  7366. "required": true
  7367. },
  7368. {
  7369. "type": "integer",
  7370. "description": "page number of results to return (1-based)",
  7371. "name": "page",
  7372. "in": "query"
  7373. },
  7374. {
  7375. "type": "integer",
  7376. "description": "page size of results, maximum page size is 50",
  7377. "name": "limit",
  7378. "in": "query"
  7379. }
  7380. ],
  7381. "responses": {
  7382. "200": {
  7383. "$ref": "#/responses/UserList"
  7384. }
  7385. }
  7386. }
  7387. },
  7388. "/repos/{owner}/{repo}/subscription": {
  7389. "get": {
  7390. "tags": [
  7391. "repository"
  7392. ],
  7393. "summary": "Check if the current user is watching a repo",
  7394. "operationId": "userCurrentCheckSubscription",
  7395. "parameters": [
  7396. {
  7397. "type": "string",
  7398. "description": "owner of the repo",
  7399. "name": "owner",
  7400. "in": "path",
  7401. "required": true
  7402. },
  7403. {
  7404. "type": "string",
  7405. "description": "name of the repo",
  7406. "name": "repo",
  7407. "in": "path",
  7408. "required": true
  7409. }
  7410. ],
  7411. "responses": {
  7412. "200": {
  7413. "$ref": "#/responses/WatchInfo"
  7414. },
  7415. "404": {
  7416. "description": "User is not watching this repo or repo do not exist"
  7417. }
  7418. }
  7419. },
  7420. "put": {
  7421. "tags": [
  7422. "repository"
  7423. ],
  7424. "summary": "Watch a repo",
  7425. "operationId": "userCurrentPutSubscription",
  7426. "parameters": [
  7427. {
  7428. "type": "string",
  7429. "description": "owner of the repo",
  7430. "name": "owner",
  7431. "in": "path",
  7432. "required": true
  7433. },
  7434. {
  7435. "type": "string",
  7436. "description": "name of the repo",
  7437. "name": "repo",
  7438. "in": "path",
  7439. "required": true
  7440. }
  7441. ],
  7442. "responses": {
  7443. "200": {
  7444. "$ref": "#/responses/WatchInfo"
  7445. }
  7446. }
  7447. },
  7448. "delete": {
  7449. "tags": [
  7450. "repository"
  7451. ],
  7452. "summary": "Unwatch a repo",
  7453. "operationId": "userCurrentDeleteSubscription",
  7454. "parameters": [
  7455. {
  7456. "type": "string",
  7457. "description": "owner of the repo",
  7458. "name": "owner",
  7459. "in": "path",
  7460. "required": true
  7461. },
  7462. {
  7463. "type": "string",
  7464. "description": "name of the repo",
  7465. "name": "repo",
  7466. "in": "path",
  7467. "required": true
  7468. }
  7469. ],
  7470. "responses": {
  7471. "204": {
  7472. "$ref": "#/responses/empty"
  7473. }
  7474. }
  7475. }
  7476. },
  7477. "/repos/{owner}/{repo}/tags": {
  7478. "get": {
  7479. "produces": [
  7480. "application/json"
  7481. ],
  7482. "tags": [
  7483. "repository"
  7484. ],
  7485. "summary": "List a repository's tags",
  7486. "operationId": "repoListTags",
  7487. "parameters": [
  7488. {
  7489. "type": "string",
  7490. "description": "owner of the repo",
  7491. "name": "owner",
  7492. "in": "path",
  7493. "required": true
  7494. },
  7495. {
  7496. "type": "string",
  7497. "description": "name of the repo",
  7498. "name": "repo",
  7499. "in": "path",
  7500. "required": true
  7501. },
  7502. {
  7503. "type": "integer",
  7504. "description": "page number of results to return (1-based)",
  7505. "name": "page",
  7506. "in": "query"
  7507. },
  7508. {
  7509. "type": "integer",
  7510. "description": "page size of results, default maximum page size is 50",
  7511. "name": "limit",
  7512. "in": "query"
  7513. }
  7514. ],
  7515. "responses": {
  7516. "200": {
  7517. "$ref": "#/responses/TagList"
  7518. }
  7519. }
  7520. }
  7521. },
  7522. "/repos/{owner}/{repo}/times": {
  7523. "get": {
  7524. "produces": [
  7525. "application/json"
  7526. ],
  7527. "tags": [
  7528. "repository"
  7529. ],
  7530. "summary": "List a repo's tracked times",
  7531. "operationId": "repoTrackedTimes",
  7532. "parameters": [
  7533. {
  7534. "type": "string",
  7535. "description": "owner of the repo",
  7536. "name": "owner",
  7537. "in": "path",
  7538. "required": true
  7539. },
  7540. {
  7541. "type": "string",
  7542. "description": "name of the repo",
  7543. "name": "repo",
  7544. "in": "path",
  7545. "required": true
  7546. },
  7547. {
  7548. "type": "string",
  7549. "description": "optional filter by user",
  7550. "name": "user",
  7551. "in": "query"
  7552. },
  7553. {
  7554. "type": "string",
  7555. "format": "date-time",
  7556. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  7557. "name": "since",
  7558. "in": "query"
  7559. },
  7560. {
  7561. "type": "string",
  7562. "format": "date-time",
  7563. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  7564. "name": "before",
  7565. "in": "query"
  7566. },
  7567. {
  7568. "type": "integer",
  7569. "description": "page number of results to return (1-based)",
  7570. "name": "page",
  7571. "in": "query"
  7572. },
  7573. {
  7574. "type": "integer",
  7575. "description": "page size of results, maximum page size is 50",
  7576. "name": "limit",
  7577. "in": "query"
  7578. }
  7579. ],
  7580. "responses": {
  7581. "200": {
  7582. "$ref": "#/responses/TrackedTimeList"
  7583. },
  7584. "400": {
  7585. "$ref": "#/responses/error"
  7586. },
  7587. "403": {
  7588. "$ref": "#/responses/forbidden"
  7589. }
  7590. }
  7591. }
  7592. },
  7593. "/repos/{owner}/{repo}/times/{user}": {
  7594. "get": {
  7595. "produces": [
  7596. "application/json"
  7597. ],
  7598. "tags": [
  7599. "repository"
  7600. ],
  7601. "summary": "List a user's tracked times in a repo",
  7602. "operationId": "userTrackedTimes",
  7603. "deprecated": true,
  7604. "parameters": [
  7605. {
  7606. "type": "string",
  7607. "description": "owner of the repo",
  7608. "name": "owner",
  7609. "in": "path",
  7610. "required": true
  7611. },
  7612. {
  7613. "type": "string",
  7614. "description": "name of the repo",
  7615. "name": "repo",
  7616. "in": "path",
  7617. "required": true
  7618. },
  7619. {
  7620. "type": "string",
  7621. "description": "username of user",
  7622. "name": "user",
  7623. "in": "path",
  7624. "required": true
  7625. }
  7626. ],
  7627. "responses": {
  7628. "200": {
  7629. "$ref": "#/responses/TrackedTimeList"
  7630. },
  7631. "400": {
  7632. "$ref": "#/responses/error"
  7633. },
  7634. "403": {
  7635. "$ref": "#/responses/forbidden"
  7636. }
  7637. }
  7638. }
  7639. },
  7640. "/repos/{owner}/{repo}/topics": {
  7641. "get": {
  7642. "produces": [
  7643. "application/json"
  7644. ],
  7645. "tags": [
  7646. "repository"
  7647. ],
  7648. "summary": "Get list of topics that a repository has",
  7649. "operationId": "repoListTopics",
  7650. "parameters": [
  7651. {
  7652. "type": "string",
  7653. "description": "owner of the repo",
  7654. "name": "owner",
  7655. "in": "path",
  7656. "required": true
  7657. },
  7658. {
  7659. "type": "string",
  7660. "description": "name of the repo",
  7661. "name": "repo",
  7662. "in": "path",
  7663. "required": true
  7664. },
  7665. {
  7666. "type": "integer",
  7667. "description": "page number of results to return (1-based)",
  7668. "name": "page",
  7669. "in": "query"
  7670. },
  7671. {
  7672. "type": "integer",
  7673. "description": "page size of results, maximum page size is 50",
  7674. "name": "limit",
  7675. "in": "query"
  7676. }
  7677. ],
  7678. "responses": {
  7679. "200": {
  7680. "$ref": "#/responses/TopicNames"
  7681. }
  7682. }
  7683. },
  7684. "put": {
  7685. "produces": [
  7686. "application/json"
  7687. ],
  7688. "tags": [
  7689. "repository"
  7690. ],
  7691. "summary": "Replace list of topics for a repository",
  7692. "operationId": "repoUpdateTopics",
  7693. "parameters": [
  7694. {
  7695. "type": "string",
  7696. "description": "owner of the repo",
  7697. "name": "owner",
  7698. "in": "path",
  7699. "required": true
  7700. },
  7701. {
  7702. "type": "string",
  7703. "description": "name of the repo",
  7704. "name": "repo",
  7705. "in": "path",
  7706. "required": true
  7707. },
  7708. {
  7709. "name": "body",
  7710. "in": "body",
  7711. "schema": {
  7712. "$ref": "#/definitions/RepoTopicOptions"
  7713. }
  7714. }
  7715. ],
  7716. "responses": {
  7717. "204": {
  7718. "$ref": "#/responses/empty"
  7719. },
  7720. "422": {
  7721. "$ref": "#/responses/invalidTopicsError"
  7722. }
  7723. }
  7724. }
  7725. },
  7726. "/repos/{owner}/{repo}/topics/{topic}": {
  7727. "put": {
  7728. "produces": [
  7729. "application/json"
  7730. ],
  7731. "tags": [
  7732. "repository"
  7733. ],
  7734. "summary": "Add a topic to a repository",
  7735. "operationId": "repoAddTopíc",
  7736. "parameters": [
  7737. {
  7738. "type": "string",
  7739. "description": "owner of the repo",
  7740. "name": "owner",
  7741. "in": "path",
  7742. "required": true
  7743. },
  7744. {
  7745. "type": "string",
  7746. "description": "name of the repo",
  7747. "name": "repo",
  7748. "in": "path",
  7749. "required": true
  7750. },
  7751. {
  7752. "type": "string",
  7753. "description": "name of the topic to add",
  7754. "name": "topic",
  7755. "in": "path",
  7756. "required": true
  7757. }
  7758. ],
  7759. "responses": {
  7760. "204": {
  7761. "$ref": "#/responses/empty"
  7762. },
  7763. "422": {
  7764. "$ref": "#/responses/invalidTopicsError"
  7765. }
  7766. }
  7767. },
  7768. "delete": {
  7769. "produces": [
  7770. "application/json"
  7771. ],
  7772. "tags": [
  7773. "repository"
  7774. ],
  7775. "summary": "Delete a topic from a repository",
  7776. "operationId": "repoDeleteTopic",
  7777. "parameters": [
  7778. {
  7779. "type": "string",
  7780. "description": "owner of the repo",
  7781. "name": "owner",
  7782. "in": "path",
  7783. "required": true
  7784. },
  7785. {
  7786. "type": "string",
  7787. "description": "name of the repo",
  7788. "name": "repo",
  7789. "in": "path",
  7790. "required": true
  7791. },
  7792. {
  7793. "type": "string",
  7794. "description": "name of the topic to delete",
  7795. "name": "topic",
  7796. "in": "path",
  7797. "required": true
  7798. }
  7799. ],
  7800. "responses": {
  7801. "204": {
  7802. "$ref": "#/responses/empty"
  7803. },
  7804. "422": {
  7805. "$ref": "#/responses/invalidTopicsError"
  7806. }
  7807. }
  7808. }
  7809. },
  7810. "/repos/{owner}/{repo}/transfer": {
  7811. "post": {
  7812. "produces": [
  7813. "application/json"
  7814. ],
  7815. "tags": [
  7816. "repository"
  7817. ],
  7818. "summary": "Transfer a repo ownership",
  7819. "operationId": "repoTransfer",
  7820. "parameters": [
  7821. {
  7822. "type": "string",
  7823. "description": "owner of the repo to transfer",
  7824. "name": "owner",
  7825. "in": "path",
  7826. "required": true
  7827. },
  7828. {
  7829. "type": "string",
  7830. "description": "name of the repo to transfer",
  7831. "name": "repo",
  7832. "in": "path",
  7833. "required": true
  7834. },
  7835. {
  7836. "description": "Transfer Options",
  7837. "name": "body",
  7838. "in": "body",
  7839. "required": true,
  7840. "schema": {
  7841. "$ref": "#/definitions/TransferRepoOption"
  7842. }
  7843. }
  7844. ],
  7845. "responses": {
  7846. "202": {
  7847. "$ref": "#/responses/Repository"
  7848. },
  7849. "403": {
  7850. "$ref": "#/responses/forbidden"
  7851. },
  7852. "404": {
  7853. "$ref": "#/responses/notFound"
  7854. },
  7855. "422": {
  7856. "$ref": "#/responses/validationError"
  7857. }
  7858. }
  7859. }
  7860. },
  7861. "/repositories/{id}": {
  7862. "get": {
  7863. "produces": [
  7864. "application/json"
  7865. ],
  7866. "tags": [
  7867. "repository"
  7868. ],
  7869. "summary": "Get a repository by id",
  7870. "operationId": "repoGetByID",
  7871. "parameters": [
  7872. {
  7873. "type": "integer",
  7874. "format": "int64",
  7875. "description": "id of the repo to get",
  7876. "name": "id",
  7877. "in": "path",
  7878. "required": true
  7879. }
  7880. ],
  7881. "responses": {
  7882. "200": {
  7883. "$ref": "#/responses/Repository"
  7884. }
  7885. }
  7886. }
  7887. },
  7888. "/signing-key.gpg": {
  7889. "get": {
  7890. "produces": [
  7891. "text/plain"
  7892. ],
  7893. "tags": [
  7894. "miscellaneous"
  7895. ],
  7896. "summary": "Get default signing-key.gpg",
  7897. "operationId": "getSigningKey",
  7898. "responses": {
  7899. "200": {
  7900. "description": "GPG armored public key",
  7901. "schema": {
  7902. "type": "string"
  7903. }
  7904. }
  7905. }
  7906. }
  7907. },
  7908. "/teams/{id}": {
  7909. "get": {
  7910. "produces": [
  7911. "application/json"
  7912. ],
  7913. "tags": [
  7914. "organization"
  7915. ],
  7916. "summary": "Get a team",
  7917. "operationId": "orgGetTeam",
  7918. "parameters": [
  7919. {
  7920. "type": "integer",
  7921. "format": "int64",
  7922. "description": "id of the team to get",
  7923. "name": "id",
  7924. "in": "path",
  7925. "required": true
  7926. }
  7927. ],
  7928. "responses": {
  7929. "200": {
  7930. "$ref": "#/responses/Team"
  7931. }
  7932. }
  7933. },
  7934. "delete": {
  7935. "tags": [
  7936. "organization"
  7937. ],
  7938. "summary": "Delete a team",
  7939. "operationId": "orgDeleteTeam",
  7940. "parameters": [
  7941. {
  7942. "type": "integer",
  7943. "format": "int64",
  7944. "description": "id of the team to delete",
  7945. "name": "id",
  7946. "in": "path",
  7947. "required": true
  7948. }
  7949. ],
  7950. "responses": {
  7951. "204": {
  7952. "description": "team deleted"
  7953. }
  7954. }
  7955. },
  7956. "patch": {
  7957. "consumes": [
  7958. "application/json"
  7959. ],
  7960. "produces": [
  7961. "application/json"
  7962. ],
  7963. "tags": [
  7964. "organization"
  7965. ],
  7966. "summary": "Edit a team",
  7967. "operationId": "orgEditTeam",
  7968. "parameters": [
  7969. {
  7970. "type": "integer",
  7971. "description": "id of the team to edit",
  7972. "name": "id",
  7973. "in": "path",
  7974. "required": true
  7975. },
  7976. {
  7977. "name": "body",
  7978. "in": "body",
  7979. "schema": {
  7980. "$ref": "#/definitions/EditTeamOption"
  7981. }
  7982. }
  7983. ],
  7984. "responses": {
  7985. "200": {
  7986. "$ref": "#/responses/Team"
  7987. }
  7988. }
  7989. }
  7990. },
  7991. "/teams/{id}/members": {
  7992. "get": {
  7993. "produces": [
  7994. "application/json"
  7995. ],
  7996. "tags": [
  7997. "organization"
  7998. ],
  7999. "summary": "List a team's members",
  8000. "operationId": "orgListTeamMembers",
  8001. "parameters": [
  8002. {
  8003. "type": "integer",
  8004. "format": "int64",
  8005. "description": "id of the team",
  8006. "name": "id",
  8007. "in": "path",
  8008. "required": true
  8009. },
  8010. {
  8011. "type": "integer",
  8012. "description": "page number of results to return (1-based)",
  8013. "name": "page",
  8014. "in": "query"
  8015. },
  8016. {
  8017. "type": "integer",
  8018. "description": "page size of results, maximum page size is 50",
  8019. "name": "limit",
  8020. "in": "query"
  8021. }
  8022. ],
  8023. "responses": {
  8024. "200": {
  8025. "$ref": "#/responses/UserList"
  8026. }
  8027. }
  8028. }
  8029. },
  8030. "/teams/{id}/members/{username}": {
  8031. "get": {
  8032. "produces": [
  8033. "application/json"
  8034. ],
  8035. "tags": [
  8036. "organization"
  8037. ],
  8038. "summary": "List a particular member of team",
  8039. "operationId": "orgListTeamMember",
  8040. "parameters": [
  8041. {
  8042. "type": "integer",
  8043. "format": "int64",
  8044. "description": "id of the team",
  8045. "name": "id",
  8046. "in": "path",
  8047. "required": true
  8048. },
  8049. {
  8050. "type": "string",
  8051. "description": "username of the member to list",
  8052. "name": "username",
  8053. "in": "path",
  8054. "required": true
  8055. }
  8056. ],
  8057. "responses": {
  8058. "200": {
  8059. "$ref": "#/responses/User"
  8060. },
  8061. "404": {
  8062. "$ref": "#/responses/notFound"
  8063. }
  8064. }
  8065. },
  8066. "put": {
  8067. "produces": [
  8068. "application/json"
  8069. ],
  8070. "tags": [
  8071. "organization"
  8072. ],
  8073. "summary": "Add a team member",
  8074. "operationId": "orgAddTeamMember",
  8075. "parameters": [
  8076. {
  8077. "type": "integer",
  8078. "format": "int64",
  8079. "description": "id of the team",
  8080. "name": "id",
  8081. "in": "path",
  8082. "required": true
  8083. },
  8084. {
  8085. "type": "string",
  8086. "description": "username of the user to add",
  8087. "name": "username",
  8088. "in": "path",
  8089. "required": true
  8090. }
  8091. ],
  8092. "responses": {
  8093. "204": {
  8094. "$ref": "#/responses/empty"
  8095. },
  8096. "404": {
  8097. "$ref": "#/responses/notFound"
  8098. }
  8099. }
  8100. },
  8101. "delete": {
  8102. "produces": [
  8103. "application/json"
  8104. ],
  8105. "tags": [
  8106. "organization"
  8107. ],
  8108. "summary": "Remove a team member",
  8109. "operationId": "orgRemoveTeamMember",
  8110. "parameters": [
  8111. {
  8112. "type": "integer",
  8113. "format": "int64",
  8114. "description": "id of the team",
  8115. "name": "id",
  8116. "in": "path",
  8117. "required": true
  8118. },
  8119. {
  8120. "type": "string",
  8121. "description": "username of the user to remove",
  8122. "name": "username",
  8123. "in": "path",
  8124. "required": true
  8125. }
  8126. ],
  8127. "responses": {
  8128. "204": {
  8129. "$ref": "#/responses/empty"
  8130. },
  8131. "404": {
  8132. "$ref": "#/responses/notFound"
  8133. }
  8134. }
  8135. }
  8136. },
  8137. "/teams/{id}/repos": {
  8138. "get": {
  8139. "produces": [
  8140. "application/json"
  8141. ],
  8142. "tags": [
  8143. "organization"
  8144. ],
  8145. "summary": "List a team's repos",
  8146. "operationId": "orgListTeamRepos",
  8147. "parameters": [
  8148. {
  8149. "type": "integer",
  8150. "format": "int64",
  8151. "description": "id of the team",
  8152. "name": "id",
  8153. "in": "path",
  8154. "required": true
  8155. },
  8156. {
  8157. "type": "integer",
  8158. "description": "page number of results to return (1-based)",
  8159. "name": "page",
  8160. "in": "query"
  8161. },
  8162. {
  8163. "type": "integer",
  8164. "description": "page size of results, maximum page size is 50",
  8165. "name": "limit",
  8166. "in": "query"
  8167. }
  8168. ],
  8169. "responses": {
  8170. "200": {
  8171. "$ref": "#/responses/RepositoryList"
  8172. }
  8173. }
  8174. }
  8175. },
  8176. "/teams/{id}/repos/{org}/{repo}": {
  8177. "put": {
  8178. "produces": [
  8179. "application/json"
  8180. ],
  8181. "tags": [
  8182. "organization"
  8183. ],
  8184. "summary": "Add a repository to a team",
  8185. "operationId": "orgAddTeamRepository",
  8186. "parameters": [
  8187. {
  8188. "type": "integer",
  8189. "format": "int64",
  8190. "description": "id of the team",
  8191. "name": "id",
  8192. "in": "path",
  8193. "required": true
  8194. },
  8195. {
  8196. "type": "string",
  8197. "description": "organization that owns the repo to add",
  8198. "name": "org",
  8199. "in": "path",
  8200. "required": true
  8201. },
  8202. {
  8203. "type": "string",
  8204. "description": "name of the repo to add",
  8205. "name": "repo",
  8206. "in": "path",
  8207. "required": true
  8208. }
  8209. ],
  8210. "responses": {
  8211. "204": {
  8212. "$ref": "#/responses/empty"
  8213. },
  8214. "403": {
  8215. "$ref": "#/responses/forbidden"
  8216. }
  8217. }
  8218. },
  8219. "delete": {
  8220. "description": "This does not delete the repository, it only removes the repository from the team.",
  8221. "produces": [
  8222. "application/json"
  8223. ],
  8224. "tags": [
  8225. "organization"
  8226. ],
  8227. "summary": "Remove a repository from a team",
  8228. "operationId": "orgRemoveTeamRepository",
  8229. "parameters": [
  8230. {
  8231. "type": "integer",
  8232. "format": "int64",
  8233. "description": "id of the team",
  8234. "name": "id",
  8235. "in": "path",
  8236. "required": true
  8237. },
  8238. {
  8239. "type": "string",
  8240. "description": "organization that owns the repo to remove",
  8241. "name": "org",
  8242. "in": "path",
  8243. "required": true
  8244. },
  8245. {
  8246. "type": "string",
  8247. "description": "name of the repo to remove",
  8248. "name": "repo",
  8249. "in": "path",
  8250. "required": true
  8251. }
  8252. ],
  8253. "responses": {
  8254. "204": {
  8255. "$ref": "#/responses/empty"
  8256. },
  8257. "403": {
  8258. "$ref": "#/responses/forbidden"
  8259. }
  8260. }
  8261. }
  8262. },
  8263. "/topics/search": {
  8264. "get": {
  8265. "produces": [
  8266. "application/json"
  8267. ],
  8268. "tags": [
  8269. "repository"
  8270. ],
  8271. "summary": "search topics via keyword",
  8272. "operationId": "topicSearch",
  8273. "parameters": [
  8274. {
  8275. "type": "string",
  8276. "description": "keywords to search",
  8277. "name": "q",
  8278. "in": "query",
  8279. "required": true
  8280. },
  8281. {
  8282. "type": "integer",
  8283. "description": "page number of results to return (1-based)",
  8284. "name": "page",
  8285. "in": "query"
  8286. },
  8287. {
  8288. "type": "integer",
  8289. "description": "page size of results, maximum page size is 50",
  8290. "name": "limit",
  8291. "in": "query"
  8292. }
  8293. ],
  8294. "responses": {
  8295. "200": {
  8296. "$ref": "#/responses/TopicListResponse"
  8297. },
  8298. "403": {
  8299. "$ref": "#/responses/forbidden"
  8300. }
  8301. }
  8302. }
  8303. },
  8304. "/user": {
  8305. "get": {
  8306. "produces": [
  8307. "application/json"
  8308. ],
  8309. "tags": [
  8310. "user"
  8311. ],
  8312. "summary": "Get the authenticated user",
  8313. "operationId": "userGetCurrent",
  8314. "responses": {
  8315. "200": {
  8316. "$ref": "#/responses/User"
  8317. }
  8318. }
  8319. }
  8320. },
  8321. "/user/applications/oauth2": {
  8322. "get": {
  8323. "produces": [
  8324. "application/json"
  8325. ],
  8326. "tags": [
  8327. "user"
  8328. ],
  8329. "summary": "List the authenticated user's oauth2 applications",
  8330. "operationId": "userGetOauth2Application",
  8331. "parameters": [
  8332. {
  8333. "type": "integer",
  8334. "description": "page number of results to return (1-based)",
  8335. "name": "page",
  8336. "in": "query"
  8337. },
  8338. {
  8339. "type": "integer",
  8340. "description": "page size of results, maximum page size is 50",
  8341. "name": "limit",
  8342. "in": "query"
  8343. }
  8344. ],
  8345. "responses": {
  8346. "200": {
  8347. "$ref": "#/responses/OAuth2ApplicationList"
  8348. }
  8349. }
  8350. },
  8351. "post": {
  8352. "produces": [
  8353. "application/json"
  8354. ],
  8355. "tags": [
  8356. "user"
  8357. ],
  8358. "summary": "creates a new OAuth2 application",
  8359. "operationId": "userCreateOAuth2Application",
  8360. "parameters": [
  8361. {
  8362. "name": "body",
  8363. "in": "body",
  8364. "required": true,
  8365. "schema": {
  8366. "$ref": "#/definitions/CreateOAuth2ApplicationOptions"
  8367. }
  8368. }
  8369. ],
  8370. "responses": {
  8371. "201": {
  8372. "$ref": "#/responses/OAuth2Application"
  8373. }
  8374. }
  8375. }
  8376. },
  8377. "/user/applications/oauth2/{id}": {
  8378. "get": {
  8379. "produces": [
  8380. "application/json"
  8381. ],
  8382. "tags": [
  8383. "user"
  8384. ],
  8385. "summary": "get an OAuth2 Application",
  8386. "operationId": "userGetOAuth2Application",
  8387. "parameters": [
  8388. {
  8389. "type": "integer",
  8390. "format": "int64",
  8391. "description": "Application ID to be found",
  8392. "name": "id",
  8393. "in": "path",
  8394. "required": true
  8395. }
  8396. ],
  8397. "responses": {
  8398. "200": {
  8399. "$ref": "#/responses/OAuth2Application"
  8400. }
  8401. }
  8402. },
  8403. "delete": {
  8404. "produces": [
  8405. "application/json"
  8406. ],
  8407. "tags": [
  8408. "user"
  8409. ],
  8410. "summary": "delete an OAuth2 Application",
  8411. "operationId": "userDeleteOAuth2Application",
  8412. "parameters": [
  8413. {
  8414. "type": "integer",
  8415. "format": "int64",
  8416. "description": "token to be deleted",
  8417. "name": "id",
  8418. "in": "path",
  8419. "required": true
  8420. }
  8421. ],
  8422. "responses": {
  8423. "204": {
  8424. "$ref": "#/responses/empty"
  8425. }
  8426. }
  8427. },
  8428. "patch": {
  8429. "produces": [
  8430. "application/json"
  8431. ],
  8432. "tags": [
  8433. "user"
  8434. ],
  8435. "summary": "update an OAuth2 Application, this includes regenerating the client secret",
  8436. "operationId": "userUpdateOAuth2Application",
  8437. "parameters": [
  8438. {
  8439. "type": "integer",
  8440. "format": "int64",
  8441. "description": "application to be updated",
  8442. "name": "id",
  8443. "in": "path",
  8444. "required": true
  8445. },
  8446. {
  8447. "name": "body",
  8448. "in": "body",
  8449. "required": true,
  8450. "schema": {
  8451. "$ref": "#/definitions/CreateOAuth2ApplicationOptions"
  8452. }
  8453. }
  8454. ],
  8455. "responses": {
  8456. "200": {
  8457. "$ref": "#/responses/OAuth2Application"
  8458. }
  8459. }
  8460. }
  8461. },
  8462. "/user/emails": {
  8463. "get": {
  8464. "produces": [
  8465. "application/json"
  8466. ],
  8467. "tags": [
  8468. "user"
  8469. ],
  8470. "summary": "List the authenticated user's email addresses",
  8471. "operationId": "userListEmails",
  8472. "responses": {
  8473. "200": {
  8474. "$ref": "#/responses/EmailList"
  8475. }
  8476. }
  8477. },
  8478. "post": {
  8479. "produces": [
  8480. "application/json"
  8481. ],
  8482. "tags": [
  8483. "user"
  8484. ],
  8485. "summary": "Add email addresses",
  8486. "operationId": "userAddEmail",
  8487. "parameters": [
  8488. {
  8489. "name": "body",
  8490. "in": "body",
  8491. "schema": {
  8492. "$ref": "#/definitions/CreateEmailOption"
  8493. }
  8494. }
  8495. ],
  8496. "responses": {
  8497. "201": {
  8498. "$ref": "#/responses/EmailList"
  8499. },
  8500. "422": {
  8501. "$ref": "#/responses/validationError"
  8502. }
  8503. }
  8504. },
  8505. "delete": {
  8506. "produces": [
  8507. "application/json"
  8508. ],
  8509. "tags": [
  8510. "user"
  8511. ],
  8512. "summary": "Delete email addresses",
  8513. "operationId": "userDeleteEmail",
  8514. "parameters": [
  8515. {
  8516. "name": "body",
  8517. "in": "body",
  8518. "schema": {
  8519. "$ref": "#/definitions/DeleteEmailOption"
  8520. }
  8521. }
  8522. ],
  8523. "responses": {
  8524. "204": {
  8525. "$ref": "#/responses/empty"
  8526. }
  8527. }
  8528. }
  8529. },
  8530. "/user/followers": {
  8531. "get": {
  8532. "produces": [
  8533. "application/json"
  8534. ],
  8535. "tags": [
  8536. "user"
  8537. ],
  8538. "summary": "List the authenticated user's followers",
  8539. "operationId": "userCurrentListFollowers",
  8540. "parameters": [
  8541. {
  8542. "type": "integer",
  8543. "description": "page number of results to return (1-based)",
  8544. "name": "page",
  8545. "in": "query"
  8546. },
  8547. {
  8548. "type": "integer",
  8549. "description": "page size of results, maximum page size is 50",
  8550. "name": "limit",
  8551. "in": "query"
  8552. }
  8553. ],
  8554. "responses": {
  8555. "200": {
  8556. "$ref": "#/responses/UserList"
  8557. }
  8558. }
  8559. }
  8560. },
  8561. "/user/following": {
  8562. "get": {
  8563. "produces": [
  8564. "application/json"
  8565. ],
  8566. "tags": [
  8567. "user"
  8568. ],
  8569. "summary": "List the users that the authenticated user is following",
  8570. "operationId": "userCurrentListFollowing",
  8571. "parameters": [
  8572. {
  8573. "type": "integer",
  8574. "description": "page number of results to return (1-based)",
  8575. "name": "page",
  8576. "in": "query"
  8577. },
  8578. {
  8579. "type": "integer",
  8580. "description": "page size of results, maximum page size is 50",
  8581. "name": "limit",
  8582. "in": "query"
  8583. }
  8584. ],
  8585. "responses": {
  8586. "200": {
  8587. "$ref": "#/responses/UserList"
  8588. }
  8589. }
  8590. }
  8591. },
  8592. "/user/following/{username}": {
  8593. "get": {
  8594. "tags": [
  8595. "user"
  8596. ],
  8597. "summary": "Check whether a user is followed by the authenticated user",
  8598. "operationId": "userCurrentCheckFollowing",
  8599. "parameters": [
  8600. {
  8601. "type": "string",
  8602. "description": "username of followed user",
  8603. "name": "username",
  8604. "in": "path",
  8605. "required": true
  8606. }
  8607. ],
  8608. "responses": {
  8609. "204": {
  8610. "$ref": "#/responses/empty"
  8611. },
  8612. "404": {
  8613. "$ref": "#/responses/notFound"
  8614. }
  8615. }
  8616. },
  8617. "put": {
  8618. "tags": [
  8619. "user"
  8620. ],
  8621. "summary": "Follow a user",
  8622. "operationId": "userCurrentPutFollow",
  8623. "parameters": [
  8624. {
  8625. "type": "string",
  8626. "description": "username of user to follow",
  8627. "name": "username",
  8628. "in": "path",
  8629. "required": true
  8630. }
  8631. ],
  8632. "responses": {
  8633. "204": {
  8634. "$ref": "#/responses/empty"
  8635. }
  8636. }
  8637. },
  8638. "delete": {
  8639. "tags": [
  8640. "user"
  8641. ],
  8642. "summary": "Unfollow a user",
  8643. "operationId": "userCurrentDeleteFollow",
  8644. "parameters": [
  8645. {
  8646. "type": "string",
  8647. "description": "username of user to unfollow",
  8648. "name": "username",
  8649. "in": "path",
  8650. "required": true
  8651. }
  8652. ],
  8653. "responses": {
  8654. "204": {
  8655. "$ref": "#/responses/empty"
  8656. }
  8657. }
  8658. }
  8659. },
  8660. "/user/gpg_keys": {
  8661. "get": {
  8662. "produces": [
  8663. "application/json"
  8664. ],
  8665. "tags": [
  8666. "user"
  8667. ],
  8668. "summary": "List the authenticated user's GPG keys",
  8669. "operationId": "userCurrentListGPGKeys",
  8670. "parameters": [
  8671. {
  8672. "type": "integer",
  8673. "description": "page number of results to return (1-based)",
  8674. "name": "page",
  8675. "in": "query"
  8676. },
  8677. {
  8678. "type": "integer",
  8679. "description": "page size of results, maximum page size is 50",
  8680. "name": "limit",
  8681. "in": "query"
  8682. }
  8683. ],
  8684. "responses": {
  8685. "200": {
  8686. "$ref": "#/responses/GPGKeyList"
  8687. }
  8688. }
  8689. },
  8690. "post": {
  8691. "consumes": [
  8692. "application/json"
  8693. ],
  8694. "produces": [
  8695. "application/json"
  8696. ],
  8697. "tags": [
  8698. "user"
  8699. ],
  8700. "summary": "Create a GPG key",
  8701. "operationId": "userCurrentPostGPGKey",
  8702. "parameters": [
  8703. {
  8704. "name": "Form",
  8705. "in": "body",
  8706. "schema": {
  8707. "$ref": "#/definitions/CreateGPGKeyOption"
  8708. }
  8709. }
  8710. ],
  8711. "responses": {
  8712. "201": {
  8713. "$ref": "#/responses/GPGKey"
  8714. },
  8715. "422": {
  8716. "$ref": "#/responses/validationError"
  8717. }
  8718. }
  8719. }
  8720. },
  8721. "/user/gpg_keys/{id}": {
  8722. "get": {
  8723. "produces": [
  8724. "application/json"
  8725. ],
  8726. "tags": [
  8727. "user"
  8728. ],
  8729. "summary": "Get a GPG key",
  8730. "operationId": "userCurrentGetGPGKey",
  8731. "parameters": [
  8732. {
  8733. "type": "integer",
  8734. "format": "int64",
  8735. "description": "id of key to get",
  8736. "name": "id",
  8737. "in": "path",
  8738. "required": true
  8739. }
  8740. ],
  8741. "responses": {
  8742. "200": {
  8743. "$ref": "#/responses/GPGKey"
  8744. },
  8745. "404": {
  8746. "$ref": "#/responses/notFound"
  8747. }
  8748. }
  8749. },
  8750. "delete": {
  8751. "produces": [
  8752. "application/json"
  8753. ],
  8754. "tags": [
  8755. "user"
  8756. ],
  8757. "summary": "Remove a GPG key",
  8758. "operationId": "userCurrentDeleteGPGKey",
  8759. "parameters": [
  8760. {
  8761. "type": "integer",
  8762. "format": "int64",
  8763. "description": "id of key to delete",
  8764. "name": "id",
  8765. "in": "path",
  8766. "required": true
  8767. }
  8768. ],
  8769. "responses": {
  8770. "204": {
  8771. "$ref": "#/responses/empty"
  8772. },
  8773. "403": {
  8774. "$ref": "#/responses/forbidden"
  8775. }
  8776. }
  8777. }
  8778. },
  8779. "/user/keys": {
  8780. "get": {
  8781. "produces": [
  8782. "application/json"
  8783. ],
  8784. "tags": [
  8785. "user"
  8786. ],
  8787. "summary": "List the authenticated user's public keys",
  8788. "operationId": "userCurrentListKeys",
  8789. "parameters": [
  8790. {
  8791. "type": "string",
  8792. "description": "fingerprint of the key",
  8793. "name": "fingerprint",
  8794. "in": "query"
  8795. },
  8796. {
  8797. "type": "integer",
  8798. "description": "page number of results to return (1-based)",
  8799. "name": "page",
  8800. "in": "query"
  8801. },
  8802. {
  8803. "type": "integer",
  8804. "description": "page size of results, maximum page size is 50",
  8805. "name": "limit",
  8806. "in": "query"
  8807. }
  8808. ],
  8809. "responses": {
  8810. "200": {
  8811. "$ref": "#/responses/PublicKeyList"
  8812. }
  8813. }
  8814. },
  8815. "post": {
  8816. "consumes": [
  8817. "application/json"
  8818. ],
  8819. "produces": [
  8820. "application/json"
  8821. ],
  8822. "tags": [
  8823. "user"
  8824. ],
  8825. "summary": "Create a public key",
  8826. "operationId": "userCurrentPostKey",
  8827. "parameters": [
  8828. {
  8829. "name": "body",
  8830. "in": "body",
  8831. "schema": {
  8832. "$ref": "#/definitions/CreateKeyOption"
  8833. }
  8834. }
  8835. ],
  8836. "responses": {
  8837. "201": {
  8838. "$ref": "#/responses/PublicKey"
  8839. },
  8840. "422": {
  8841. "$ref": "#/responses/validationError"
  8842. }
  8843. }
  8844. }
  8845. },
  8846. "/user/keys/{id}": {
  8847. "get": {
  8848. "produces": [
  8849. "application/json"
  8850. ],
  8851. "tags": [
  8852. "user"
  8853. ],
  8854. "summary": "Get a public key",
  8855. "operationId": "userCurrentGetKey",
  8856. "parameters": [
  8857. {
  8858. "type": "integer",
  8859. "format": "int64",
  8860. "description": "id of key to get",
  8861. "name": "id",
  8862. "in": "path",
  8863. "required": true
  8864. }
  8865. ],
  8866. "responses": {
  8867. "200": {
  8868. "$ref": "#/responses/PublicKey"
  8869. },
  8870. "404": {
  8871. "$ref": "#/responses/notFound"
  8872. }
  8873. }
  8874. },
  8875. "delete": {
  8876. "produces": [
  8877. "application/json"
  8878. ],
  8879. "tags": [
  8880. "user"
  8881. ],
  8882. "summary": "Delete a public key",
  8883. "operationId": "userCurrentDeleteKey",
  8884. "parameters": [
  8885. {
  8886. "type": "integer",
  8887. "format": "int64",
  8888. "description": "id of key to delete",
  8889. "name": "id",
  8890. "in": "path",
  8891. "required": true
  8892. }
  8893. ],
  8894. "responses": {
  8895. "204": {
  8896. "$ref": "#/responses/empty"
  8897. },
  8898. "403": {
  8899. "$ref": "#/responses/forbidden"
  8900. },
  8901. "404": {
  8902. "$ref": "#/responses/notFound"
  8903. }
  8904. }
  8905. }
  8906. },
  8907. "/user/orgs": {
  8908. "get": {
  8909. "produces": [
  8910. "application/json"
  8911. ],
  8912. "tags": [
  8913. "organization"
  8914. ],
  8915. "summary": "List the current user's organizations",
  8916. "operationId": "orgListCurrentUserOrgs",
  8917. "parameters": [
  8918. {
  8919. "type": "integer",
  8920. "description": "page number of results to return (1-based)",
  8921. "name": "page",
  8922. "in": "query"
  8923. },
  8924. {
  8925. "type": "integer",
  8926. "description": "page size of results, maximum page size is 50",
  8927. "name": "limit",
  8928. "in": "query"
  8929. }
  8930. ],
  8931. "responses": {
  8932. "200": {
  8933. "$ref": "#/responses/OrganizationList"
  8934. }
  8935. }
  8936. }
  8937. },
  8938. "/user/repos": {
  8939. "get": {
  8940. "produces": [
  8941. "application/json"
  8942. ],
  8943. "tags": [
  8944. "user"
  8945. ],
  8946. "summary": "List the repos that the authenticated user owns or has access to",
  8947. "operationId": "userCurrentListRepos",
  8948. "parameters": [
  8949. {
  8950. "type": "integer",
  8951. "description": "page number of results to return (1-based)",
  8952. "name": "page",
  8953. "in": "query"
  8954. },
  8955. {
  8956. "type": "integer",
  8957. "description": "page size of results, maximum page size is 50",
  8958. "name": "limit",
  8959. "in": "query"
  8960. }
  8961. ],
  8962. "responses": {
  8963. "200": {
  8964. "$ref": "#/responses/RepositoryList"
  8965. }
  8966. }
  8967. },
  8968. "post": {
  8969. "consumes": [
  8970. "application/json"
  8971. ],
  8972. "produces": [
  8973. "application/json"
  8974. ],
  8975. "tags": [
  8976. "repository",
  8977. "user"
  8978. ],
  8979. "summary": "Create a repository",
  8980. "operationId": "createCurrentUserRepo",
  8981. "parameters": [
  8982. {
  8983. "name": "body",
  8984. "in": "body",
  8985. "schema": {
  8986. "$ref": "#/definitions/CreateRepoOption"
  8987. }
  8988. }
  8989. ],
  8990. "responses": {
  8991. "201": {
  8992. "$ref": "#/responses/Repository"
  8993. },
  8994. "409": {
  8995. "description": "The repository with the same name already exists."
  8996. },
  8997. "422": {
  8998. "$ref": "#/responses/validationError"
  8999. }
  9000. }
  9001. }
  9002. },
  9003. "/user/starred": {
  9004. "get": {
  9005. "produces": [
  9006. "application/json"
  9007. ],
  9008. "tags": [
  9009. "user"
  9010. ],
  9011. "summary": "The repos that the authenticated user has starred",
  9012. "operationId": "userCurrentListStarred",
  9013. "parameters": [
  9014. {
  9015. "type": "integer",
  9016. "description": "page number of results to return (1-based)",
  9017. "name": "page",
  9018. "in": "query"
  9019. },
  9020. {
  9021. "type": "integer",
  9022. "description": "page size of results, maximum page size is 50",
  9023. "name": "limit",
  9024. "in": "query"
  9025. }
  9026. ],
  9027. "responses": {
  9028. "200": {
  9029. "$ref": "#/responses/RepositoryList"
  9030. }
  9031. }
  9032. }
  9033. },
  9034. "/user/starred/{owner}/{repo}": {
  9035. "get": {
  9036. "tags": [
  9037. "user"
  9038. ],
  9039. "summary": "Whether the authenticated is starring the repo",
  9040. "operationId": "userCurrentCheckStarring",
  9041. "parameters": [
  9042. {
  9043. "type": "string",
  9044. "description": "owner of the repo",
  9045. "name": "owner",
  9046. "in": "path",
  9047. "required": true
  9048. },
  9049. {
  9050. "type": "string",
  9051. "description": "name of the repo",
  9052. "name": "repo",
  9053. "in": "path",
  9054. "required": true
  9055. }
  9056. ],
  9057. "responses": {
  9058. "204": {
  9059. "$ref": "#/responses/empty"
  9060. },
  9061. "404": {
  9062. "$ref": "#/responses/notFound"
  9063. }
  9064. }
  9065. },
  9066. "put": {
  9067. "tags": [
  9068. "user"
  9069. ],
  9070. "summary": "Star the given repo",
  9071. "operationId": "userCurrentPutStar",
  9072. "parameters": [
  9073. {
  9074. "type": "string",
  9075. "description": "owner of the repo to star",
  9076. "name": "owner",
  9077. "in": "path",
  9078. "required": true
  9079. },
  9080. {
  9081. "type": "string",
  9082. "description": "name of the repo to star",
  9083. "name": "repo",
  9084. "in": "path",
  9085. "required": true
  9086. }
  9087. ],
  9088. "responses": {
  9089. "204": {
  9090. "$ref": "#/responses/empty"
  9091. }
  9092. }
  9093. },
  9094. "delete": {
  9095. "tags": [
  9096. "user"
  9097. ],
  9098. "summary": "Unstar the given repo",
  9099. "operationId": "userCurrentDeleteStar",
  9100. "parameters": [
  9101. {
  9102. "type": "string",
  9103. "description": "owner of the repo to unstar",
  9104. "name": "owner",
  9105. "in": "path",
  9106. "required": true
  9107. },
  9108. {
  9109. "type": "string",
  9110. "description": "name of the repo to unstar",
  9111. "name": "repo",
  9112. "in": "path",
  9113. "required": true
  9114. }
  9115. ],
  9116. "responses": {
  9117. "204": {
  9118. "$ref": "#/responses/empty"
  9119. }
  9120. }
  9121. }
  9122. },
  9123. "/user/stopwatches": {
  9124. "get": {
  9125. "consumes": [
  9126. "application/json"
  9127. ],
  9128. "produces": [
  9129. "application/json"
  9130. ],
  9131. "tags": [
  9132. "user"
  9133. ],
  9134. "summary": "Get list of all existing stopwatches",
  9135. "operationId": "userGetStopWatches",
  9136. "parameters": [
  9137. {
  9138. "type": "integer",
  9139. "description": "page number of results to return (1-based)",
  9140. "name": "page",
  9141. "in": "query"
  9142. },
  9143. {
  9144. "type": "integer",
  9145. "description": "page size of results, maximum page size is 50",
  9146. "name": "limit",
  9147. "in": "query"
  9148. }
  9149. ],
  9150. "responses": {
  9151. "200": {
  9152. "$ref": "#/responses/StopWatchList"
  9153. }
  9154. }
  9155. }
  9156. },
  9157. "/user/subscriptions": {
  9158. "get": {
  9159. "produces": [
  9160. "application/json"
  9161. ],
  9162. "tags": [
  9163. "user"
  9164. ],
  9165. "summary": "List repositories watched by the authenticated user",
  9166. "operationId": "userCurrentListSubscriptions",
  9167. "parameters": [
  9168. {
  9169. "type": "integer",
  9170. "description": "page number of results to return (1-based)",
  9171. "name": "page",
  9172. "in": "query"
  9173. },
  9174. {
  9175. "type": "integer",
  9176. "description": "page size of results, maximum page size is 50",
  9177. "name": "limit",
  9178. "in": "query"
  9179. }
  9180. ],
  9181. "responses": {
  9182. "200": {
  9183. "$ref": "#/responses/RepositoryList"
  9184. }
  9185. }
  9186. }
  9187. },
  9188. "/user/teams": {
  9189. "get": {
  9190. "produces": [
  9191. "application/json"
  9192. ],
  9193. "tags": [
  9194. "user"
  9195. ],
  9196. "summary": "List all the teams a user belongs to",
  9197. "operationId": "userListTeams",
  9198. "parameters": [
  9199. {
  9200. "type": "integer",
  9201. "description": "page number of results to return (1-based)",
  9202. "name": "page",
  9203. "in": "query"
  9204. },
  9205. {
  9206. "type": "integer",
  9207. "description": "page size of results, maximum page size is 50",
  9208. "name": "limit",
  9209. "in": "query"
  9210. }
  9211. ],
  9212. "responses": {
  9213. "200": {
  9214. "$ref": "#/responses/TeamList"
  9215. }
  9216. }
  9217. }
  9218. },
  9219. "/user/times": {
  9220. "get": {
  9221. "produces": [
  9222. "application/json"
  9223. ],
  9224. "tags": [
  9225. "user"
  9226. ],
  9227. "summary": "List the current user's tracked times",
  9228. "operationId": "userCurrentTrackedTimes",
  9229. "parameters": [
  9230. {
  9231. "type": "string",
  9232. "format": "date-time",
  9233. "description": "Only show times updated after the given time. This is a timestamp in RFC 3339 format",
  9234. "name": "since",
  9235. "in": "query"
  9236. },
  9237. {
  9238. "type": "string",
  9239. "format": "date-time",
  9240. "description": "Only show times updated before the given time. This is a timestamp in RFC 3339 format",
  9241. "name": "before",
  9242. "in": "query"
  9243. }
  9244. ],
  9245. "responses": {
  9246. "200": {
  9247. "$ref": "#/responses/TrackedTimeList"
  9248. }
  9249. }
  9250. }
  9251. },
  9252. "/users/search": {
  9253. "get": {
  9254. "produces": [
  9255. "application/json"
  9256. ],
  9257. "tags": [
  9258. "user"
  9259. ],
  9260. "summary": "Search for users",
  9261. "operationId": "userSearch",
  9262. "parameters": [
  9263. {
  9264. "type": "string",
  9265. "description": "keyword",
  9266. "name": "q",
  9267. "in": "query"
  9268. },
  9269. {
  9270. "type": "integer",
  9271. "format": "int64",
  9272. "description": "ID of the user to search for",
  9273. "name": "uid",
  9274. "in": "query"
  9275. },
  9276. {
  9277. "type": "integer",
  9278. "description": "page number of results to return (1-based)",
  9279. "name": "page",
  9280. "in": "query"
  9281. },
  9282. {
  9283. "type": "integer",
  9284. "description": "page size of results, maximum page size is 50",
  9285. "name": "limit",
  9286. "in": "query"
  9287. }
  9288. ],
  9289. "responses": {
  9290. "200": {
  9291. "description": "SearchResults of a successful search",
  9292. "schema": {
  9293. "type": "object",
  9294. "properties": {
  9295. "data": {
  9296. "type": "array",
  9297. "items": {
  9298. "$ref": "#/definitions/User"
  9299. }
  9300. },
  9301. "ok": {
  9302. "type": "boolean"
  9303. }
  9304. }
  9305. }
  9306. }
  9307. }
  9308. }
  9309. },
  9310. "/users/{follower}/following/{followee}": {
  9311. "get": {
  9312. "tags": [
  9313. "user"
  9314. ],
  9315. "summary": "Check if one user is following another user",
  9316. "operationId": "userCheckFollowing",
  9317. "parameters": [
  9318. {
  9319. "type": "string",
  9320. "description": "username of following user",
  9321. "name": "follower",
  9322. "in": "path",
  9323. "required": true
  9324. },
  9325. {
  9326. "type": "string",
  9327. "description": "username of followed user",
  9328. "name": "followee",
  9329. "in": "path",
  9330. "required": true
  9331. }
  9332. ],
  9333. "responses": {
  9334. "204": {
  9335. "$ref": "#/responses/empty"
  9336. },
  9337. "404": {
  9338. "$ref": "#/responses/notFound"
  9339. }
  9340. }
  9341. }
  9342. },
  9343. "/users/{username}": {
  9344. "get": {
  9345. "produces": [
  9346. "application/json"
  9347. ],
  9348. "tags": [
  9349. "user"
  9350. ],
  9351. "summary": "Get a user",
  9352. "operationId": "userGet",
  9353. "parameters": [
  9354. {
  9355. "type": "string",
  9356. "description": "username of user to get",
  9357. "name": "username",
  9358. "in": "path",
  9359. "required": true
  9360. }
  9361. ],
  9362. "responses": {
  9363. "200": {
  9364. "$ref": "#/responses/User"
  9365. },
  9366. "404": {
  9367. "$ref": "#/responses/notFound"
  9368. }
  9369. }
  9370. }
  9371. },
  9372. "/users/{username}/followers": {
  9373. "get": {
  9374. "produces": [
  9375. "application/json"
  9376. ],
  9377. "tags": [
  9378. "user"
  9379. ],
  9380. "summary": "List the given user's followers",
  9381. "operationId": "userListFollowers",
  9382. "parameters": [
  9383. {
  9384. "type": "string",
  9385. "description": "username of user",
  9386. "name": "username",
  9387. "in": "path",
  9388. "required": true
  9389. },
  9390. {
  9391. "type": "integer",
  9392. "description": "page number of results to return (1-based)",
  9393. "name": "page",
  9394. "in": "query"
  9395. },
  9396. {
  9397. "type": "integer",
  9398. "description": "page size of results, maximum page size is 50",
  9399. "name": "limit",
  9400. "in": "query"
  9401. }
  9402. ],
  9403. "responses": {
  9404. "200": {
  9405. "$ref": "#/responses/UserList"
  9406. }
  9407. }
  9408. }
  9409. },
  9410. "/users/{username}/following": {
  9411. "get": {
  9412. "produces": [
  9413. "application/json"
  9414. ],
  9415. "tags": [
  9416. "user"
  9417. ],
  9418. "summary": "List the users that the given user is following",
  9419. "operationId": "userListFollowing",
  9420. "parameters": [
  9421. {
  9422. "type": "string",
  9423. "description": "username of user",
  9424. "name": "username",
  9425. "in": "path",
  9426. "required": true
  9427. },
  9428. {
  9429. "type": "integer",
  9430. "description": "page number of results to return (1-based)",
  9431. "name": "page",
  9432. "in": "query"
  9433. },
  9434. {
  9435. "type": "integer",
  9436. "description": "page size of results, maximum page size is 50",
  9437. "name": "limit",
  9438. "in": "query"
  9439. }
  9440. ],
  9441. "responses": {
  9442. "200": {
  9443. "$ref": "#/responses/UserList"
  9444. }
  9445. }
  9446. }
  9447. },
  9448. "/users/{username}/gpg_keys": {
  9449. "get": {
  9450. "produces": [
  9451. "application/json"
  9452. ],
  9453. "tags": [
  9454. "user"
  9455. ],
  9456. "summary": "List the given user's GPG keys",
  9457. "operationId": "userListGPGKeys",
  9458. "parameters": [
  9459. {
  9460. "type": "string",
  9461. "description": "username of user",
  9462. "name": "username",
  9463. "in": "path",
  9464. "required": true
  9465. },
  9466. {
  9467. "type": "integer",
  9468. "description": "page number of results to return (1-based)",
  9469. "name": "page",
  9470. "in": "query"
  9471. },
  9472. {
  9473. "type": "integer",
  9474. "description": "page size of results, maximum page size is 50",
  9475. "name": "limit",
  9476. "in": "query"
  9477. }
  9478. ],
  9479. "responses": {
  9480. "200": {
  9481. "$ref": "#/responses/GPGKeyList"
  9482. }
  9483. }
  9484. }
  9485. },
  9486. "/users/{username}/heatmap": {
  9487. "get": {
  9488. "produces": [
  9489. "application/json"
  9490. ],
  9491. "tags": [
  9492. "user"
  9493. ],
  9494. "summary": "Get a user's heatmap",
  9495. "operationId": "userGetHeatmapData",
  9496. "parameters": [
  9497. {
  9498. "type": "string",
  9499. "description": "username of user to get",
  9500. "name": "username",
  9501. "in": "path",
  9502. "required": true
  9503. }
  9504. ],
  9505. "responses": {
  9506. "200": {
  9507. "$ref": "#/responses/UserHeatmapData"
  9508. },
  9509. "404": {
  9510. "$ref": "#/responses/notFound"
  9511. }
  9512. }
  9513. }
  9514. },
  9515. "/users/{username}/keys": {
  9516. "get": {
  9517. "produces": [
  9518. "application/json"
  9519. ],
  9520. "tags": [
  9521. "user"
  9522. ],
  9523. "summary": "List the given user's public keys",
  9524. "operationId": "userListKeys",
  9525. "parameters": [
  9526. {
  9527. "type": "string",
  9528. "description": "username of user",
  9529. "name": "username",
  9530. "in": "path",
  9531. "required": true
  9532. },
  9533. {
  9534. "type": "string",
  9535. "description": "fingerprint of the key",
  9536. "name": "fingerprint",
  9537. "in": "query"
  9538. },
  9539. {
  9540. "type": "integer",
  9541. "description": "page number of results to return (1-based)",
  9542. "name": "page",
  9543. "in": "query"
  9544. },
  9545. {
  9546. "type": "integer",
  9547. "description": "page size of results, maximum page size is 50",
  9548. "name": "limit",
  9549. "in": "query"
  9550. }
  9551. ],
  9552. "responses": {
  9553. "200": {
  9554. "$ref": "#/responses/PublicKeyList"
  9555. }
  9556. }
  9557. }
  9558. },
  9559. "/users/{username}/orgs": {
  9560. "get": {
  9561. "produces": [
  9562. "application/json"
  9563. ],
  9564. "tags": [
  9565. "organization"
  9566. ],
  9567. "summary": "List a user's organizations",
  9568. "operationId": "orgListUserOrgs",
  9569. "parameters": [
  9570. {
  9571. "type": "string",
  9572. "description": "username of user",
  9573. "name": "username",
  9574. "in": "path",
  9575. "required": true
  9576. },
  9577. {
  9578. "type": "integer",
  9579. "description": "page number of results to return (1-based)",
  9580. "name": "page",
  9581. "in": "query"
  9582. },
  9583. {
  9584. "type": "integer",
  9585. "description": "page size of results, maximum page size is 50",
  9586. "name": "limit",
  9587. "in": "query"
  9588. }
  9589. ],
  9590. "responses": {
  9591. "200": {
  9592. "$ref": "#/responses/OrganizationList"
  9593. }
  9594. }
  9595. }
  9596. },
  9597. "/users/{username}/repos": {
  9598. "get": {
  9599. "produces": [
  9600. "application/json"
  9601. ],
  9602. "tags": [
  9603. "user"
  9604. ],
  9605. "summary": "List the repos owned by the given user",
  9606. "operationId": "userListRepos",
  9607. "parameters": [
  9608. {
  9609. "type": "string",
  9610. "description": "username of user",
  9611. "name": "username",
  9612. "in": "path",
  9613. "required": true
  9614. },
  9615. {
  9616. "type": "integer",
  9617. "description": "page number of results to return (1-based)",
  9618. "name": "page",
  9619. "in": "query"
  9620. },
  9621. {
  9622. "type": "integer",
  9623. "description": "page size of results, maximum page size is 50",
  9624. "name": "limit",
  9625. "in": "query"
  9626. }
  9627. ],
  9628. "responses": {
  9629. "200": {
  9630. "$ref": "#/responses/RepositoryList"
  9631. }
  9632. }
  9633. }
  9634. },
  9635. "/users/{username}/starred": {
  9636. "get": {
  9637. "produces": [
  9638. "application/json"
  9639. ],
  9640. "tags": [
  9641. "user"
  9642. ],
  9643. "summary": "The repos that the given user has starred",
  9644. "operationId": "userListStarred",
  9645. "parameters": [
  9646. {
  9647. "type": "string",
  9648. "description": "username of user",
  9649. "name": "username",
  9650. "in": "path",
  9651. "required": true
  9652. },
  9653. {
  9654. "type": "integer",
  9655. "description": "page number of results to return (1-based)",
  9656. "name": "page",
  9657. "in": "query"
  9658. },
  9659. {
  9660. "type": "integer",
  9661. "description": "page size of results, maximum page size is 50",
  9662. "name": "limit",
  9663. "in": "query"
  9664. }
  9665. ],
  9666. "responses": {
  9667. "200": {
  9668. "$ref": "#/responses/RepositoryList"
  9669. }
  9670. }
  9671. }
  9672. },
  9673. "/users/{username}/subscriptions": {
  9674. "get": {
  9675. "produces": [
  9676. "application/json"
  9677. ],
  9678. "tags": [
  9679. "user"
  9680. ],
  9681. "summary": "List the repositories watched by a user",
  9682. "operationId": "userListSubscriptions",
  9683. "parameters": [
  9684. {
  9685. "type": "string",
  9686. "description": "username of the user",
  9687. "name": "username",
  9688. "in": "path",
  9689. "required": true
  9690. },
  9691. {
  9692. "type": "integer",
  9693. "description": "page number of results to return (1-based)",
  9694. "name": "page",
  9695. "in": "query"
  9696. },
  9697. {
  9698. "type": "integer",
  9699. "description": "page size of results, maximum page size is 50",
  9700. "name": "limit",
  9701. "in": "query"
  9702. }
  9703. ],
  9704. "responses": {
  9705. "200": {
  9706. "$ref": "#/responses/RepositoryList"
  9707. }
  9708. }
  9709. }
  9710. },
  9711. "/users/{username}/tokens": {
  9712. "get": {
  9713. "produces": [
  9714. "application/json"
  9715. ],
  9716. "tags": [
  9717. "user"
  9718. ],
  9719. "summary": "List the authenticated user's access tokens",
  9720. "operationId": "userGetTokens",
  9721. "parameters": [
  9722. {
  9723. "type": "string",
  9724. "description": "username of user",
  9725. "name": "username",
  9726. "in": "path",
  9727. "required": true
  9728. },
  9729. {
  9730. "type": "integer",
  9731. "description": "page number of results to return (1-based)",
  9732. "name": "page",
  9733. "in": "query"
  9734. },
  9735. {
  9736. "type": "integer",
  9737. "description": "page size of results, maximum page size is 50",
  9738. "name": "limit",
  9739. "in": "query"
  9740. }
  9741. ],
  9742. "responses": {
  9743. "200": {
  9744. "$ref": "#/responses/AccessTokenList"
  9745. }
  9746. }
  9747. },
  9748. "post": {
  9749. "consumes": [
  9750. "application/json"
  9751. ],
  9752. "produces": [
  9753. "application/json"
  9754. ],
  9755. "tags": [
  9756. "user"
  9757. ],
  9758. "summary": "Create an access token",
  9759. "operationId": "userCreateToken",
  9760. "parameters": [
  9761. {
  9762. "type": "string",
  9763. "x-go-name": "Name",
  9764. "description": "username of user",
  9765. "name": "username",
  9766. "in": "path",
  9767. "required": true
  9768. },
  9769. {
  9770. "name": "accessToken",
  9771. "in": "body",
  9772. "schema": {
  9773. "type": "object",
  9774. "required": [
  9775. "name"
  9776. ],
  9777. "properties": {
  9778. "name": {
  9779. "type": "string"
  9780. }
  9781. }
  9782. }
  9783. }
  9784. ],
  9785. "responses": {
  9786. "200": {
  9787. "$ref": "#/responses/AccessToken"
  9788. }
  9789. }
  9790. }
  9791. },
  9792. "/users/{username}/tokens/{token}": {
  9793. "delete": {
  9794. "produces": [
  9795. "application/json"
  9796. ],
  9797. "tags": [
  9798. "user"
  9799. ],
  9800. "summary": "delete an access token",
  9801. "operationId": "userDeleteAccessToken",
  9802. "parameters": [
  9803. {
  9804. "type": "string",
  9805. "description": "username of user",
  9806. "name": "username",
  9807. "in": "path",
  9808. "required": true
  9809. },
  9810. {
  9811. "type": "integer",
  9812. "format": "int64",
  9813. "description": "token to be deleted",
  9814. "name": "token",
  9815. "in": "path",
  9816. "required": true
  9817. }
  9818. ],
  9819. "responses": {
  9820. "204": {
  9821. "$ref": "#/responses/empty"
  9822. }
  9823. }
  9824. }
  9825. },
  9826. "/version": {
  9827. "get": {
  9828. "produces": [
  9829. "application/json"
  9830. ],
  9831. "tags": [
  9832. "miscellaneous"
  9833. ],
  9834. "summary": "Returns the version of the Gitea application",
  9835. "operationId": "getVersion",
  9836. "responses": {
  9837. "200": {
  9838. "$ref": "#/responses/ServerVersion"
  9839. }
  9840. }
  9841. }
  9842. }
  9843. },
  9844. "definitions": {
  9845. "APIError": {
  9846. "description": "APIError is an api error with a message",
  9847. "type": "object",
  9848. "properties": {
  9849. "message": {
  9850. "type": "string",
  9851. "x-go-name": "Message"
  9852. },
  9853. "url": {
  9854. "type": "string",
  9855. "x-go-name": "URL"
  9856. }
  9857. },
  9858. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9859. },
  9860. "AccessToken": {
  9861. "type": "object",
  9862. "title": "AccessToken represents an API access token.",
  9863. "properties": {
  9864. "id": {
  9865. "type": "integer",
  9866. "format": "int64",
  9867. "x-go-name": "ID"
  9868. },
  9869. "name": {
  9870. "type": "string",
  9871. "x-go-name": "Name"
  9872. },
  9873. "sha1": {
  9874. "type": "string",
  9875. "x-go-name": "Token"
  9876. },
  9877. "token_last_eight": {
  9878. "type": "string",
  9879. "x-go-name": "TokenLastEight"
  9880. }
  9881. },
  9882. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9883. },
  9884. "AddCollaboratorOption": {
  9885. "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository",
  9886. "type": "object",
  9887. "properties": {
  9888. "permission": {
  9889. "type": "string",
  9890. "x-go-name": "Permission"
  9891. }
  9892. },
  9893. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9894. },
  9895. "AddTimeOption": {
  9896. "description": "AddTimeOption options for adding time to an issue",
  9897. "type": "object",
  9898. "required": [
  9899. "time"
  9900. ],
  9901. "properties": {
  9902. "created": {
  9903. "type": "string",
  9904. "format": "date-time",
  9905. "x-go-name": "Created"
  9906. },
  9907. "time": {
  9908. "description": "time in seconds",
  9909. "type": "integer",
  9910. "format": "int64",
  9911. "x-go-name": "Time"
  9912. },
  9913. "user_name": {
  9914. "description": "User who spent the time (optional)",
  9915. "type": "string",
  9916. "x-go-name": "User"
  9917. }
  9918. },
  9919. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9920. },
  9921. "AnnotatedTag": {
  9922. "description": "AnnotatedTag represents an annotated tag",
  9923. "type": "object",
  9924. "properties": {
  9925. "message": {
  9926. "type": "string",
  9927. "x-go-name": "Message"
  9928. },
  9929. "object": {
  9930. "$ref": "#/definitions/AnnotatedTagObject"
  9931. },
  9932. "sha": {
  9933. "type": "string",
  9934. "x-go-name": "SHA"
  9935. },
  9936. "tag": {
  9937. "type": "string",
  9938. "x-go-name": "Tag"
  9939. },
  9940. "tagger": {
  9941. "$ref": "#/definitions/CommitUser"
  9942. },
  9943. "url": {
  9944. "type": "string",
  9945. "x-go-name": "URL"
  9946. },
  9947. "verification": {
  9948. "$ref": "#/definitions/PayloadCommitVerification"
  9949. }
  9950. },
  9951. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9952. },
  9953. "AnnotatedTagObject": {
  9954. "description": "AnnotatedTagObject contains meta information of the tag object",
  9955. "type": "object",
  9956. "properties": {
  9957. "sha": {
  9958. "type": "string",
  9959. "x-go-name": "SHA"
  9960. },
  9961. "type": {
  9962. "type": "string",
  9963. "x-go-name": "Type"
  9964. },
  9965. "url": {
  9966. "type": "string",
  9967. "x-go-name": "URL"
  9968. }
  9969. },
  9970. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9971. },
  9972. "Attachment": {
  9973. "description": "Attachment a generic attachment",
  9974. "type": "object",
  9975. "properties": {
  9976. "browser_download_url": {
  9977. "type": "string",
  9978. "x-go-name": "DownloadURL"
  9979. },
  9980. "created_at": {
  9981. "type": "string",
  9982. "format": "date-time",
  9983. "x-go-name": "Created"
  9984. },
  9985. "download_count": {
  9986. "type": "integer",
  9987. "format": "int64",
  9988. "x-go-name": "DownloadCount"
  9989. },
  9990. "id": {
  9991. "type": "integer",
  9992. "format": "int64",
  9993. "x-go-name": "ID"
  9994. },
  9995. "name": {
  9996. "type": "string",
  9997. "x-go-name": "Name"
  9998. },
  9999. "size": {
  10000. "type": "integer",
  10001. "format": "int64",
  10002. "x-go-name": "Size"
  10003. },
  10004. "uuid": {
  10005. "type": "string",
  10006. "x-go-name": "UUID"
  10007. }
  10008. },
  10009. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10010. },
  10011. "Branch": {
  10012. "description": "Branch represents a repository branch",
  10013. "type": "object",
  10014. "properties": {
  10015. "commit": {
  10016. "$ref": "#/definitions/PayloadCommit"
  10017. },
  10018. "effective_branch_protection_name": {
  10019. "type": "string",
  10020. "x-go-name": "EffectiveBranchProtectionName"
  10021. },
  10022. "enable_status_check": {
  10023. "type": "boolean",
  10024. "x-go-name": "EnableStatusCheck"
  10025. },
  10026. "name": {
  10027. "type": "string",
  10028. "x-go-name": "Name"
  10029. },
  10030. "protected": {
  10031. "type": "boolean",
  10032. "x-go-name": "Protected"
  10033. },
  10034. "required_approvals": {
  10035. "type": "integer",
  10036. "format": "int64",
  10037. "x-go-name": "RequiredApprovals"
  10038. },
  10039. "status_check_contexts": {
  10040. "type": "array",
  10041. "items": {
  10042. "type": "string"
  10043. },
  10044. "x-go-name": "StatusCheckContexts"
  10045. },
  10046. "user_can_merge": {
  10047. "type": "boolean",
  10048. "x-go-name": "UserCanMerge"
  10049. },
  10050. "user_can_push": {
  10051. "type": "boolean",
  10052. "x-go-name": "UserCanPush"
  10053. }
  10054. },
  10055. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10056. },
  10057. "BranchProtection": {
  10058. "description": "BranchProtection represents a branch protection for a repository",
  10059. "type": "object",
  10060. "properties": {
  10061. "approvals_whitelist_teams": {
  10062. "type": "array",
  10063. "items": {
  10064. "type": "string"
  10065. },
  10066. "x-go-name": "ApprovalsWhitelistTeams"
  10067. },
  10068. "approvals_whitelist_username": {
  10069. "type": "array",
  10070. "items": {
  10071. "type": "string"
  10072. },
  10073. "x-go-name": "ApprovalsWhitelistUsernames"
  10074. },
  10075. "block_on_outdated_branch": {
  10076. "type": "boolean",
  10077. "x-go-name": "BlockOnOutdatedBranch"
  10078. },
  10079. "block_on_rejected_reviews": {
  10080. "type": "boolean",
  10081. "x-go-name": "BlockOnRejectedReviews"
  10082. },
  10083. "branch_name": {
  10084. "type": "string",
  10085. "x-go-name": "BranchName"
  10086. },
  10087. "created_at": {
  10088. "type": "string",
  10089. "format": "date-time",
  10090. "x-go-name": "Created"
  10091. },
  10092. "dismiss_stale_approvals": {
  10093. "type": "boolean",
  10094. "x-go-name": "DismissStaleApprovals"
  10095. },
  10096. "enable_approvals_whitelist": {
  10097. "type": "boolean",
  10098. "x-go-name": "EnableApprovalsWhitelist"
  10099. },
  10100. "enable_merge_whitelist": {
  10101. "type": "boolean",
  10102. "x-go-name": "EnableMergeWhitelist"
  10103. },
  10104. "enable_push": {
  10105. "type": "boolean",
  10106. "x-go-name": "EnablePush"
  10107. },
  10108. "enable_push_whitelist": {
  10109. "type": "boolean",
  10110. "x-go-name": "EnablePushWhitelist"
  10111. },
  10112. "enable_status_check": {
  10113. "type": "boolean",
  10114. "x-go-name": "EnableStatusCheck"
  10115. },
  10116. "merge_whitelist_teams": {
  10117. "type": "array",
  10118. "items": {
  10119. "type": "string"
  10120. },
  10121. "x-go-name": "MergeWhitelistTeams"
  10122. },
  10123. "merge_whitelist_usernames": {
  10124. "type": "array",
  10125. "items": {
  10126. "type": "string"
  10127. },
  10128. "x-go-name": "MergeWhitelistUsernames"
  10129. },
  10130. "protected_file_patterns": {
  10131. "type": "string",
  10132. "x-go-name": "ProtectedFilePatterns"
  10133. },
  10134. "push_whitelist_deploy_keys": {
  10135. "type": "boolean",
  10136. "x-go-name": "PushWhitelistDeployKeys"
  10137. },
  10138. "push_whitelist_teams": {
  10139. "type": "array",
  10140. "items": {
  10141. "type": "string"
  10142. },
  10143. "x-go-name": "PushWhitelistTeams"
  10144. },
  10145. "push_whitelist_usernames": {
  10146. "type": "array",
  10147. "items": {
  10148. "type": "string"
  10149. },
  10150. "x-go-name": "PushWhitelistUsernames"
  10151. },
  10152. "require_signed_commits": {
  10153. "type": "boolean",
  10154. "x-go-name": "RequireSignedCommits"
  10155. },
  10156. "required_approvals": {
  10157. "type": "integer",
  10158. "format": "int64",
  10159. "x-go-name": "RequiredApprovals"
  10160. },
  10161. "status_check_contexts": {
  10162. "type": "array",
  10163. "items": {
  10164. "type": "string"
  10165. },
  10166. "x-go-name": "StatusCheckContexts"
  10167. },
  10168. "updated_at": {
  10169. "type": "string",
  10170. "format": "date-time",
  10171. "x-go-name": "Updated"
  10172. }
  10173. },
  10174. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10175. },
  10176. "Comment": {
  10177. "description": "Comment represents a comment on a commit or issue",
  10178. "type": "object",
  10179. "properties": {
  10180. "body": {
  10181. "type": "string",
  10182. "x-go-name": "Body"
  10183. },
  10184. "created_at": {
  10185. "type": "string",
  10186. "format": "date-time",
  10187. "x-go-name": "Created"
  10188. },
  10189. "html_url": {
  10190. "type": "string",
  10191. "x-go-name": "HTMLURL"
  10192. },
  10193. "id": {
  10194. "type": "integer",
  10195. "format": "int64",
  10196. "x-go-name": "ID"
  10197. },
  10198. "issue_url": {
  10199. "type": "string",
  10200. "x-go-name": "IssueURL"
  10201. },
  10202. "original_author": {
  10203. "type": "string",
  10204. "x-go-name": "OriginalAuthor"
  10205. },
  10206. "original_author_id": {
  10207. "type": "integer",
  10208. "format": "int64",
  10209. "x-go-name": "OriginalAuthorID"
  10210. },
  10211. "pull_request_url": {
  10212. "type": "string",
  10213. "x-go-name": "PRURL"
  10214. },
  10215. "updated_at": {
  10216. "type": "string",
  10217. "format": "date-time",
  10218. "x-go-name": "Updated"
  10219. },
  10220. "user": {
  10221. "$ref": "#/definitions/User"
  10222. }
  10223. },
  10224. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10225. },
  10226. "Commit": {
  10227. "type": "object",
  10228. "title": "Commit contains information generated from a Git commit.",
  10229. "properties": {
  10230. "author": {
  10231. "$ref": "#/definitions/User"
  10232. },
  10233. "commit": {
  10234. "$ref": "#/definitions/RepoCommit"
  10235. },
  10236. "committer": {
  10237. "$ref": "#/definitions/User"
  10238. },
  10239. "html_url": {
  10240. "type": "string",
  10241. "x-go-name": "HTMLURL"
  10242. },
  10243. "parents": {
  10244. "type": "array",
  10245. "items": {
  10246. "$ref": "#/definitions/CommitMeta"
  10247. },
  10248. "x-go-name": "Parents"
  10249. },
  10250. "sha": {
  10251. "type": "string",
  10252. "x-go-name": "SHA"
  10253. },
  10254. "url": {
  10255. "type": "string",
  10256. "x-go-name": "URL"
  10257. }
  10258. },
  10259. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10260. },
  10261. "CommitDateOptions": {
  10262. "description": "CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE",
  10263. "type": "object",
  10264. "properties": {
  10265. "author": {
  10266. "type": "string",
  10267. "format": "date-time",
  10268. "x-go-name": "Author"
  10269. },
  10270. "committer": {
  10271. "type": "string",
  10272. "format": "date-time",
  10273. "x-go-name": "Committer"
  10274. }
  10275. },
  10276. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10277. },
  10278. "CommitMeta": {
  10279. "type": "object",
  10280. "title": "CommitMeta contains meta information of a commit in terms of API.",
  10281. "properties": {
  10282. "sha": {
  10283. "type": "string",
  10284. "x-go-name": "SHA"
  10285. },
  10286. "url": {
  10287. "type": "string",
  10288. "x-go-name": "URL"
  10289. }
  10290. },
  10291. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10292. },
  10293. "CommitUser": {
  10294. "type": "object",
  10295. "title": "CommitUser contains information of a user in the context of a commit.",
  10296. "properties": {
  10297. "date": {
  10298. "type": "string",
  10299. "x-go-name": "Date"
  10300. },
  10301. "email": {
  10302. "type": "string",
  10303. "format": "email",
  10304. "x-go-name": "Email"
  10305. },
  10306. "name": {
  10307. "type": "string",
  10308. "x-go-name": "Name"
  10309. }
  10310. },
  10311. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10312. },
  10313. "ContentsResponse": {
  10314. "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content",
  10315. "type": "object",
  10316. "properties": {
  10317. "_links": {
  10318. "$ref": "#/definitions/FileLinksResponse"
  10319. },
  10320. "content": {
  10321. "description": "`content` is populated when `type` is `file`, otherwise null",
  10322. "type": "string",
  10323. "x-go-name": "Content"
  10324. },
  10325. "download_url": {
  10326. "type": "string",
  10327. "x-go-name": "DownloadURL"
  10328. },
  10329. "encoding": {
  10330. "description": "`encoding` is populated when `type` is `file`, otherwise null",
  10331. "type": "string",
  10332. "x-go-name": "Encoding"
  10333. },
  10334. "git_url": {
  10335. "type": "string",
  10336. "x-go-name": "GitURL"
  10337. },
  10338. "html_url": {
  10339. "type": "string",
  10340. "x-go-name": "HTMLURL"
  10341. },
  10342. "name": {
  10343. "type": "string",
  10344. "x-go-name": "Name"
  10345. },
  10346. "path": {
  10347. "type": "string",
  10348. "x-go-name": "Path"
  10349. },
  10350. "sha": {
  10351. "type": "string",
  10352. "x-go-name": "SHA"
  10353. },
  10354. "size": {
  10355. "type": "integer",
  10356. "format": "int64",
  10357. "x-go-name": "Size"
  10358. },
  10359. "submodule_git_url": {
  10360. "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null",
  10361. "type": "string",
  10362. "x-go-name": "SubmoduleGitURL"
  10363. },
  10364. "target": {
  10365. "description": "`target` is populated when `type` is `symlink`, otherwise null",
  10366. "type": "string",
  10367. "x-go-name": "Target"
  10368. },
  10369. "type": {
  10370. "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`",
  10371. "type": "string",
  10372. "x-go-name": "Type"
  10373. },
  10374. "url": {
  10375. "type": "string",
  10376. "x-go-name": "URL"
  10377. }
  10378. },
  10379. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10380. },
  10381. "CreateBranchProtectionOption": {
  10382. "description": "CreateBranchProtectionOption options for creating a branch protection",
  10383. "type": "object",
  10384. "properties": {
  10385. "approvals_whitelist_teams": {
  10386. "type": "array",
  10387. "items": {
  10388. "type": "string"
  10389. },
  10390. "x-go-name": "ApprovalsWhitelistTeams"
  10391. },
  10392. "approvals_whitelist_username": {
  10393. "type": "array",
  10394. "items": {
  10395. "type": "string"
  10396. },
  10397. "x-go-name": "ApprovalsWhitelistUsernames"
  10398. },
  10399. "block_on_outdated_branch": {
  10400. "type": "boolean",
  10401. "x-go-name": "BlockOnOutdatedBranch"
  10402. },
  10403. "block_on_rejected_reviews": {
  10404. "type": "boolean",
  10405. "x-go-name": "BlockOnRejectedReviews"
  10406. },
  10407. "branch_name": {
  10408. "type": "string",
  10409. "x-go-name": "BranchName"
  10410. },
  10411. "dismiss_stale_approvals": {
  10412. "type": "boolean",
  10413. "x-go-name": "DismissStaleApprovals"
  10414. },
  10415. "enable_approvals_whitelist": {
  10416. "type": "boolean",
  10417. "x-go-name": "EnableApprovalsWhitelist"
  10418. },
  10419. "enable_merge_whitelist": {
  10420. "type": "boolean",
  10421. "x-go-name": "EnableMergeWhitelist"
  10422. },
  10423. "enable_push": {
  10424. "type": "boolean",
  10425. "x-go-name": "EnablePush"
  10426. },
  10427. "enable_push_whitelist": {
  10428. "type": "boolean",
  10429. "x-go-name": "EnablePushWhitelist"
  10430. },
  10431. "enable_status_check": {
  10432. "type": "boolean",
  10433. "x-go-name": "EnableStatusCheck"
  10434. },
  10435. "merge_whitelist_teams": {
  10436. "type": "array",
  10437. "items": {
  10438. "type": "string"
  10439. },
  10440. "x-go-name": "MergeWhitelistTeams"
  10441. },
  10442. "merge_whitelist_usernames": {
  10443. "type": "array",
  10444. "items": {
  10445. "type": "string"
  10446. },
  10447. "x-go-name": "MergeWhitelistUsernames"
  10448. },
  10449. "protected_file_patterns": {
  10450. "type": "string",
  10451. "x-go-name": "ProtectedFilePatterns"
  10452. },
  10453. "push_whitelist_deploy_keys": {
  10454. "type": "boolean",
  10455. "x-go-name": "PushWhitelistDeployKeys"
  10456. },
  10457. "push_whitelist_teams": {
  10458. "type": "array",
  10459. "items": {
  10460. "type": "string"
  10461. },
  10462. "x-go-name": "PushWhitelistTeams"
  10463. },
  10464. "push_whitelist_usernames": {
  10465. "type": "array",
  10466. "items": {
  10467. "type": "string"
  10468. },
  10469. "x-go-name": "PushWhitelistUsernames"
  10470. },
  10471. "require_signed_commits": {
  10472. "type": "boolean",
  10473. "x-go-name": "RequireSignedCommits"
  10474. },
  10475. "required_approvals": {
  10476. "type": "integer",
  10477. "format": "int64",
  10478. "x-go-name": "RequiredApprovals"
  10479. },
  10480. "status_check_contexts": {
  10481. "type": "array",
  10482. "items": {
  10483. "type": "string"
  10484. },
  10485. "x-go-name": "StatusCheckContexts"
  10486. }
  10487. },
  10488. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10489. },
  10490. "CreateEmailOption": {
  10491. "description": "CreateEmailOption options when creating email addresses",
  10492. "type": "object",
  10493. "properties": {
  10494. "emails": {
  10495. "description": "email addresses to add",
  10496. "type": "array",
  10497. "items": {
  10498. "type": "string"
  10499. },
  10500. "x-go-name": "Emails"
  10501. }
  10502. },
  10503. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10504. },
  10505. "CreateFileOptions": {
  10506. "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)",
  10507. "type": "object",
  10508. "required": [
  10509. "content"
  10510. ],
  10511. "properties": {
  10512. "author": {
  10513. "$ref": "#/definitions/Identity"
  10514. },
  10515. "branch": {
  10516. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  10517. "type": "string",
  10518. "x-go-name": "BranchName"
  10519. },
  10520. "committer": {
  10521. "$ref": "#/definitions/Identity"
  10522. },
  10523. "content": {
  10524. "description": "content must be base64 encoded",
  10525. "type": "string",
  10526. "x-go-name": "Content"
  10527. },
  10528. "dates": {
  10529. "$ref": "#/definitions/CommitDateOptions"
  10530. },
  10531. "message": {
  10532. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  10533. "type": "string",
  10534. "x-go-name": "Message"
  10535. },
  10536. "new_branch": {
  10537. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  10538. "type": "string",
  10539. "x-go-name": "NewBranchName"
  10540. }
  10541. },
  10542. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10543. },
  10544. "CreateForkOption": {
  10545. "description": "CreateForkOption options for creating a fork",
  10546. "type": "object",
  10547. "properties": {
  10548. "organization": {
  10549. "description": "organization name, if forking into an organization",
  10550. "type": "string",
  10551. "x-go-name": "Organization"
  10552. }
  10553. },
  10554. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10555. },
  10556. "CreateGPGKeyOption": {
  10557. "description": "CreateGPGKeyOption options create user GPG key",
  10558. "type": "object",
  10559. "required": [
  10560. "armored_public_key"
  10561. ],
  10562. "properties": {
  10563. "armored_public_key": {
  10564. "description": "An armored GPG key to add",
  10565. "type": "string",
  10566. "uniqueItems": true,
  10567. "x-go-name": "ArmoredKey"
  10568. }
  10569. },
  10570. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10571. },
  10572. "CreateHookOption": {
  10573. "description": "CreateHookOption options when create a hook",
  10574. "type": "object",
  10575. "required": [
  10576. "type",
  10577. "config"
  10578. ],
  10579. "properties": {
  10580. "active": {
  10581. "type": "boolean",
  10582. "default": false,
  10583. "x-go-name": "Active"
  10584. },
  10585. "branch_filter": {
  10586. "type": "string",
  10587. "x-go-name": "BranchFilter"
  10588. },
  10589. "config": {
  10590. "$ref": "#/definitions/CreateHookOptionConfig"
  10591. },
  10592. "events": {
  10593. "type": "array",
  10594. "items": {
  10595. "type": "string"
  10596. },
  10597. "x-go-name": "Events"
  10598. },
  10599. "type": {
  10600. "type": "string",
  10601. "enum": [
  10602. "dingtalk",
  10603. "discord",
  10604. "gitea",
  10605. "gogs",
  10606. "msteams",
  10607. "slack",
  10608. "telegram",
  10609. "feishu"
  10610. ],
  10611. "x-go-name": "Type"
  10612. }
  10613. },
  10614. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10615. },
  10616. "CreateHookOptionConfig": {
  10617. "description": "CreateHookOptionConfig has all config options in it\nrequired are \"content_type\" and \"url\" Required",
  10618. "type": "object",
  10619. "additionalProperties": {
  10620. "type": "string"
  10621. },
  10622. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10623. },
  10624. "CreateIssueCommentOption": {
  10625. "description": "CreateIssueCommentOption options for creating a comment on an issue",
  10626. "type": "object",
  10627. "required": [
  10628. "body"
  10629. ],
  10630. "properties": {
  10631. "body": {
  10632. "type": "string",
  10633. "x-go-name": "Body"
  10634. }
  10635. },
  10636. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10637. },
  10638. "CreateIssueOption": {
  10639. "description": "CreateIssueOption options to create one issue",
  10640. "type": "object",
  10641. "required": [
  10642. "title"
  10643. ],
  10644. "properties": {
  10645. "assignee": {
  10646. "description": "username of assignee",
  10647. "type": "string",
  10648. "x-go-name": "Assignee"
  10649. },
  10650. "assignees": {
  10651. "type": "array",
  10652. "items": {
  10653. "type": "string"
  10654. },
  10655. "x-go-name": "Assignees"
  10656. },
  10657. "body": {
  10658. "type": "string",
  10659. "x-go-name": "Body"
  10660. },
  10661. "closed": {
  10662. "type": "boolean",
  10663. "x-go-name": "Closed"
  10664. },
  10665. "due_date": {
  10666. "type": "string",
  10667. "format": "date-time",
  10668. "x-go-name": "Deadline"
  10669. },
  10670. "labels": {
  10671. "description": "list of label ids",
  10672. "type": "array",
  10673. "items": {
  10674. "type": "integer",
  10675. "format": "int64"
  10676. },
  10677. "x-go-name": "Labels"
  10678. },
  10679. "milestone": {
  10680. "description": "milestone id",
  10681. "type": "integer",
  10682. "format": "int64",
  10683. "x-go-name": "Milestone"
  10684. },
  10685. "title": {
  10686. "type": "string",
  10687. "x-go-name": "Title"
  10688. }
  10689. },
  10690. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10691. },
  10692. "CreateKeyOption": {
  10693. "description": "CreateKeyOption options when creating a key",
  10694. "type": "object",
  10695. "required": [
  10696. "title",
  10697. "key"
  10698. ],
  10699. "properties": {
  10700. "key": {
  10701. "description": "An armored SSH key to add",
  10702. "type": "string",
  10703. "uniqueItems": true,
  10704. "x-go-name": "Key"
  10705. },
  10706. "read_only": {
  10707. "description": "Describe if the key has only read access or read/write",
  10708. "type": "boolean",
  10709. "x-go-name": "ReadOnly"
  10710. },
  10711. "title": {
  10712. "description": "Title of the key to add",
  10713. "type": "string",
  10714. "uniqueItems": true,
  10715. "x-go-name": "Title"
  10716. }
  10717. },
  10718. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10719. },
  10720. "CreateLabelOption": {
  10721. "description": "CreateLabelOption options for creating a label",
  10722. "type": "object",
  10723. "required": [
  10724. "name",
  10725. "color"
  10726. ],
  10727. "properties": {
  10728. "color": {
  10729. "type": "string",
  10730. "x-go-name": "Color",
  10731. "example": "#00aabb"
  10732. },
  10733. "description": {
  10734. "type": "string",
  10735. "x-go-name": "Description"
  10736. },
  10737. "name": {
  10738. "type": "string",
  10739. "x-go-name": "Name"
  10740. }
  10741. },
  10742. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10743. },
  10744. "CreateMilestoneOption": {
  10745. "description": "CreateMilestoneOption options for creating a milestone",
  10746. "type": "object",
  10747. "properties": {
  10748. "description": {
  10749. "type": "string",
  10750. "x-go-name": "Description"
  10751. },
  10752. "due_on": {
  10753. "type": "string",
  10754. "format": "date-time",
  10755. "x-go-name": "Deadline"
  10756. },
  10757. "title": {
  10758. "type": "string",
  10759. "x-go-name": "Title"
  10760. }
  10761. },
  10762. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10763. },
  10764. "CreateOAuth2ApplicationOptions": {
  10765. "description": "CreateOAuth2ApplicationOptions holds options to create an oauth2 application",
  10766. "type": "object",
  10767. "properties": {
  10768. "name": {
  10769. "type": "string",
  10770. "x-go-name": "Name"
  10771. },
  10772. "redirect_uris": {
  10773. "type": "array",
  10774. "items": {
  10775. "type": "string"
  10776. },
  10777. "x-go-name": "RedirectURIs"
  10778. }
  10779. },
  10780. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10781. },
  10782. "CreateOrgOption": {
  10783. "description": "CreateOrgOption options for creating an organization",
  10784. "type": "object",
  10785. "required": [
  10786. "username"
  10787. ],
  10788. "properties": {
  10789. "description": {
  10790. "type": "string",
  10791. "x-go-name": "Description"
  10792. },
  10793. "full_name": {
  10794. "type": "string",
  10795. "x-go-name": "FullName"
  10796. },
  10797. "location": {
  10798. "type": "string",
  10799. "x-go-name": "Location"
  10800. },
  10801. "repo_admin_change_team_access": {
  10802. "type": "boolean",
  10803. "x-go-name": "RepoAdminChangeTeamAccess"
  10804. },
  10805. "username": {
  10806. "type": "string",
  10807. "x-go-name": "UserName"
  10808. },
  10809. "visibility": {
  10810. "description": "possible values are `public` (default), `limited` or `private`",
  10811. "type": "string",
  10812. "enum": [
  10813. "public",
  10814. "limited",
  10815. "private"
  10816. ],
  10817. "x-go-name": "Visibility"
  10818. },
  10819. "website": {
  10820. "type": "string",
  10821. "x-go-name": "Website"
  10822. }
  10823. },
  10824. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10825. },
  10826. "CreatePullRequestOption": {
  10827. "description": "CreatePullRequestOption options when creating a pull request",
  10828. "type": "object",
  10829. "properties": {
  10830. "assignee": {
  10831. "type": "string",
  10832. "x-go-name": "Assignee"
  10833. },
  10834. "assignees": {
  10835. "type": "array",
  10836. "items": {
  10837. "type": "string"
  10838. },
  10839. "x-go-name": "Assignees"
  10840. },
  10841. "base": {
  10842. "type": "string",
  10843. "x-go-name": "Base"
  10844. },
  10845. "body": {
  10846. "type": "string",
  10847. "x-go-name": "Body"
  10848. },
  10849. "due_date": {
  10850. "type": "string",
  10851. "format": "date-time",
  10852. "x-go-name": "Deadline"
  10853. },
  10854. "head": {
  10855. "type": "string",
  10856. "x-go-name": "Head"
  10857. },
  10858. "labels": {
  10859. "type": "array",
  10860. "items": {
  10861. "type": "integer",
  10862. "format": "int64"
  10863. },
  10864. "x-go-name": "Labels"
  10865. },
  10866. "milestone": {
  10867. "type": "integer",
  10868. "format": "int64",
  10869. "x-go-name": "Milestone"
  10870. },
  10871. "title": {
  10872. "type": "string",
  10873. "x-go-name": "Title"
  10874. }
  10875. },
  10876. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10877. },
  10878. "CreateReleaseOption": {
  10879. "description": "CreateReleaseOption options when creating a release",
  10880. "type": "object",
  10881. "required": [
  10882. "tag_name"
  10883. ],
  10884. "properties": {
  10885. "body": {
  10886. "type": "string",
  10887. "x-go-name": "Note"
  10888. },
  10889. "draft": {
  10890. "type": "boolean",
  10891. "x-go-name": "IsDraft"
  10892. },
  10893. "name": {
  10894. "type": "string",
  10895. "x-go-name": "Title"
  10896. },
  10897. "prerelease": {
  10898. "type": "boolean",
  10899. "x-go-name": "IsPrerelease"
  10900. },
  10901. "tag_name": {
  10902. "type": "string",
  10903. "x-go-name": "TagName"
  10904. },
  10905. "target_commitish": {
  10906. "type": "string",
  10907. "x-go-name": "Target"
  10908. }
  10909. },
  10910. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10911. },
  10912. "CreateRepoOption": {
  10913. "description": "CreateRepoOption options when creating repository",
  10914. "type": "object",
  10915. "required": [
  10916. "name"
  10917. ],
  10918. "properties": {
  10919. "auto_init": {
  10920. "description": "Whether the repository should be auto-intialized?",
  10921. "type": "boolean",
  10922. "x-go-name": "AutoInit"
  10923. },
  10924. "default_branch": {
  10925. "description": "DefaultBranch of the repository (used when initializes and in template)",
  10926. "type": "string",
  10927. "x-go-name": "DefaultBranch"
  10928. },
  10929. "description": {
  10930. "description": "Description of the repository to create",
  10931. "type": "string",
  10932. "x-go-name": "Description"
  10933. },
  10934. "gitignores": {
  10935. "description": "Gitignores to use",
  10936. "type": "string",
  10937. "x-go-name": "Gitignores"
  10938. },
  10939. "issue_labels": {
  10940. "description": "Issue Label set to use",
  10941. "type": "string",
  10942. "x-go-name": "IssueLabels"
  10943. },
  10944. "license": {
  10945. "description": "License to use",
  10946. "type": "string",
  10947. "x-go-name": "License"
  10948. },
  10949. "name": {
  10950. "description": "Name of the repository to create",
  10951. "type": "string",
  10952. "uniqueItems": true,
  10953. "x-go-name": "Name"
  10954. },
  10955. "private": {
  10956. "description": "Whether the repository is private",
  10957. "type": "boolean",
  10958. "x-go-name": "Private"
  10959. },
  10960. "readme": {
  10961. "description": "Readme of the repository to create",
  10962. "type": "string",
  10963. "x-go-name": "Readme"
  10964. }
  10965. },
  10966. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10967. },
  10968. "CreateStatusOption": {
  10969. "description": "CreateStatusOption holds the information needed to create a new Status for a Commit",
  10970. "type": "object",
  10971. "properties": {
  10972. "context": {
  10973. "type": "string",
  10974. "x-go-name": "Context"
  10975. },
  10976. "description": {
  10977. "type": "string",
  10978. "x-go-name": "Description"
  10979. },
  10980. "state": {
  10981. "$ref": "#/definitions/StatusState"
  10982. },
  10983. "target_url": {
  10984. "type": "string",
  10985. "x-go-name": "TargetURL"
  10986. }
  10987. },
  10988. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10989. },
  10990. "CreateTeamOption": {
  10991. "description": "CreateTeamOption options for creating a team",
  10992. "type": "object",
  10993. "required": [
  10994. "name"
  10995. ],
  10996. "properties": {
  10997. "can_create_org_repo": {
  10998. "type": "boolean",
  10999. "x-go-name": "CanCreateOrgRepo"
  11000. },
  11001. "description": {
  11002. "type": "string",
  11003. "x-go-name": "Description"
  11004. },
  11005. "includes_all_repositories": {
  11006. "type": "boolean",
  11007. "x-go-name": "IncludesAllRepositories"
  11008. },
  11009. "name": {
  11010. "type": "string",
  11011. "x-go-name": "Name"
  11012. },
  11013. "permission": {
  11014. "type": "string",
  11015. "enum": [
  11016. "read",
  11017. "write",
  11018. "admin"
  11019. ],
  11020. "x-go-name": "Permission"
  11021. },
  11022. "units": {
  11023. "type": "array",
  11024. "items": {
  11025. "type": "string"
  11026. },
  11027. "x-go-name": "Units",
  11028. "example": [
  11029. "repo.code",
  11030. "repo.issues",
  11031. "repo.ext_issues",
  11032. "repo.wiki",
  11033. "repo.pulls",
  11034. "repo.releases",
  11035. "repo.ext_wiki"
  11036. ]
  11037. }
  11038. },
  11039. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11040. },
  11041. "CreateUserOption": {
  11042. "description": "CreateUserOption create user options",
  11043. "type": "object",
  11044. "required": [
  11045. "username",
  11046. "email",
  11047. "password"
  11048. ],
  11049. "properties": {
  11050. "email": {
  11051. "type": "string",
  11052. "format": "email",
  11053. "x-go-name": "Email"
  11054. },
  11055. "full_name": {
  11056. "type": "string",
  11057. "x-go-name": "FullName"
  11058. },
  11059. "login_name": {
  11060. "type": "string",
  11061. "x-go-name": "LoginName"
  11062. },
  11063. "must_change_password": {
  11064. "type": "boolean",
  11065. "x-go-name": "MustChangePassword"
  11066. },
  11067. "password": {
  11068. "type": "string",
  11069. "x-go-name": "Password"
  11070. },
  11071. "send_notify": {
  11072. "type": "boolean",
  11073. "x-go-name": "SendNotify"
  11074. },
  11075. "source_id": {
  11076. "type": "integer",
  11077. "format": "int64",
  11078. "x-go-name": "SourceID"
  11079. },
  11080. "username": {
  11081. "type": "string",
  11082. "x-go-name": "Username"
  11083. }
  11084. },
  11085. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11086. },
  11087. "DeleteEmailOption": {
  11088. "description": "DeleteEmailOption options when deleting email addresses",
  11089. "type": "object",
  11090. "properties": {
  11091. "emails": {
  11092. "description": "email addresses to delete",
  11093. "type": "array",
  11094. "items": {
  11095. "type": "string"
  11096. },
  11097. "x-go-name": "Emails"
  11098. }
  11099. },
  11100. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11101. },
  11102. "DeleteFileOptions": {
  11103. "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)",
  11104. "type": "object",
  11105. "required": [
  11106. "sha"
  11107. ],
  11108. "properties": {
  11109. "author": {
  11110. "$ref": "#/definitions/Identity"
  11111. },
  11112. "branch": {
  11113. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  11114. "type": "string",
  11115. "x-go-name": "BranchName"
  11116. },
  11117. "committer": {
  11118. "$ref": "#/definitions/Identity"
  11119. },
  11120. "dates": {
  11121. "$ref": "#/definitions/CommitDateOptions"
  11122. },
  11123. "message": {
  11124. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  11125. "type": "string",
  11126. "x-go-name": "Message"
  11127. },
  11128. "new_branch": {
  11129. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  11130. "type": "string",
  11131. "x-go-name": "NewBranchName"
  11132. },
  11133. "sha": {
  11134. "description": "sha is the SHA for the file that already exists",
  11135. "type": "string",
  11136. "x-go-name": "SHA"
  11137. }
  11138. },
  11139. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11140. },
  11141. "DeployKey": {
  11142. "description": "DeployKey a deploy key",
  11143. "type": "object",
  11144. "properties": {
  11145. "created_at": {
  11146. "type": "string",
  11147. "format": "date-time",
  11148. "x-go-name": "Created"
  11149. },
  11150. "fingerprint": {
  11151. "type": "string",
  11152. "x-go-name": "Fingerprint"
  11153. },
  11154. "id": {
  11155. "type": "integer",
  11156. "format": "int64",
  11157. "x-go-name": "ID"
  11158. },
  11159. "key": {
  11160. "type": "string",
  11161. "x-go-name": "Key"
  11162. },
  11163. "key_id": {
  11164. "type": "integer",
  11165. "format": "int64",
  11166. "x-go-name": "KeyID"
  11167. },
  11168. "read_only": {
  11169. "type": "boolean",
  11170. "x-go-name": "ReadOnly"
  11171. },
  11172. "repository": {
  11173. "$ref": "#/definitions/Repository"
  11174. },
  11175. "title": {
  11176. "type": "string",
  11177. "x-go-name": "Title"
  11178. },
  11179. "url": {
  11180. "type": "string",
  11181. "x-go-name": "URL"
  11182. }
  11183. },
  11184. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11185. },
  11186. "EditAttachmentOptions": {
  11187. "description": "EditAttachmentOptions options for editing attachments",
  11188. "type": "object",
  11189. "properties": {
  11190. "name": {
  11191. "type": "string",
  11192. "x-go-name": "Name"
  11193. }
  11194. },
  11195. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11196. },
  11197. "EditBranchProtectionOption": {
  11198. "description": "EditBranchProtectionOption options for editing a branch protection",
  11199. "type": "object",
  11200. "properties": {
  11201. "approvals_whitelist_teams": {
  11202. "type": "array",
  11203. "items": {
  11204. "type": "string"
  11205. },
  11206. "x-go-name": "ApprovalsWhitelistTeams"
  11207. },
  11208. "approvals_whitelist_username": {
  11209. "type": "array",
  11210. "items": {
  11211. "type": "string"
  11212. },
  11213. "x-go-name": "ApprovalsWhitelistUsernames"
  11214. },
  11215. "block_on_outdated_branch": {
  11216. "type": "boolean",
  11217. "x-go-name": "BlockOnOutdatedBranch"
  11218. },
  11219. "block_on_rejected_reviews": {
  11220. "type": "boolean",
  11221. "x-go-name": "BlockOnRejectedReviews"
  11222. },
  11223. "dismiss_stale_approvals": {
  11224. "type": "boolean",
  11225. "x-go-name": "DismissStaleApprovals"
  11226. },
  11227. "enable_approvals_whitelist": {
  11228. "type": "boolean",
  11229. "x-go-name": "EnableApprovalsWhitelist"
  11230. },
  11231. "enable_merge_whitelist": {
  11232. "type": "boolean",
  11233. "x-go-name": "EnableMergeWhitelist"
  11234. },
  11235. "enable_push": {
  11236. "type": "boolean",
  11237. "x-go-name": "EnablePush"
  11238. },
  11239. "enable_push_whitelist": {
  11240. "type": "boolean",
  11241. "x-go-name": "EnablePushWhitelist"
  11242. },
  11243. "enable_status_check": {
  11244. "type": "boolean",
  11245. "x-go-name": "EnableStatusCheck"
  11246. },
  11247. "merge_whitelist_teams": {
  11248. "type": "array",
  11249. "items": {
  11250. "type": "string"
  11251. },
  11252. "x-go-name": "MergeWhitelistTeams"
  11253. },
  11254. "merge_whitelist_usernames": {
  11255. "type": "array",
  11256. "items": {
  11257. "type": "string"
  11258. },
  11259. "x-go-name": "MergeWhitelistUsernames"
  11260. },
  11261. "protected_file_patterns": {
  11262. "type": "string",
  11263. "x-go-name": "ProtectedFilePatterns"
  11264. },
  11265. "push_whitelist_deploy_keys": {
  11266. "type": "boolean",
  11267. "x-go-name": "PushWhitelistDeployKeys"
  11268. },
  11269. "push_whitelist_teams": {
  11270. "type": "array",
  11271. "items": {
  11272. "type": "string"
  11273. },
  11274. "x-go-name": "PushWhitelistTeams"
  11275. },
  11276. "push_whitelist_usernames": {
  11277. "type": "array",
  11278. "items": {
  11279. "type": "string"
  11280. },
  11281. "x-go-name": "PushWhitelistUsernames"
  11282. },
  11283. "require_signed_commits": {
  11284. "type": "boolean",
  11285. "x-go-name": "RequireSignedCommits"
  11286. },
  11287. "required_approvals": {
  11288. "type": "integer",
  11289. "format": "int64",
  11290. "x-go-name": "RequiredApprovals"
  11291. },
  11292. "status_check_contexts": {
  11293. "type": "array",
  11294. "items": {
  11295. "type": "string"
  11296. },
  11297. "x-go-name": "StatusCheckContexts"
  11298. }
  11299. },
  11300. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11301. },
  11302. "EditDeadlineOption": {
  11303. "description": "EditDeadlineOption options for creating a deadline",
  11304. "type": "object",
  11305. "required": [
  11306. "due_date"
  11307. ],
  11308. "properties": {
  11309. "due_date": {
  11310. "type": "string",
  11311. "format": "date-time",
  11312. "x-go-name": "Deadline"
  11313. }
  11314. },
  11315. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11316. },
  11317. "EditGitHookOption": {
  11318. "description": "EditGitHookOption options when modifying one Git hook",
  11319. "type": "object",
  11320. "properties": {
  11321. "content": {
  11322. "type": "string",
  11323. "x-go-name": "Content"
  11324. }
  11325. },
  11326. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11327. },
  11328. "EditHookOption": {
  11329. "description": "EditHookOption options when modify one hook",
  11330. "type": "object",
  11331. "properties": {
  11332. "active": {
  11333. "type": "boolean",
  11334. "x-go-name": "Active"
  11335. },
  11336. "branch_filter": {
  11337. "type": "string",
  11338. "x-go-name": "BranchFilter"
  11339. },
  11340. "config": {
  11341. "type": "object",
  11342. "additionalProperties": {
  11343. "type": "string"
  11344. },
  11345. "x-go-name": "Config"
  11346. },
  11347. "events": {
  11348. "type": "array",
  11349. "items": {
  11350. "type": "string"
  11351. },
  11352. "x-go-name": "Events"
  11353. }
  11354. },
  11355. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11356. },
  11357. "EditIssueCommentOption": {
  11358. "description": "EditIssueCommentOption options for editing a comment",
  11359. "type": "object",
  11360. "required": [
  11361. "body"
  11362. ],
  11363. "properties": {
  11364. "body": {
  11365. "type": "string",
  11366. "x-go-name": "Body"
  11367. }
  11368. },
  11369. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11370. },
  11371. "EditIssueOption": {
  11372. "description": "EditIssueOption options for editing an issue",
  11373. "type": "object",
  11374. "properties": {
  11375. "assignee": {
  11376. "type": "string",
  11377. "x-go-name": "Assignee"
  11378. },
  11379. "assignees": {
  11380. "type": "array",
  11381. "items": {
  11382. "type": "string"
  11383. },
  11384. "x-go-name": "Assignees"
  11385. },
  11386. "body": {
  11387. "type": "string",
  11388. "x-go-name": "Body"
  11389. },
  11390. "due_date": {
  11391. "type": "string",
  11392. "format": "date-time",
  11393. "x-go-name": "Deadline"
  11394. },
  11395. "milestone": {
  11396. "type": "integer",
  11397. "format": "int64",
  11398. "x-go-name": "Milestone"
  11399. },
  11400. "state": {
  11401. "type": "string",
  11402. "x-go-name": "State"
  11403. },
  11404. "title": {
  11405. "type": "string",
  11406. "x-go-name": "Title"
  11407. },
  11408. "unset_due_date": {
  11409. "type": "boolean",
  11410. "x-go-name": "RemoveDeadline"
  11411. }
  11412. },
  11413. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11414. },
  11415. "EditLabelOption": {
  11416. "description": "EditLabelOption options for editing a label",
  11417. "type": "object",
  11418. "properties": {
  11419. "color": {
  11420. "type": "string",
  11421. "x-go-name": "Color"
  11422. },
  11423. "description": {
  11424. "type": "string",
  11425. "x-go-name": "Description"
  11426. },
  11427. "name": {
  11428. "type": "string",
  11429. "x-go-name": "Name"
  11430. }
  11431. },
  11432. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11433. },
  11434. "EditMilestoneOption": {
  11435. "description": "EditMilestoneOption options for editing a milestone",
  11436. "type": "object",
  11437. "properties": {
  11438. "description": {
  11439. "type": "string",
  11440. "x-go-name": "Description"
  11441. },
  11442. "due_on": {
  11443. "type": "string",
  11444. "format": "date-time",
  11445. "x-go-name": "Deadline"
  11446. },
  11447. "state": {
  11448. "type": "string",
  11449. "x-go-name": "State"
  11450. },
  11451. "title": {
  11452. "type": "string",
  11453. "x-go-name": "Title"
  11454. }
  11455. },
  11456. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11457. },
  11458. "EditOrgOption": {
  11459. "description": "EditOrgOption options for editing an organization",
  11460. "type": "object",
  11461. "properties": {
  11462. "description": {
  11463. "type": "string",
  11464. "x-go-name": "Description"
  11465. },
  11466. "full_name": {
  11467. "type": "string",
  11468. "x-go-name": "FullName"
  11469. },
  11470. "location": {
  11471. "type": "string",
  11472. "x-go-name": "Location"
  11473. },
  11474. "repo_admin_change_team_access": {
  11475. "type": "boolean",
  11476. "x-go-name": "RepoAdminChangeTeamAccess"
  11477. },
  11478. "visibility": {
  11479. "description": "possible values are `public`, `limited` or `private`",
  11480. "type": "string",
  11481. "enum": [
  11482. "public",
  11483. "limited",
  11484. "private"
  11485. ],
  11486. "x-go-name": "Visibility"
  11487. },
  11488. "website": {
  11489. "type": "string",
  11490. "x-go-name": "Website"
  11491. }
  11492. },
  11493. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11494. },
  11495. "EditPullRequestOption": {
  11496. "description": "EditPullRequestOption options when modify pull request",
  11497. "type": "object",
  11498. "properties": {
  11499. "assignee": {
  11500. "type": "string",
  11501. "x-go-name": "Assignee"
  11502. },
  11503. "assignees": {
  11504. "type": "array",
  11505. "items": {
  11506. "type": "string"
  11507. },
  11508. "x-go-name": "Assignees"
  11509. },
  11510. "body": {
  11511. "type": "string",
  11512. "x-go-name": "Body"
  11513. },
  11514. "due_date": {
  11515. "type": "string",
  11516. "format": "date-time",
  11517. "x-go-name": "Deadline"
  11518. },
  11519. "labels": {
  11520. "type": "array",
  11521. "items": {
  11522. "type": "integer",
  11523. "format": "int64"
  11524. },
  11525. "x-go-name": "Labels"
  11526. },
  11527. "milestone": {
  11528. "type": "integer",
  11529. "format": "int64",
  11530. "x-go-name": "Milestone"
  11531. },
  11532. "state": {
  11533. "type": "string",
  11534. "x-go-name": "State"
  11535. },
  11536. "title": {
  11537. "type": "string",
  11538. "x-go-name": "Title"
  11539. },
  11540. "unset_due_date": {
  11541. "type": "boolean",
  11542. "x-go-name": "RemoveDeadline"
  11543. }
  11544. },
  11545. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11546. },
  11547. "EditReactionOption": {
  11548. "description": "EditReactionOption contain the reaction type",
  11549. "type": "object",
  11550. "properties": {
  11551. "content": {
  11552. "type": "string",
  11553. "x-go-name": "Reaction"
  11554. }
  11555. },
  11556. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11557. },
  11558. "EditReleaseOption": {
  11559. "description": "EditReleaseOption options when editing a release",
  11560. "type": "object",
  11561. "properties": {
  11562. "body": {
  11563. "type": "string",
  11564. "x-go-name": "Note"
  11565. },
  11566. "draft": {
  11567. "type": "boolean",
  11568. "x-go-name": "IsDraft"
  11569. },
  11570. "name": {
  11571. "type": "string",
  11572. "x-go-name": "Title"
  11573. },
  11574. "prerelease": {
  11575. "type": "boolean",
  11576. "x-go-name": "IsPrerelease"
  11577. },
  11578. "tag_name": {
  11579. "type": "string",
  11580. "x-go-name": "TagName"
  11581. },
  11582. "target_commitish": {
  11583. "type": "string",
  11584. "x-go-name": "Target"
  11585. }
  11586. },
  11587. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11588. },
  11589. "EditRepoOption": {
  11590. "description": "EditRepoOption options when editing a repository's properties",
  11591. "type": "object",
  11592. "properties": {
  11593. "allow_merge_commits": {
  11594. "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`.",
  11595. "type": "boolean",
  11596. "x-go-name": "AllowMerge"
  11597. },
  11598. "allow_rebase": {
  11599. "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.",
  11600. "type": "boolean",
  11601. "x-go-name": "AllowRebase"
  11602. },
  11603. "allow_rebase_explicit": {
  11604. "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`.",
  11605. "type": "boolean",
  11606. "x-go-name": "AllowRebaseMerge"
  11607. },
  11608. "allow_squash_merge": {
  11609. "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.",
  11610. "type": "boolean",
  11611. "x-go-name": "AllowSquash"
  11612. },
  11613. "archived": {
  11614. "description": "set to `true` to archive this repository.",
  11615. "type": "boolean",
  11616. "x-go-name": "Archived"
  11617. },
  11618. "default_branch": {
  11619. "description": "sets the default branch for this repository.",
  11620. "type": "string",
  11621. "x-go-name": "DefaultBranch"
  11622. },
  11623. "description": {
  11624. "description": "a short description of the repository.",
  11625. "type": "string",
  11626. "x-go-name": "Description"
  11627. },
  11628. "external_tracker": {
  11629. "$ref": "#/definitions/ExternalTracker"
  11630. },
  11631. "external_wiki": {
  11632. "$ref": "#/definitions/ExternalWiki"
  11633. },
  11634. "has_issues": {
  11635. "description": "either `true` to enable issues for this repository or `false` to disable them.",
  11636. "type": "boolean",
  11637. "x-go-name": "HasIssues"
  11638. },
  11639. "has_pull_requests": {
  11640. "description": "either `true` to allow pull requests, or `false` to prevent pull request.",
  11641. "type": "boolean",
  11642. "x-go-name": "HasPullRequests"
  11643. },
  11644. "has_wiki": {
  11645. "description": "either `true` to enable the wiki for this repository or `false` to disable it.",
  11646. "type": "boolean",
  11647. "x-go-name": "HasWiki"
  11648. },
  11649. "ignore_whitespace_conflicts": {
  11650. "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.",
  11651. "type": "boolean",
  11652. "x-go-name": "IgnoreWhitespaceConflicts"
  11653. },
  11654. "internal_tracker": {
  11655. "$ref": "#/definitions/InternalTracker"
  11656. },
  11657. "name": {
  11658. "description": "name of the repository",
  11659. "type": "string",
  11660. "uniqueItems": true,
  11661. "x-go-name": "Name"
  11662. },
  11663. "private": {
  11664. "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.",
  11665. "type": "boolean",
  11666. "x-go-name": "Private"
  11667. },
  11668. "template": {
  11669. "description": "either `true` to make this repository a template or `false` to make it a normal repository",
  11670. "type": "boolean",
  11671. "x-go-name": "Template"
  11672. },
  11673. "website": {
  11674. "description": "a URL with more information about the repository.",
  11675. "type": "string",
  11676. "x-go-name": "Website"
  11677. }
  11678. },
  11679. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11680. },
  11681. "EditTeamOption": {
  11682. "description": "EditTeamOption options for editing a team",
  11683. "type": "object",
  11684. "required": [
  11685. "name"
  11686. ],
  11687. "properties": {
  11688. "can_create_org_repo": {
  11689. "type": "boolean",
  11690. "x-go-name": "CanCreateOrgRepo"
  11691. },
  11692. "description": {
  11693. "type": "string",
  11694. "x-go-name": "Description"
  11695. },
  11696. "includes_all_repositories": {
  11697. "type": "boolean",
  11698. "x-go-name": "IncludesAllRepositories"
  11699. },
  11700. "name": {
  11701. "type": "string",
  11702. "x-go-name": "Name"
  11703. },
  11704. "permission": {
  11705. "type": "string",
  11706. "enum": [
  11707. "read",
  11708. "write",
  11709. "admin"
  11710. ],
  11711. "x-go-name": "Permission"
  11712. },
  11713. "units": {
  11714. "type": "array",
  11715. "items": {
  11716. "type": "string"
  11717. },
  11718. "x-go-name": "Units",
  11719. "example": [
  11720. "repo.code",
  11721. "repo.issues",
  11722. "repo.ext_issues",
  11723. "repo.wiki",
  11724. "repo.pulls",
  11725. "repo.releases",
  11726. "repo.ext_wiki"
  11727. ]
  11728. }
  11729. },
  11730. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11731. },
  11732. "EditUserOption": {
  11733. "description": "EditUserOption edit user options",
  11734. "type": "object",
  11735. "required": [
  11736. "email"
  11737. ],
  11738. "properties": {
  11739. "active": {
  11740. "type": "boolean",
  11741. "x-go-name": "Active"
  11742. },
  11743. "admin": {
  11744. "type": "boolean",
  11745. "x-go-name": "Admin"
  11746. },
  11747. "allow_create_organization": {
  11748. "type": "boolean",
  11749. "x-go-name": "AllowCreateOrganization"
  11750. },
  11751. "allow_git_hook": {
  11752. "type": "boolean",
  11753. "x-go-name": "AllowGitHook"
  11754. },
  11755. "allow_import_local": {
  11756. "type": "boolean",
  11757. "x-go-name": "AllowImportLocal"
  11758. },
  11759. "email": {
  11760. "type": "string",
  11761. "format": "email",
  11762. "x-go-name": "Email"
  11763. },
  11764. "full_name": {
  11765. "type": "string",
  11766. "x-go-name": "FullName"
  11767. },
  11768. "location": {
  11769. "type": "string",
  11770. "x-go-name": "Location"
  11771. },
  11772. "login_name": {
  11773. "type": "string",
  11774. "x-go-name": "LoginName"
  11775. },
  11776. "max_repo_creation": {
  11777. "type": "integer",
  11778. "format": "int64",
  11779. "x-go-name": "MaxRepoCreation"
  11780. },
  11781. "must_change_password": {
  11782. "type": "boolean",
  11783. "x-go-name": "MustChangePassword"
  11784. },
  11785. "password": {
  11786. "type": "string",
  11787. "x-go-name": "Password"
  11788. },
  11789. "prohibit_login": {
  11790. "type": "boolean",
  11791. "x-go-name": "ProhibitLogin"
  11792. },
  11793. "source_id": {
  11794. "type": "integer",
  11795. "format": "int64",
  11796. "x-go-name": "SourceID"
  11797. },
  11798. "website": {
  11799. "type": "string",
  11800. "x-go-name": "Website"
  11801. }
  11802. },
  11803. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11804. },
  11805. "Email": {
  11806. "description": "Email an email address belonging to a user",
  11807. "type": "object",
  11808. "properties": {
  11809. "email": {
  11810. "type": "string",
  11811. "format": "email",
  11812. "x-go-name": "Email"
  11813. },
  11814. "primary": {
  11815. "type": "boolean",
  11816. "x-go-name": "Primary"
  11817. },
  11818. "verified": {
  11819. "type": "boolean",
  11820. "x-go-name": "Verified"
  11821. }
  11822. },
  11823. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11824. },
  11825. "ExternalTracker": {
  11826. "description": "ExternalTracker represents settings for external tracker",
  11827. "type": "object",
  11828. "properties": {
  11829. "external_tracker_format": {
  11830. "description": "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.",
  11831. "type": "string",
  11832. "x-go-name": "ExternalTrackerFormat"
  11833. },
  11834. "external_tracker_style": {
  11835. "description": "External Issue Tracker Number Format, either `numeric` or `alphanumeric`",
  11836. "type": "string",
  11837. "x-go-name": "ExternalTrackerStyle"
  11838. },
  11839. "external_tracker_url": {
  11840. "description": "URL of external issue tracker.",
  11841. "type": "string",
  11842. "x-go-name": "ExternalTrackerURL"
  11843. }
  11844. },
  11845. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11846. },
  11847. "ExternalWiki": {
  11848. "description": "ExternalWiki represents setting for external wiki",
  11849. "type": "object",
  11850. "properties": {
  11851. "external_wiki_url": {
  11852. "description": "URL of external wiki.",
  11853. "type": "string",
  11854. "x-go-name": "ExternalWikiURL"
  11855. }
  11856. },
  11857. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11858. },
  11859. "FileCommitResponse": {
  11860. "type": "object",
  11861. "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.",
  11862. "properties": {
  11863. "author": {
  11864. "$ref": "#/definitions/CommitUser"
  11865. },
  11866. "committer": {
  11867. "$ref": "#/definitions/CommitUser"
  11868. },
  11869. "html_url": {
  11870. "type": "string",
  11871. "x-go-name": "HTMLURL"
  11872. },
  11873. "message": {
  11874. "type": "string",
  11875. "x-go-name": "Message"
  11876. },
  11877. "parents": {
  11878. "type": "array",
  11879. "items": {
  11880. "$ref": "#/definitions/CommitMeta"
  11881. },
  11882. "x-go-name": "Parents"
  11883. },
  11884. "sha": {
  11885. "type": "string",
  11886. "x-go-name": "SHA"
  11887. },
  11888. "tree": {
  11889. "$ref": "#/definitions/CommitMeta"
  11890. },
  11891. "url": {
  11892. "type": "string",
  11893. "x-go-name": "URL"
  11894. }
  11895. },
  11896. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11897. },
  11898. "FileDeleteResponse": {
  11899. "description": "FileDeleteResponse contains information about a repo's file that was deleted",
  11900. "type": "object",
  11901. "properties": {
  11902. "commit": {
  11903. "$ref": "#/definitions/FileCommitResponse"
  11904. },
  11905. "content": {
  11906. "type": "object",
  11907. "x-go-name": "Content"
  11908. },
  11909. "verification": {
  11910. "$ref": "#/definitions/PayloadCommitVerification"
  11911. }
  11912. },
  11913. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11914. },
  11915. "FileLinksResponse": {
  11916. "description": "FileLinksResponse contains the links for a repo's file",
  11917. "type": "object",
  11918. "properties": {
  11919. "git": {
  11920. "type": "string",
  11921. "x-go-name": "GitURL"
  11922. },
  11923. "html": {
  11924. "type": "string",
  11925. "x-go-name": "HTMLURL"
  11926. },
  11927. "self": {
  11928. "type": "string",
  11929. "x-go-name": "Self"
  11930. }
  11931. },
  11932. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11933. },
  11934. "FileResponse": {
  11935. "description": "FileResponse contains information about a repo's file",
  11936. "type": "object",
  11937. "properties": {
  11938. "commit": {
  11939. "$ref": "#/definitions/FileCommitResponse"
  11940. },
  11941. "content": {
  11942. "$ref": "#/definitions/ContentsResponse"
  11943. },
  11944. "verification": {
  11945. "$ref": "#/definitions/PayloadCommitVerification"
  11946. }
  11947. },
  11948. "x-go-package": "code.gitea.io/gitea/modules/structs"
  11949. },
  11950. "GPGKey": {
  11951. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  11952. "type": "object",
  11953. "properties": {
  11954. "can_certify": {
  11955. "type": "boolean",
  11956. "x-go-name": "CanCertify"
  11957. },
  11958. "can_encrypt_comms": {
  11959. "type": "boolean",
  11960. "x-go-name": "CanEncryptComms"
  11961. },
  11962. "can_encrypt_storage": {
  11963. "type": "boolean",
  11964. "x-go-name": "CanEncryptStorage"
  11965. },
  11966. "can_sign": {
  11967. "type": "boolean",
  11968. "x-go-name": "CanSign"
  11969. },
  11970. "created_at": {
  11971. "type": "string",
  11972. "format": "date-time",
  11973. "x-go-name": "Created"
  11974. },
  11975. "emails": {
  11976. "type": "array",
  11977. "items": {
  11978. "$ref": "#/definitions/GPGKeyEmail"
  11979. },
  11980. "x-go-name": "Emails"
  11981. },
  11982. "expires_at": {
  11983. "type": "string",
  11984. "format": "date-time",
  11985. "x-go-name": "Expires"
  11986. },
  11987. "id": {
  11988. "type": "integer",
  11989. "format": "int64",
  11990. "x-go-name": "ID"
  11991. },
  11992. "key_id": {
  11993. "type": "string",
  11994. "x-go-name": "KeyID"
  11995. },
  11996. "primary_key_id": {
  11997. "type": "string",
  11998. "x-go-name": "PrimaryKeyID"
  11999. },
  12000. "public_key": {
  12001. "type": "string",
  12002. "x-go-name": "PublicKey"
  12003. },
  12004. "subkeys": {
  12005. "type": "array",
  12006. "items": {
  12007. "$ref": "#/definitions/GPGKey"
  12008. },
  12009. "x-go-name": "SubsKey"
  12010. }
  12011. },
  12012. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12013. },
  12014. "GPGKeyEmail": {
  12015. "description": "GPGKeyEmail an email attached to a GPGKey",
  12016. "type": "object",
  12017. "properties": {
  12018. "email": {
  12019. "type": "string",
  12020. "x-go-name": "Email"
  12021. },
  12022. "verified": {
  12023. "type": "boolean",
  12024. "x-go-name": "Verified"
  12025. }
  12026. },
  12027. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12028. },
  12029. "GitBlobResponse": {
  12030. "description": "GitBlobResponse represents a git blob",
  12031. "type": "object",
  12032. "properties": {
  12033. "content": {
  12034. "type": "string",
  12035. "x-go-name": "Content"
  12036. },
  12037. "encoding": {
  12038. "type": "string",
  12039. "x-go-name": "Encoding"
  12040. },
  12041. "sha": {
  12042. "type": "string",
  12043. "x-go-name": "SHA"
  12044. },
  12045. "size": {
  12046. "type": "integer",
  12047. "format": "int64",
  12048. "x-go-name": "Size"
  12049. },
  12050. "url": {
  12051. "type": "string",
  12052. "x-go-name": "URL"
  12053. }
  12054. },
  12055. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12056. },
  12057. "GitEntry": {
  12058. "description": "GitEntry represents a git tree",
  12059. "type": "object",
  12060. "properties": {
  12061. "mode": {
  12062. "type": "string",
  12063. "x-go-name": "Mode"
  12064. },
  12065. "path": {
  12066. "type": "string",
  12067. "x-go-name": "Path"
  12068. },
  12069. "sha": {
  12070. "type": "string",
  12071. "x-go-name": "SHA"
  12072. },
  12073. "size": {
  12074. "type": "integer",
  12075. "format": "int64",
  12076. "x-go-name": "Size"
  12077. },
  12078. "type": {
  12079. "type": "string",
  12080. "x-go-name": "Type"
  12081. },
  12082. "url": {
  12083. "type": "string",
  12084. "x-go-name": "URL"
  12085. }
  12086. },
  12087. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12088. },
  12089. "GitHook": {
  12090. "description": "GitHook represents a Git repository hook",
  12091. "type": "object",
  12092. "properties": {
  12093. "content": {
  12094. "type": "string",
  12095. "x-go-name": "Content"
  12096. },
  12097. "is_active": {
  12098. "type": "boolean",
  12099. "x-go-name": "IsActive"
  12100. },
  12101. "name": {
  12102. "type": "string",
  12103. "x-go-name": "Name"
  12104. }
  12105. },
  12106. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12107. },
  12108. "GitObject": {
  12109. "type": "object",
  12110. "title": "GitObject represents a Git object.",
  12111. "properties": {
  12112. "sha": {
  12113. "type": "string",
  12114. "x-go-name": "SHA"
  12115. },
  12116. "type": {
  12117. "type": "string",
  12118. "x-go-name": "Type"
  12119. },
  12120. "url": {
  12121. "type": "string",
  12122. "x-go-name": "URL"
  12123. }
  12124. },
  12125. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12126. },
  12127. "GitTreeResponse": {
  12128. "description": "GitTreeResponse returns a git tree",
  12129. "type": "object",
  12130. "properties": {
  12131. "page": {
  12132. "type": "integer",
  12133. "format": "int64",
  12134. "x-go-name": "Page"
  12135. },
  12136. "sha": {
  12137. "type": "string",
  12138. "x-go-name": "SHA"
  12139. },
  12140. "total_count": {
  12141. "type": "integer",
  12142. "format": "int64",
  12143. "x-go-name": "TotalCount"
  12144. },
  12145. "tree": {
  12146. "type": "array",
  12147. "items": {
  12148. "$ref": "#/definitions/GitEntry"
  12149. },
  12150. "x-go-name": "Entries"
  12151. },
  12152. "truncated": {
  12153. "type": "boolean",
  12154. "x-go-name": "Truncated"
  12155. },
  12156. "url": {
  12157. "type": "string",
  12158. "x-go-name": "URL"
  12159. }
  12160. },
  12161. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12162. },
  12163. "Hook": {
  12164. "description": "Hook a hook is a web hook when one repository changed",
  12165. "type": "object",
  12166. "properties": {
  12167. "active": {
  12168. "type": "boolean",
  12169. "x-go-name": "Active"
  12170. },
  12171. "config": {
  12172. "type": "object",
  12173. "additionalProperties": {
  12174. "type": "string"
  12175. },
  12176. "x-go-name": "Config"
  12177. },
  12178. "created_at": {
  12179. "type": "string",
  12180. "format": "date-time",
  12181. "x-go-name": "Created"
  12182. },
  12183. "events": {
  12184. "type": "array",
  12185. "items": {
  12186. "type": "string"
  12187. },
  12188. "x-go-name": "Events"
  12189. },
  12190. "id": {
  12191. "type": "integer",
  12192. "format": "int64",
  12193. "x-go-name": "ID"
  12194. },
  12195. "type": {
  12196. "type": "string",
  12197. "x-go-name": "Type"
  12198. },
  12199. "updated_at": {
  12200. "type": "string",
  12201. "format": "date-time",
  12202. "x-go-name": "Updated"
  12203. }
  12204. },
  12205. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12206. },
  12207. "Identity": {
  12208. "description": "Identity for a person's identity like an author or committer",
  12209. "type": "object",
  12210. "properties": {
  12211. "email": {
  12212. "type": "string",
  12213. "format": "email",
  12214. "x-go-name": "Email"
  12215. },
  12216. "name": {
  12217. "type": "string",
  12218. "x-go-name": "Name"
  12219. }
  12220. },
  12221. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12222. },
  12223. "InternalTracker": {
  12224. "description": "InternalTracker represents settings for internal tracker",
  12225. "type": "object",
  12226. "properties": {
  12227. "allow_only_contributors_to_track_time": {
  12228. "description": "Let only contributors track time (Built-in issue tracker)",
  12229. "type": "boolean",
  12230. "x-go-name": "AllowOnlyContributorsToTrackTime"
  12231. },
  12232. "enable_issue_dependencies": {
  12233. "description": "Enable dependencies for issues and pull requests (Built-in issue tracker)",
  12234. "type": "boolean",
  12235. "x-go-name": "EnableIssueDependencies"
  12236. },
  12237. "enable_time_tracker": {
  12238. "description": "Enable time tracking (Built-in issue tracker)",
  12239. "type": "boolean",
  12240. "x-go-name": "EnableTimeTracker"
  12241. }
  12242. },
  12243. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12244. },
  12245. "Issue": {
  12246. "description": "Issue represents an issue in a repository",
  12247. "type": "object",
  12248. "properties": {
  12249. "assignee": {
  12250. "$ref": "#/definitions/User"
  12251. },
  12252. "assignees": {
  12253. "type": "array",
  12254. "items": {
  12255. "$ref": "#/definitions/User"
  12256. },
  12257. "x-go-name": "Assignees"
  12258. },
  12259. "body": {
  12260. "type": "string",
  12261. "x-go-name": "Body"
  12262. },
  12263. "closed_at": {
  12264. "type": "string",
  12265. "format": "date-time",
  12266. "x-go-name": "Closed"
  12267. },
  12268. "comments": {
  12269. "type": "integer",
  12270. "format": "int64",
  12271. "x-go-name": "Comments"
  12272. },
  12273. "created_at": {
  12274. "type": "string",
  12275. "format": "date-time",
  12276. "x-go-name": "Created"
  12277. },
  12278. "due_date": {
  12279. "type": "string",
  12280. "format": "date-time",
  12281. "x-go-name": "Deadline"
  12282. },
  12283. "html_url": {
  12284. "type": "string",
  12285. "x-go-name": "HTMLURL"
  12286. },
  12287. "id": {
  12288. "type": "integer",
  12289. "format": "int64",
  12290. "x-go-name": "ID"
  12291. },
  12292. "labels": {
  12293. "type": "array",
  12294. "items": {
  12295. "$ref": "#/definitions/Label"
  12296. },
  12297. "x-go-name": "Labels"
  12298. },
  12299. "milestone": {
  12300. "$ref": "#/definitions/Milestone"
  12301. },
  12302. "number": {
  12303. "type": "integer",
  12304. "format": "int64",
  12305. "x-go-name": "Index"
  12306. },
  12307. "original_author": {
  12308. "type": "string",
  12309. "x-go-name": "OriginalAuthor"
  12310. },
  12311. "original_author_id": {
  12312. "type": "integer",
  12313. "format": "int64",
  12314. "x-go-name": "OriginalAuthorID"
  12315. },
  12316. "pull_request": {
  12317. "$ref": "#/definitions/PullRequestMeta"
  12318. },
  12319. "repository": {
  12320. "$ref": "#/definitions/RepositoryMeta"
  12321. },
  12322. "state": {
  12323. "$ref": "#/definitions/StateType"
  12324. },
  12325. "title": {
  12326. "type": "string",
  12327. "x-go-name": "Title"
  12328. },
  12329. "updated_at": {
  12330. "type": "string",
  12331. "format": "date-time",
  12332. "x-go-name": "Updated"
  12333. },
  12334. "url": {
  12335. "type": "string",
  12336. "x-go-name": "URL"
  12337. },
  12338. "user": {
  12339. "$ref": "#/definitions/User"
  12340. }
  12341. },
  12342. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12343. },
  12344. "IssueDeadline": {
  12345. "description": "IssueDeadline represents an issue deadline",
  12346. "type": "object",
  12347. "properties": {
  12348. "due_date": {
  12349. "type": "string",
  12350. "format": "date-time",
  12351. "x-go-name": "Deadline"
  12352. }
  12353. },
  12354. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12355. },
  12356. "IssueLabelsOption": {
  12357. "description": "IssueLabelsOption a collection of labels",
  12358. "type": "object",
  12359. "properties": {
  12360. "labels": {
  12361. "description": "list of label IDs",
  12362. "type": "array",
  12363. "items": {
  12364. "type": "integer",
  12365. "format": "int64"
  12366. },
  12367. "x-go-name": "Labels"
  12368. }
  12369. },
  12370. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12371. },
  12372. "Label": {
  12373. "description": "Label a label to an issue or a pr",
  12374. "type": "object",
  12375. "properties": {
  12376. "color": {
  12377. "type": "string",
  12378. "x-go-name": "Color",
  12379. "example": "00aabb"
  12380. },
  12381. "description": {
  12382. "type": "string",
  12383. "x-go-name": "Description"
  12384. },
  12385. "id": {
  12386. "type": "integer",
  12387. "format": "int64",
  12388. "x-go-name": "ID"
  12389. },
  12390. "name": {
  12391. "type": "string",
  12392. "x-go-name": "Name"
  12393. },
  12394. "url": {
  12395. "type": "string",
  12396. "x-go-name": "URL"
  12397. }
  12398. },
  12399. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12400. },
  12401. "MarkdownOption": {
  12402. "description": "MarkdownOption markdown options",
  12403. "type": "object",
  12404. "properties": {
  12405. "Context": {
  12406. "description": "Context to render\n\nin: body",
  12407. "type": "string"
  12408. },
  12409. "Mode": {
  12410. "description": "Mode to render\n\nin: body",
  12411. "type": "string"
  12412. },
  12413. "Text": {
  12414. "description": "Text markdown to render\n\nin: body",
  12415. "type": "string"
  12416. },
  12417. "Wiki": {
  12418. "description": "Is it a wiki page ?\n\nin: body",
  12419. "type": "boolean"
  12420. }
  12421. },
  12422. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12423. },
  12424. "MergePullRequestOption": {
  12425. "description": "MergePullRequestForm form for merging Pull Request",
  12426. "type": "object",
  12427. "required": [
  12428. "Do"
  12429. ],
  12430. "properties": {
  12431. "Do": {
  12432. "type": "string",
  12433. "enum": [
  12434. "merge",
  12435. "rebase",
  12436. "rebase-merge",
  12437. "squash"
  12438. ]
  12439. },
  12440. "MergeMessageField": {
  12441. "type": "string"
  12442. },
  12443. "MergeTitleField": {
  12444. "type": "string"
  12445. },
  12446. "force_merge": {
  12447. "type": "boolean",
  12448. "x-go-name": "ForceMerge"
  12449. }
  12450. },
  12451. "x-go-name": "MergePullRequestForm",
  12452. "x-go-package": "code.gitea.io/gitea/modules/auth"
  12453. },
  12454. "MigrateRepoForm": {
  12455. "description": "MigrateRepoForm form for migrating repository",
  12456. "type": "object",
  12457. "required": [
  12458. "clone_addr",
  12459. "uid",
  12460. "repo_name"
  12461. ],
  12462. "properties": {
  12463. "auth_password": {
  12464. "type": "string",
  12465. "x-go-name": "AuthPassword"
  12466. },
  12467. "auth_username": {
  12468. "type": "string",
  12469. "x-go-name": "AuthUsername"
  12470. },
  12471. "clone_addr": {
  12472. "type": "string",
  12473. "x-go-name": "CloneAddr"
  12474. },
  12475. "description": {
  12476. "type": "string",
  12477. "x-go-name": "Description"
  12478. },
  12479. "issues": {
  12480. "type": "boolean",
  12481. "x-go-name": "Issues"
  12482. },
  12483. "labels": {
  12484. "type": "boolean",
  12485. "x-go-name": "Labels"
  12486. },
  12487. "milestones": {
  12488. "type": "boolean",
  12489. "x-go-name": "Milestones"
  12490. },
  12491. "mirror": {
  12492. "type": "boolean",
  12493. "x-go-name": "Mirror"
  12494. },
  12495. "private": {
  12496. "type": "boolean",
  12497. "x-go-name": "Private"
  12498. },
  12499. "pull_requests": {
  12500. "type": "boolean",
  12501. "x-go-name": "PullRequests"
  12502. },
  12503. "releases": {
  12504. "type": "boolean",
  12505. "x-go-name": "Releases"
  12506. },
  12507. "repo_name": {
  12508. "type": "string",
  12509. "x-go-name": "RepoName"
  12510. },
  12511. "uid": {
  12512. "type": "integer",
  12513. "format": "int64",
  12514. "x-go-name": "UID"
  12515. },
  12516. "wiki": {
  12517. "type": "boolean",
  12518. "x-go-name": "Wiki"
  12519. }
  12520. },
  12521. "x-go-package": "code.gitea.io/gitea/modules/auth"
  12522. },
  12523. "Milestone": {
  12524. "description": "Milestone milestone is a collection of issues on one repository",
  12525. "type": "object",
  12526. "properties": {
  12527. "closed_at": {
  12528. "type": "string",
  12529. "format": "date-time",
  12530. "x-go-name": "Closed"
  12531. },
  12532. "closed_issues": {
  12533. "type": "integer",
  12534. "format": "int64",
  12535. "x-go-name": "ClosedIssues"
  12536. },
  12537. "description": {
  12538. "type": "string",
  12539. "x-go-name": "Description"
  12540. },
  12541. "due_on": {
  12542. "type": "string",
  12543. "format": "date-time",
  12544. "x-go-name": "Deadline"
  12545. },
  12546. "id": {
  12547. "type": "integer",
  12548. "format": "int64",
  12549. "x-go-name": "ID"
  12550. },
  12551. "open_issues": {
  12552. "type": "integer",
  12553. "format": "int64",
  12554. "x-go-name": "OpenIssues"
  12555. },
  12556. "state": {
  12557. "$ref": "#/definitions/StateType"
  12558. },
  12559. "title": {
  12560. "type": "string",
  12561. "x-go-name": "Title"
  12562. }
  12563. },
  12564. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12565. },
  12566. "NotificationCount": {
  12567. "description": "NotificationCount number of unread notifications",
  12568. "type": "object",
  12569. "properties": {
  12570. "new": {
  12571. "type": "integer",
  12572. "format": "int64",
  12573. "x-go-name": "New"
  12574. }
  12575. },
  12576. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12577. },
  12578. "NotificationSubject": {
  12579. "description": "NotificationSubject contains the notification subject (Issue/Pull/Commit)",
  12580. "type": "object",
  12581. "properties": {
  12582. "latest_comment_url": {
  12583. "type": "string",
  12584. "x-go-name": "LatestCommentURL"
  12585. },
  12586. "title": {
  12587. "type": "string",
  12588. "x-go-name": "Title"
  12589. },
  12590. "type": {
  12591. "type": "string",
  12592. "x-go-name": "Type"
  12593. },
  12594. "url": {
  12595. "type": "string",
  12596. "x-go-name": "URL"
  12597. }
  12598. },
  12599. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12600. },
  12601. "NotificationThread": {
  12602. "description": "NotificationThread expose Notification on API",
  12603. "type": "object",
  12604. "properties": {
  12605. "id": {
  12606. "type": "integer",
  12607. "format": "int64",
  12608. "x-go-name": "ID"
  12609. },
  12610. "pinned": {
  12611. "type": "boolean",
  12612. "x-go-name": "Pinned"
  12613. },
  12614. "repository": {
  12615. "$ref": "#/definitions/Repository"
  12616. },
  12617. "subject": {
  12618. "$ref": "#/definitions/NotificationSubject"
  12619. },
  12620. "unread": {
  12621. "type": "boolean",
  12622. "x-go-name": "Unread"
  12623. },
  12624. "updated_at": {
  12625. "type": "string",
  12626. "format": "date-time",
  12627. "x-go-name": "UpdatedAt"
  12628. },
  12629. "url": {
  12630. "type": "string",
  12631. "x-go-name": "URL"
  12632. }
  12633. },
  12634. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12635. },
  12636. "OAuth2Application": {
  12637. "type": "object",
  12638. "title": "OAuth2Application represents an OAuth2 application.",
  12639. "properties": {
  12640. "client_id": {
  12641. "type": "string",
  12642. "x-go-name": "ClientID"
  12643. },
  12644. "client_secret": {
  12645. "type": "string",
  12646. "x-go-name": "ClientSecret"
  12647. },
  12648. "created": {
  12649. "type": "string",
  12650. "format": "date-time",
  12651. "x-go-name": "Created"
  12652. },
  12653. "id": {
  12654. "type": "integer",
  12655. "format": "int64",
  12656. "x-go-name": "ID"
  12657. },
  12658. "name": {
  12659. "type": "string",
  12660. "x-go-name": "Name"
  12661. },
  12662. "redirect_uris": {
  12663. "type": "array",
  12664. "items": {
  12665. "type": "string"
  12666. },
  12667. "x-go-name": "RedirectURIs"
  12668. }
  12669. },
  12670. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12671. },
  12672. "Organization": {
  12673. "description": "Organization represents an organization",
  12674. "type": "object",
  12675. "properties": {
  12676. "avatar_url": {
  12677. "type": "string",
  12678. "x-go-name": "AvatarURL"
  12679. },
  12680. "description": {
  12681. "type": "string",
  12682. "x-go-name": "Description"
  12683. },
  12684. "full_name": {
  12685. "type": "string",
  12686. "x-go-name": "FullName"
  12687. },
  12688. "id": {
  12689. "type": "integer",
  12690. "format": "int64",
  12691. "x-go-name": "ID"
  12692. },
  12693. "location": {
  12694. "type": "string",
  12695. "x-go-name": "Location"
  12696. },
  12697. "repo_admin_change_team_access": {
  12698. "type": "boolean",
  12699. "x-go-name": "RepoAdminChangeTeamAccess"
  12700. },
  12701. "username": {
  12702. "type": "string",
  12703. "x-go-name": "UserName"
  12704. },
  12705. "visibility": {
  12706. "type": "string",
  12707. "x-go-name": "Visibility"
  12708. },
  12709. "website": {
  12710. "type": "string",
  12711. "x-go-name": "Website"
  12712. }
  12713. },
  12714. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12715. },
  12716. "PRBranchInfo": {
  12717. "description": "PRBranchInfo information about a branch",
  12718. "type": "object",
  12719. "properties": {
  12720. "label": {
  12721. "type": "string",
  12722. "x-go-name": "Name"
  12723. },
  12724. "ref": {
  12725. "type": "string",
  12726. "x-go-name": "Ref"
  12727. },
  12728. "repo": {
  12729. "$ref": "#/definitions/Repository"
  12730. },
  12731. "repo_id": {
  12732. "type": "integer",
  12733. "format": "int64",
  12734. "x-go-name": "RepoID"
  12735. },
  12736. "sha": {
  12737. "type": "string",
  12738. "x-go-name": "Sha"
  12739. }
  12740. },
  12741. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12742. },
  12743. "PayloadCommit": {
  12744. "description": "PayloadCommit represents a commit",
  12745. "type": "object",
  12746. "properties": {
  12747. "added": {
  12748. "type": "array",
  12749. "items": {
  12750. "type": "string"
  12751. },
  12752. "x-go-name": "Added"
  12753. },
  12754. "author": {
  12755. "$ref": "#/definitions/PayloadUser"
  12756. },
  12757. "committer": {
  12758. "$ref": "#/definitions/PayloadUser"
  12759. },
  12760. "id": {
  12761. "description": "sha1 hash of the commit",
  12762. "type": "string",
  12763. "x-go-name": "ID"
  12764. },
  12765. "message": {
  12766. "type": "string",
  12767. "x-go-name": "Message"
  12768. },
  12769. "modified": {
  12770. "type": "array",
  12771. "items": {
  12772. "type": "string"
  12773. },
  12774. "x-go-name": "Modified"
  12775. },
  12776. "removed": {
  12777. "type": "array",
  12778. "items": {
  12779. "type": "string"
  12780. },
  12781. "x-go-name": "Removed"
  12782. },
  12783. "timestamp": {
  12784. "type": "string",
  12785. "format": "date-time",
  12786. "x-go-name": "Timestamp"
  12787. },
  12788. "url": {
  12789. "type": "string",
  12790. "x-go-name": "URL"
  12791. },
  12792. "verification": {
  12793. "$ref": "#/definitions/PayloadCommitVerification"
  12794. }
  12795. },
  12796. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12797. },
  12798. "PayloadCommitVerification": {
  12799. "description": "PayloadCommitVerification represents the GPG verification of a commit",
  12800. "type": "object",
  12801. "properties": {
  12802. "payload": {
  12803. "type": "string",
  12804. "x-go-name": "Payload"
  12805. },
  12806. "reason": {
  12807. "type": "string",
  12808. "x-go-name": "Reason"
  12809. },
  12810. "signature": {
  12811. "type": "string",
  12812. "x-go-name": "Signature"
  12813. },
  12814. "signer": {
  12815. "$ref": "#/definitions/PayloadUser"
  12816. },
  12817. "verified": {
  12818. "type": "boolean",
  12819. "x-go-name": "Verified"
  12820. }
  12821. },
  12822. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12823. },
  12824. "PayloadUser": {
  12825. "description": "PayloadUser represents the author or committer of a commit",
  12826. "type": "object",
  12827. "properties": {
  12828. "email": {
  12829. "type": "string",
  12830. "format": "email",
  12831. "x-go-name": "Email"
  12832. },
  12833. "name": {
  12834. "description": "Full name of the commit author",
  12835. "type": "string",
  12836. "x-go-name": "Name"
  12837. },
  12838. "username": {
  12839. "type": "string",
  12840. "x-go-name": "UserName"
  12841. }
  12842. },
  12843. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12844. },
  12845. "Permission": {
  12846. "description": "Permission represents a set of permissions",
  12847. "type": "object",
  12848. "properties": {
  12849. "admin": {
  12850. "type": "boolean",
  12851. "x-go-name": "Admin"
  12852. },
  12853. "pull": {
  12854. "type": "boolean",
  12855. "x-go-name": "Pull"
  12856. },
  12857. "push": {
  12858. "type": "boolean",
  12859. "x-go-name": "Push"
  12860. }
  12861. },
  12862. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12863. },
  12864. "PublicKey": {
  12865. "description": "PublicKey publickey is a user key to push code to repository",
  12866. "type": "object",
  12867. "properties": {
  12868. "created_at": {
  12869. "type": "string",
  12870. "format": "date-time",
  12871. "x-go-name": "Created"
  12872. },
  12873. "fingerprint": {
  12874. "type": "string",
  12875. "x-go-name": "Fingerprint"
  12876. },
  12877. "id": {
  12878. "type": "integer",
  12879. "format": "int64",
  12880. "x-go-name": "ID"
  12881. },
  12882. "key": {
  12883. "type": "string",
  12884. "x-go-name": "Key"
  12885. },
  12886. "key_type": {
  12887. "type": "string",
  12888. "x-go-name": "KeyType"
  12889. },
  12890. "read_only": {
  12891. "type": "boolean",
  12892. "x-go-name": "ReadOnly"
  12893. },
  12894. "title": {
  12895. "type": "string",
  12896. "x-go-name": "Title"
  12897. },
  12898. "url": {
  12899. "type": "string",
  12900. "x-go-name": "URL"
  12901. },
  12902. "user": {
  12903. "$ref": "#/definitions/User"
  12904. }
  12905. },
  12906. "x-go-package": "code.gitea.io/gitea/modules/structs"
  12907. },
  12908. "PullRequest": {
  12909. "description": "PullRequest represents a pull request",
  12910. "type": "object",
  12911. "properties": {
  12912. "assignee": {
  12913. "$ref": "#/definitions/User"
  12914. },
  12915. "assignees": {
  12916. "type": "array",
  12917. "items": {
  12918. "$ref": "#/definitions/User"
  12919. },
  12920. "x-go-name": "Assignees"
  12921. },
  12922. "base": {
  12923. "$ref": "#/definitions/PRBranchInfo"
  12924. },
  12925. "body": {
  12926. "type": "string",
  12927. "x-go-name": "Body"
  12928. },
  12929. "closed_at": {
  12930. "type": "string",
  12931. "format": "date-time",
  12932. "x-go-name": "Closed"
  12933. },
  12934. "comments": {
  12935. "type": "integer",
  12936. "format": "int64",
  12937. "x-go-name": "Comments"
  12938. },
  12939. "created_at": {
  12940. "type": "string",
  12941. "format": "date-time",
  12942. "x-go-name": "Created"
  12943. },
  12944. "diff_url": {
  12945. "type": "string",
  12946. "x-go-name": "DiffURL"
  12947. },
  12948. "due_date": {
  12949. "type": "string",
  12950. "format": "date-time",
  12951. "x-go-name": "Deadline"
  12952. },
  12953. "head": {
  12954. "$ref": "#/definitions/PRBranchInfo"
  12955. },
  12956. "html_url": {
  12957. "type": "string",
  12958. "x-go-name": "HTMLURL"
  12959. },
  12960. "id": {
  12961. "type": "integer",
  12962. "format": "int64",
  12963. "x-go-name": "ID"
  12964. },
  12965. "labels": {
  12966. "type": "array",
  12967. "items": {
  12968. "$ref": "#/definitions/Label"
  12969. },
  12970. "x-go-name": "Labels"
  12971. },
  12972. "merge_base": {
  12973. "type": "string",
  12974. "x-go-name": "MergeBase"
  12975. },
  12976. "merge_commit_sha": {
  12977. "type": "string",
  12978. "x-go-name": "MergedCommitID"
  12979. },
  12980. "mergeable": {
  12981. "type": "boolean",
  12982. "x-go-name": "Mergeable"
  12983. },
  12984. "merged": {
  12985. "type": "boolean",
  12986. "x-go-name": "HasMerged"
  12987. },
  12988. "merged_at": {
  12989. "type": "string",
  12990. "format": "date-time",
  12991. "x-go-name": "Merged"
  12992. },
  12993. "merged_by": {
  12994. "$ref": "#/definitions/User"
  12995. },
  12996. "milestone": {
  12997. "$ref": "#/definitions/Milestone"
  12998. },
  12999. "number": {
  13000. "type": "integer",
  13001. "format": "int64",
  13002. "x-go-name": "Index"
  13003. },
  13004. "patch_url": {
  13005. "type": "string",
  13006. "x-go-name": "PatchURL"
  13007. },
  13008. "state": {
  13009. "$ref": "#/definitions/StateType"
  13010. },
  13011. "title": {
  13012. "type": "string",
  13013. "x-go-name": "Title"
  13014. },
  13015. "updated_at": {
  13016. "type": "string",
  13017. "format": "date-time",
  13018. "x-go-name": "Updated"
  13019. },
  13020. "url": {
  13021. "type": "string",
  13022. "x-go-name": "URL"
  13023. },
  13024. "user": {
  13025. "$ref": "#/definitions/User"
  13026. }
  13027. },
  13028. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13029. },
  13030. "PullRequestMeta": {
  13031. "description": "PullRequestMeta PR info if an issue is a PR",
  13032. "type": "object",
  13033. "properties": {
  13034. "merged": {
  13035. "type": "boolean",
  13036. "x-go-name": "HasMerged"
  13037. },
  13038. "merged_at": {
  13039. "type": "string",
  13040. "format": "date-time",
  13041. "x-go-name": "Merged"
  13042. }
  13043. },
  13044. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13045. },
  13046. "Reaction": {
  13047. "description": "Reaction contain one reaction",
  13048. "type": "object",
  13049. "properties": {
  13050. "content": {
  13051. "type": "string",
  13052. "x-go-name": "Reaction"
  13053. },
  13054. "created_at": {
  13055. "type": "string",
  13056. "format": "date-time",
  13057. "x-go-name": "Created"
  13058. },
  13059. "user": {
  13060. "$ref": "#/definitions/User"
  13061. }
  13062. },
  13063. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13064. },
  13065. "Reference": {
  13066. "type": "object",
  13067. "title": "Reference represents a Git reference.",
  13068. "properties": {
  13069. "object": {
  13070. "$ref": "#/definitions/GitObject"
  13071. },
  13072. "ref": {
  13073. "type": "string",
  13074. "x-go-name": "Ref"
  13075. },
  13076. "url": {
  13077. "type": "string",
  13078. "x-go-name": "URL"
  13079. }
  13080. },
  13081. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13082. },
  13083. "Release": {
  13084. "description": "Release represents a repository release",
  13085. "type": "object",
  13086. "properties": {
  13087. "assets": {
  13088. "type": "array",
  13089. "items": {
  13090. "$ref": "#/definitions/Attachment"
  13091. },
  13092. "x-go-name": "Attachments"
  13093. },
  13094. "author": {
  13095. "$ref": "#/definitions/User"
  13096. },
  13097. "body": {
  13098. "type": "string",
  13099. "x-go-name": "Note"
  13100. },
  13101. "created_at": {
  13102. "type": "string",
  13103. "format": "date-time",
  13104. "x-go-name": "CreatedAt"
  13105. },
  13106. "draft": {
  13107. "type": "boolean",
  13108. "x-go-name": "IsDraft"
  13109. },
  13110. "html_url": {
  13111. "type": "string",
  13112. "x-go-name": "HTMLURL"
  13113. },
  13114. "id": {
  13115. "type": "integer",
  13116. "format": "int64",
  13117. "x-go-name": "ID"
  13118. },
  13119. "name": {
  13120. "type": "string",
  13121. "x-go-name": "Title"
  13122. },
  13123. "prerelease": {
  13124. "type": "boolean",
  13125. "x-go-name": "IsPrerelease"
  13126. },
  13127. "published_at": {
  13128. "type": "string",
  13129. "format": "date-time",
  13130. "x-go-name": "PublishedAt"
  13131. },
  13132. "tag_name": {
  13133. "type": "string",
  13134. "x-go-name": "TagName"
  13135. },
  13136. "tarball_url": {
  13137. "type": "string",
  13138. "x-go-name": "TarURL"
  13139. },
  13140. "target_commitish": {
  13141. "type": "string",
  13142. "x-go-name": "Target"
  13143. },
  13144. "url": {
  13145. "type": "string",
  13146. "x-go-name": "URL"
  13147. },
  13148. "zipball_url": {
  13149. "type": "string",
  13150. "x-go-name": "ZipURL"
  13151. }
  13152. },
  13153. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13154. },
  13155. "RepoCommit": {
  13156. "type": "object",
  13157. "title": "RepoCommit contains information of a commit in the context of a repository.",
  13158. "properties": {
  13159. "author": {
  13160. "$ref": "#/definitions/CommitUser"
  13161. },
  13162. "committer": {
  13163. "$ref": "#/definitions/CommitUser"
  13164. },
  13165. "message": {
  13166. "type": "string",
  13167. "x-go-name": "Message"
  13168. },
  13169. "tree": {
  13170. "$ref": "#/definitions/CommitMeta"
  13171. },
  13172. "url": {
  13173. "type": "string",
  13174. "x-go-name": "URL"
  13175. }
  13176. },
  13177. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13178. },
  13179. "RepoTopicOptions": {
  13180. "description": "RepoTopicOptions a collection of repo topic names",
  13181. "type": "object",
  13182. "properties": {
  13183. "topics": {
  13184. "description": "list of topic names",
  13185. "type": "array",
  13186. "items": {
  13187. "type": "string"
  13188. },
  13189. "x-go-name": "Topics"
  13190. }
  13191. },
  13192. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13193. },
  13194. "Repository": {
  13195. "description": "Repository represents a repository",
  13196. "type": "object",
  13197. "properties": {
  13198. "allow_merge_commits": {
  13199. "type": "boolean",
  13200. "x-go-name": "AllowMerge"
  13201. },
  13202. "allow_rebase": {
  13203. "type": "boolean",
  13204. "x-go-name": "AllowRebase"
  13205. },
  13206. "allow_rebase_explicit": {
  13207. "type": "boolean",
  13208. "x-go-name": "AllowRebaseMerge"
  13209. },
  13210. "allow_squash_merge": {
  13211. "type": "boolean",
  13212. "x-go-name": "AllowSquash"
  13213. },
  13214. "archived": {
  13215. "type": "boolean",
  13216. "x-go-name": "Archived"
  13217. },
  13218. "avatar_url": {
  13219. "type": "string",
  13220. "x-go-name": "AvatarURL"
  13221. },
  13222. "clone_url": {
  13223. "type": "string",
  13224. "x-go-name": "CloneURL"
  13225. },
  13226. "created_at": {
  13227. "type": "string",
  13228. "format": "date-time",
  13229. "x-go-name": "Created"
  13230. },
  13231. "default_branch": {
  13232. "type": "string",
  13233. "x-go-name": "DefaultBranch"
  13234. },
  13235. "description": {
  13236. "type": "string",
  13237. "x-go-name": "Description"
  13238. },
  13239. "empty": {
  13240. "type": "boolean",
  13241. "x-go-name": "Empty"
  13242. },
  13243. "external_tracker": {
  13244. "$ref": "#/definitions/ExternalTracker"
  13245. },
  13246. "external_wiki": {
  13247. "$ref": "#/definitions/ExternalWiki"
  13248. },
  13249. "fork": {
  13250. "type": "boolean",
  13251. "x-go-name": "Fork"
  13252. },
  13253. "forks_count": {
  13254. "type": "integer",
  13255. "format": "int64",
  13256. "x-go-name": "Forks"
  13257. },
  13258. "full_name": {
  13259. "type": "string",
  13260. "x-go-name": "FullName"
  13261. },
  13262. "has_issues": {
  13263. "type": "boolean",
  13264. "x-go-name": "HasIssues"
  13265. },
  13266. "has_pull_requests": {
  13267. "type": "boolean",
  13268. "x-go-name": "HasPullRequests"
  13269. },
  13270. "has_wiki": {
  13271. "type": "boolean",
  13272. "x-go-name": "HasWiki"
  13273. },
  13274. "html_url": {
  13275. "type": "string",
  13276. "x-go-name": "HTMLURL"
  13277. },
  13278. "id": {
  13279. "type": "integer",
  13280. "format": "int64",
  13281. "x-go-name": "ID"
  13282. },
  13283. "ignore_whitespace_conflicts": {
  13284. "type": "boolean",
  13285. "x-go-name": "IgnoreWhitespaceConflicts"
  13286. },
  13287. "internal_tracker": {
  13288. "$ref": "#/definitions/InternalTracker"
  13289. },
  13290. "mirror": {
  13291. "type": "boolean",
  13292. "x-go-name": "Mirror"
  13293. },
  13294. "name": {
  13295. "type": "string",
  13296. "x-go-name": "Name"
  13297. },
  13298. "open_issues_count": {
  13299. "type": "integer",
  13300. "format": "int64",
  13301. "x-go-name": "OpenIssues"
  13302. },
  13303. "open_pr_counter": {
  13304. "type": "integer",
  13305. "format": "int64",
  13306. "x-go-name": "OpenPulls"
  13307. },
  13308. "original_url": {
  13309. "type": "string",
  13310. "x-go-name": "OriginalURL"
  13311. },
  13312. "owner": {
  13313. "$ref": "#/definitions/User"
  13314. },
  13315. "parent": {
  13316. "$ref": "#/definitions/Repository"
  13317. },
  13318. "permissions": {
  13319. "$ref": "#/definitions/Permission"
  13320. },
  13321. "private": {
  13322. "type": "boolean",
  13323. "x-go-name": "Private"
  13324. },
  13325. "release_counter": {
  13326. "type": "integer",
  13327. "format": "int64",
  13328. "x-go-name": "Releases"
  13329. },
  13330. "size": {
  13331. "type": "integer",
  13332. "format": "int64",
  13333. "x-go-name": "Size"
  13334. },
  13335. "ssh_url": {
  13336. "type": "string",
  13337. "x-go-name": "SSHURL"
  13338. },
  13339. "stars_count": {
  13340. "type": "integer",
  13341. "format": "int64",
  13342. "x-go-name": "Stars"
  13343. },
  13344. "template": {
  13345. "type": "boolean",
  13346. "x-go-name": "Template"
  13347. },
  13348. "updated_at": {
  13349. "type": "string",
  13350. "format": "date-time",
  13351. "x-go-name": "Updated"
  13352. },
  13353. "watchers_count": {
  13354. "type": "integer",
  13355. "format": "int64",
  13356. "x-go-name": "Watchers"
  13357. },
  13358. "website": {
  13359. "type": "string",
  13360. "x-go-name": "Website"
  13361. }
  13362. },
  13363. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13364. },
  13365. "RepositoryMeta": {
  13366. "description": "RepositoryMeta basic repository information",
  13367. "type": "object",
  13368. "properties": {
  13369. "full_name": {
  13370. "type": "string",
  13371. "x-go-name": "FullName"
  13372. },
  13373. "id": {
  13374. "type": "integer",
  13375. "format": "int64",
  13376. "x-go-name": "ID"
  13377. },
  13378. "name": {
  13379. "type": "string",
  13380. "x-go-name": "Name"
  13381. },
  13382. "owner": {
  13383. "type": "string",
  13384. "x-go-name": "Owner"
  13385. }
  13386. },
  13387. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13388. },
  13389. "SearchResults": {
  13390. "description": "SearchResults results of a successful search",
  13391. "type": "object",
  13392. "properties": {
  13393. "data": {
  13394. "type": "array",
  13395. "items": {
  13396. "$ref": "#/definitions/Repository"
  13397. },
  13398. "x-go-name": "Data"
  13399. },
  13400. "ok": {
  13401. "type": "boolean",
  13402. "x-go-name": "OK"
  13403. }
  13404. },
  13405. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13406. },
  13407. "ServerVersion": {
  13408. "description": "ServerVersion wraps the version of the server",
  13409. "type": "object",
  13410. "properties": {
  13411. "version": {
  13412. "type": "string",
  13413. "x-go-name": "Version"
  13414. }
  13415. },
  13416. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13417. },
  13418. "StateType": {
  13419. "description": "StateType issue state type",
  13420. "type": "string",
  13421. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13422. },
  13423. "Status": {
  13424. "description": "Status holds a single Status of a single Commit",
  13425. "type": "object",
  13426. "properties": {
  13427. "context": {
  13428. "type": "string",
  13429. "x-go-name": "Context"
  13430. },
  13431. "created_at": {
  13432. "type": "string",
  13433. "format": "date-time",
  13434. "x-go-name": "Created"
  13435. },
  13436. "creator": {
  13437. "$ref": "#/definitions/User"
  13438. },
  13439. "description": {
  13440. "type": "string",
  13441. "x-go-name": "Description"
  13442. },
  13443. "id": {
  13444. "type": "integer",
  13445. "format": "int64",
  13446. "x-go-name": "ID"
  13447. },
  13448. "status": {
  13449. "$ref": "#/definitions/StatusState"
  13450. },
  13451. "target_url": {
  13452. "type": "string",
  13453. "x-go-name": "TargetURL"
  13454. },
  13455. "updated_at": {
  13456. "type": "string",
  13457. "format": "date-time",
  13458. "x-go-name": "Updated"
  13459. },
  13460. "url": {
  13461. "type": "string",
  13462. "x-go-name": "URL"
  13463. }
  13464. },
  13465. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13466. },
  13467. "StatusState": {
  13468. "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"",
  13469. "type": "string",
  13470. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13471. },
  13472. "StopWatch": {
  13473. "description": "StopWatch represent a running stopwatch",
  13474. "type": "object",
  13475. "properties": {
  13476. "created": {
  13477. "type": "string",
  13478. "format": "date-time",
  13479. "x-go-name": "Created"
  13480. },
  13481. "issue_index": {
  13482. "type": "integer",
  13483. "format": "int64",
  13484. "x-go-name": "IssueIndex"
  13485. }
  13486. },
  13487. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13488. },
  13489. "Tag": {
  13490. "description": "Tag represents a repository tag",
  13491. "type": "object",
  13492. "properties": {
  13493. "commit": {
  13494. "$ref": "#/definitions/CommitMeta"
  13495. },
  13496. "id": {
  13497. "type": "string",
  13498. "x-go-name": "ID"
  13499. },
  13500. "name": {
  13501. "type": "string",
  13502. "x-go-name": "Name"
  13503. },
  13504. "tarball_url": {
  13505. "type": "string",
  13506. "x-go-name": "TarballURL"
  13507. },
  13508. "zipball_url": {
  13509. "type": "string",
  13510. "x-go-name": "ZipballURL"
  13511. }
  13512. },
  13513. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13514. },
  13515. "Team": {
  13516. "description": "Team represents a team in an organization",
  13517. "type": "object",
  13518. "properties": {
  13519. "can_create_org_repo": {
  13520. "type": "boolean",
  13521. "x-go-name": "CanCreateOrgRepo"
  13522. },
  13523. "description": {
  13524. "type": "string",
  13525. "x-go-name": "Description"
  13526. },
  13527. "id": {
  13528. "type": "integer",
  13529. "format": "int64",
  13530. "x-go-name": "ID"
  13531. },
  13532. "includes_all_repositories": {
  13533. "type": "boolean",
  13534. "x-go-name": "IncludesAllRepositories"
  13535. },
  13536. "name": {
  13537. "type": "string",
  13538. "x-go-name": "Name"
  13539. },
  13540. "organization": {
  13541. "$ref": "#/definitions/Organization"
  13542. },
  13543. "permission": {
  13544. "type": "string",
  13545. "enum": [
  13546. "none",
  13547. "read",
  13548. "write",
  13549. "admin",
  13550. "owner"
  13551. ],
  13552. "x-go-name": "Permission"
  13553. },
  13554. "units": {
  13555. "type": "array",
  13556. "items": {
  13557. "type": "string"
  13558. },
  13559. "x-go-name": "Units",
  13560. "example": [
  13561. "repo.code",
  13562. "repo.issues",
  13563. "repo.ext_issues",
  13564. "repo.wiki",
  13565. "repo.pulls",
  13566. "repo.releases",
  13567. "repo.ext_wiki"
  13568. ]
  13569. }
  13570. },
  13571. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13572. },
  13573. "TimeStamp": {
  13574. "description": "TimeStamp defines a timestamp",
  13575. "type": "integer",
  13576. "format": "int64",
  13577. "x-go-package": "code.gitea.io/gitea/modules/timeutil"
  13578. },
  13579. "TopicName": {
  13580. "description": "TopicName a list of repo topic names",
  13581. "type": "object",
  13582. "properties": {
  13583. "topics": {
  13584. "type": "array",
  13585. "items": {
  13586. "type": "string"
  13587. },
  13588. "x-go-name": "TopicNames"
  13589. }
  13590. },
  13591. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13592. },
  13593. "TopicResponse": {
  13594. "description": "TopicResponse for returning topics",
  13595. "type": "object",
  13596. "properties": {
  13597. "created": {
  13598. "type": "string",
  13599. "format": "date-time",
  13600. "x-go-name": "Created"
  13601. },
  13602. "id": {
  13603. "type": "integer",
  13604. "format": "int64",
  13605. "x-go-name": "ID"
  13606. },
  13607. "repo_count": {
  13608. "type": "integer",
  13609. "format": "int64",
  13610. "x-go-name": "RepoCount"
  13611. },
  13612. "topic_name": {
  13613. "type": "string",
  13614. "x-go-name": "Name"
  13615. },
  13616. "updated": {
  13617. "type": "string",
  13618. "format": "date-time",
  13619. "x-go-name": "Updated"
  13620. }
  13621. },
  13622. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13623. },
  13624. "TrackedTime": {
  13625. "description": "TrackedTime worked time for an issue / pr",
  13626. "type": "object",
  13627. "properties": {
  13628. "created": {
  13629. "type": "string",
  13630. "format": "date-time",
  13631. "x-go-name": "Created"
  13632. },
  13633. "id": {
  13634. "type": "integer",
  13635. "format": "int64",
  13636. "x-go-name": "ID"
  13637. },
  13638. "issue": {
  13639. "$ref": "#/definitions/Issue"
  13640. },
  13641. "issue_id": {
  13642. "description": "deprecated (only for backwards compatibility)",
  13643. "type": "integer",
  13644. "format": "int64",
  13645. "x-go-name": "IssueID"
  13646. },
  13647. "time": {
  13648. "description": "Time in seconds",
  13649. "type": "integer",
  13650. "format": "int64",
  13651. "x-go-name": "Time"
  13652. },
  13653. "user_id": {
  13654. "description": "deprecated (only for backwards compatibility)",
  13655. "type": "integer",
  13656. "format": "int64",
  13657. "x-go-name": "UserID"
  13658. },
  13659. "user_name": {
  13660. "type": "string",
  13661. "x-go-name": "UserName"
  13662. }
  13663. },
  13664. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13665. },
  13666. "TransferRepoOption": {
  13667. "description": "TransferRepoOption options when transfer a repository's ownership",
  13668. "type": "object",
  13669. "required": [
  13670. "new_owner"
  13671. ],
  13672. "properties": {
  13673. "new_owner": {
  13674. "type": "string",
  13675. "x-go-name": "NewOwner"
  13676. },
  13677. "team_ids": {
  13678. "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.",
  13679. "type": "array",
  13680. "items": {
  13681. "type": "integer",
  13682. "format": "int64"
  13683. },
  13684. "x-go-name": "TeamIDs"
  13685. }
  13686. },
  13687. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13688. },
  13689. "UpdateFileOptions": {
  13690. "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)",
  13691. "type": "object",
  13692. "required": [
  13693. "sha",
  13694. "content"
  13695. ],
  13696. "properties": {
  13697. "author": {
  13698. "$ref": "#/definitions/Identity"
  13699. },
  13700. "branch": {
  13701. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  13702. "type": "string",
  13703. "x-go-name": "BranchName"
  13704. },
  13705. "committer": {
  13706. "$ref": "#/definitions/Identity"
  13707. },
  13708. "content": {
  13709. "description": "content must be base64 encoded",
  13710. "type": "string",
  13711. "x-go-name": "Content"
  13712. },
  13713. "dates": {
  13714. "$ref": "#/definitions/CommitDateOptions"
  13715. },
  13716. "from_path": {
  13717. "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL",
  13718. "type": "string",
  13719. "x-go-name": "FromPath"
  13720. },
  13721. "message": {
  13722. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  13723. "type": "string",
  13724. "x-go-name": "Message"
  13725. },
  13726. "new_branch": {
  13727. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  13728. "type": "string",
  13729. "x-go-name": "NewBranchName"
  13730. },
  13731. "sha": {
  13732. "description": "sha is the SHA for the file that already exists",
  13733. "type": "string",
  13734. "x-go-name": "SHA"
  13735. }
  13736. },
  13737. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13738. },
  13739. "User": {
  13740. "description": "User represents a user",
  13741. "type": "object",
  13742. "properties": {
  13743. "avatar_url": {
  13744. "description": "URL to the user's avatar",
  13745. "type": "string",
  13746. "x-go-name": "AvatarURL"
  13747. },
  13748. "created": {
  13749. "type": "string",
  13750. "format": "date-time",
  13751. "x-go-name": "Created"
  13752. },
  13753. "email": {
  13754. "type": "string",
  13755. "format": "email",
  13756. "x-go-name": "Email"
  13757. },
  13758. "full_name": {
  13759. "description": "the user's full name",
  13760. "type": "string",
  13761. "x-go-name": "FullName"
  13762. },
  13763. "id": {
  13764. "description": "the user's id",
  13765. "type": "integer",
  13766. "format": "int64",
  13767. "x-go-name": "ID"
  13768. },
  13769. "is_admin": {
  13770. "description": "Is the user an administrator",
  13771. "type": "boolean",
  13772. "x-go-name": "IsAdmin"
  13773. },
  13774. "language": {
  13775. "description": "User locale",
  13776. "type": "string",
  13777. "x-go-name": "Language"
  13778. },
  13779. "last_login": {
  13780. "type": "string",
  13781. "format": "date-time",
  13782. "x-go-name": "LastLogin"
  13783. },
  13784. "login": {
  13785. "description": "the user's username",
  13786. "type": "string",
  13787. "x-go-name": "UserName"
  13788. }
  13789. },
  13790. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13791. },
  13792. "UserHeatmapData": {
  13793. "description": "UserHeatmapData represents the data needed to create a heatmap",
  13794. "type": "object",
  13795. "properties": {
  13796. "contributions": {
  13797. "type": "integer",
  13798. "format": "int64",
  13799. "x-go-name": "Contributions"
  13800. },
  13801. "timestamp": {
  13802. "$ref": "#/definitions/TimeStamp"
  13803. }
  13804. },
  13805. "x-go-package": "code.gitea.io/gitea/models"
  13806. },
  13807. "WatchInfo": {
  13808. "description": "WatchInfo represents an API watch status of one repository",
  13809. "type": "object",
  13810. "properties": {
  13811. "created_at": {
  13812. "type": "string",
  13813. "format": "date-time",
  13814. "x-go-name": "CreatedAt"
  13815. },
  13816. "ignored": {
  13817. "type": "boolean",
  13818. "x-go-name": "Ignored"
  13819. },
  13820. "reason": {
  13821. "type": "object",
  13822. "x-go-name": "Reason"
  13823. },
  13824. "repository_url": {
  13825. "type": "string",
  13826. "x-go-name": "RepositoryURL"
  13827. },
  13828. "subscribed": {
  13829. "type": "boolean",
  13830. "x-go-name": "Subscribed"
  13831. },
  13832. "url": {
  13833. "type": "string",
  13834. "x-go-name": "URL"
  13835. }
  13836. },
  13837. "x-go-package": "code.gitea.io/gitea/modules/structs"
  13838. }
  13839. },
  13840. "responses": {
  13841. "AccessToken": {
  13842. "description": "AccessToken represents an API access token.",
  13843. "headers": {
  13844. "id": {
  13845. "type": "integer",
  13846. "format": "int64"
  13847. },
  13848. "name": {
  13849. "type": "string"
  13850. },
  13851. "sha1": {
  13852. "type": "string"
  13853. },
  13854. "token_last_eight": {
  13855. "type": "string"
  13856. }
  13857. }
  13858. },
  13859. "AccessTokenList": {
  13860. "description": "AccessTokenList represents a list of API access token.",
  13861. "schema": {
  13862. "type": "array",
  13863. "items": {
  13864. "$ref": "#/definitions/AccessToken"
  13865. }
  13866. }
  13867. },
  13868. "AnnotatedTag": {
  13869. "description": "AnnotatedTag",
  13870. "schema": {
  13871. "$ref": "#/definitions/AnnotatedTag"
  13872. }
  13873. },
  13874. "Attachment": {
  13875. "description": "Attachment",
  13876. "schema": {
  13877. "$ref": "#/definitions/Attachment"
  13878. }
  13879. },
  13880. "AttachmentList": {
  13881. "description": "AttachmentList",
  13882. "schema": {
  13883. "type": "array",
  13884. "items": {
  13885. "$ref": "#/definitions/Attachment"
  13886. }
  13887. }
  13888. },
  13889. "Branch": {
  13890. "description": "Branch",
  13891. "schema": {
  13892. "$ref": "#/definitions/Branch"
  13893. }
  13894. },
  13895. "BranchList": {
  13896. "description": "BranchList",
  13897. "schema": {
  13898. "type": "array",
  13899. "items": {
  13900. "$ref": "#/definitions/Branch"
  13901. }
  13902. }
  13903. },
  13904. "BranchProtection": {
  13905. "description": "BranchProtection",
  13906. "schema": {
  13907. "$ref": "#/definitions/BranchProtection"
  13908. }
  13909. },
  13910. "BranchProtectionList": {
  13911. "description": "BranchProtectionList",
  13912. "schema": {
  13913. "type": "array",
  13914. "items": {
  13915. "$ref": "#/definitions/BranchProtection"
  13916. }
  13917. }
  13918. },
  13919. "Comment": {
  13920. "description": "Comment",
  13921. "schema": {
  13922. "$ref": "#/definitions/Comment"
  13923. }
  13924. },
  13925. "CommentList": {
  13926. "description": "CommentList",
  13927. "schema": {
  13928. "type": "array",
  13929. "items": {
  13930. "$ref": "#/definitions/Comment"
  13931. }
  13932. }
  13933. },
  13934. "Commit": {
  13935. "description": "Commit",
  13936. "schema": {
  13937. "$ref": "#/definitions/Commit"
  13938. }
  13939. },
  13940. "CommitList": {
  13941. "description": "CommitList",
  13942. "schema": {
  13943. "type": "array",
  13944. "items": {
  13945. "$ref": "#/definitions/Commit"
  13946. }
  13947. },
  13948. "headers": {
  13949. "X-HasMore": {
  13950. "type": "boolean",
  13951. "description": "True if there is another page"
  13952. },
  13953. "X-Page": {
  13954. "type": "integer",
  13955. "format": "int64",
  13956. "description": "The current page"
  13957. },
  13958. "X-PageCount": {
  13959. "type": "integer",
  13960. "format": "int64",
  13961. "description": "Total number of pages"
  13962. },
  13963. "X-PerPage": {
  13964. "type": "integer",
  13965. "format": "int64",
  13966. "description": "Commits per page"
  13967. },
  13968. "X-Total": {
  13969. "type": "integer",
  13970. "format": "int64",
  13971. "description": "Total commit count"
  13972. }
  13973. }
  13974. },
  13975. "ContentsListResponse": {
  13976. "description": "ContentsListResponse",
  13977. "schema": {
  13978. "type": "array",
  13979. "items": {
  13980. "$ref": "#/definitions/ContentsResponse"
  13981. }
  13982. }
  13983. },
  13984. "ContentsResponse": {
  13985. "description": "ContentsResponse",
  13986. "schema": {
  13987. "$ref": "#/definitions/ContentsResponse"
  13988. }
  13989. },
  13990. "DeployKey": {
  13991. "description": "DeployKey",
  13992. "schema": {
  13993. "$ref": "#/definitions/DeployKey"
  13994. }
  13995. },
  13996. "DeployKeyList": {
  13997. "description": "DeployKeyList",
  13998. "schema": {
  13999. "type": "array",
  14000. "items": {
  14001. "$ref": "#/definitions/DeployKey"
  14002. }
  14003. }
  14004. },
  14005. "EmailList": {
  14006. "description": "EmailList",
  14007. "schema": {
  14008. "type": "array",
  14009. "items": {
  14010. "$ref": "#/definitions/Email"
  14011. }
  14012. }
  14013. },
  14014. "EmptyRepository": {
  14015. "description": "EmptyRepository",
  14016. "schema": {
  14017. "$ref": "#/definitions/APIError"
  14018. }
  14019. },
  14020. "FileDeleteResponse": {
  14021. "description": "FileDeleteResponse",
  14022. "schema": {
  14023. "$ref": "#/definitions/FileDeleteResponse"
  14024. }
  14025. },
  14026. "FileResponse": {
  14027. "description": "FileResponse",
  14028. "schema": {
  14029. "$ref": "#/definitions/FileResponse"
  14030. }
  14031. },
  14032. "GPGKey": {
  14033. "description": "GPGKey",
  14034. "schema": {
  14035. "$ref": "#/definitions/GPGKey"
  14036. }
  14037. },
  14038. "GPGKeyList": {
  14039. "description": "GPGKeyList",
  14040. "schema": {
  14041. "type": "array",
  14042. "items": {
  14043. "$ref": "#/definitions/GPGKey"
  14044. }
  14045. }
  14046. },
  14047. "GitBlobResponse": {
  14048. "description": "GitBlobResponse",
  14049. "schema": {
  14050. "$ref": "#/definitions/GitBlobResponse"
  14051. }
  14052. },
  14053. "GitHook": {
  14054. "description": "GitHook",
  14055. "schema": {
  14056. "$ref": "#/definitions/GitHook"
  14057. }
  14058. },
  14059. "GitHookList": {
  14060. "description": "GitHookList",
  14061. "schema": {
  14062. "type": "array",
  14063. "items": {
  14064. "$ref": "#/definitions/GitHook"
  14065. }
  14066. }
  14067. },
  14068. "GitTreeResponse": {
  14069. "description": "GitTreeResponse",
  14070. "schema": {
  14071. "$ref": "#/definitions/GitTreeResponse"
  14072. }
  14073. },
  14074. "Hook": {
  14075. "description": "Hook",
  14076. "schema": {
  14077. "$ref": "#/definitions/Hook"
  14078. }
  14079. },
  14080. "HookList": {
  14081. "description": "HookList",
  14082. "schema": {
  14083. "type": "array",
  14084. "items": {
  14085. "$ref": "#/definitions/Hook"
  14086. }
  14087. }
  14088. },
  14089. "Issue": {
  14090. "description": "Issue",
  14091. "schema": {
  14092. "$ref": "#/definitions/Issue"
  14093. }
  14094. },
  14095. "IssueDeadline": {
  14096. "description": "IssueDeadline",
  14097. "schema": {
  14098. "$ref": "#/definitions/IssueDeadline"
  14099. }
  14100. },
  14101. "IssueList": {
  14102. "description": "IssueList",
  14103. "schema": {
  14104. "type": "array",
  14105. "items": {
  14106. "$ref": "#/definitions/Issue"
  14107. }
  14108. }
  14109. },
  14110. "Label": {
  14111. "description": "Label",
  14112. "schema": {
  14113. "$ref": "#/definitions/Label"
  14114. }
  14115. },
  14116. "LabelList": {
  14117. "description": "LabelList",
  14118. "schema": {
  14119. "type": "array",
  14120. "items": {
  14121. "$ref": "#/definitions/Label"
  14122. }
  14123. }
  14124. },
  14125. "MarkdownRender": {
  14126. "description": "MarkdownRender is a rendered markdown document",
  14127. "schema": {
  14128. "type": "string"
  14129. }
  14130. },
  14131. "Milestone": {
  14132. "description": "Milestone",
  14133. "schema": {
  14134. "$ref": "#/definitions/Milestone"
  14135. }
  14136. },
  14137. "MilestoneList": {
  14138. "description": "MilestoneList",
  14139. "schema": {
  14140. "type": "array",
  14141. "items": {
  14142. "$ref": "#/definitions/Milestone"
  14143. }
  14144. }
  14145. },
  14146. "NotificationCount": {
  14147. "description": "Number of unread notifications",
  14148. "schema": {
  14149. "$ref": "#/definitions/NotificationCount"
  14150. }
  14151. },
  14152. "NotificationThread": {
  14153. "description": "NotificationThread",
  14154. "schema": {
  14155. "$ref": "#/definitions/NotificationThread"
  14156. }
  14157. },
  14158. "NotificationThreadList": {
  14159. "description": "NotificationThreadList",
  14160. "schema": {
  14161. "type": "array",
  14162. "items": {
  14163. "$ref": "#/definitions/NotificationThread"
  14164. }
  14165. }
  14166. },
  14167. "OAuth2Application": {
  14168. "description": "OAuth2Application",
  14169. "schema": {
  14170. "$ref": "#/definitions/OAuth2Application"
  14171. }
  14172. },
  14173. "OAuth2ApplicationList": {
  14174. "description": "OAuth2ApplicationList represents a list of OAuth2 applications.",
  14175. "schema": {
  14176. "type": "array",
  14177. "items": {
  14178. "$ref": "#/definitions/OAuth2Application"
  14179. }
  14180. }
  14181. },
  14182. "Organization": {
  14183. "description": "Organization",
  14184. "schema": {
  14185. "$ref": "#/definitions/Organization"
  14186. }
  14187. },
  14188. "OrganizationList": {
  14189. "description": "OrganizationList",
  14190. "schema": {
  14191. "type": "array",
  14192. "items": {
  14193. "$ref": "#/definitions/Organization"
  14194. }
  14195. }
  14196. },
  14197. "PublicKey": {
  14198. "description": "PublicKey",
  14199. "schema": {
  14200. "$ref": "#/definitions/PublicKey"
  14201. }
  14202. },
  14203. "PublicKeyList": {
  14204. "description": "PublicKeyList",
  14205. "schema": {
  14206. "type": "array",
  14207. "items": {
  14208. "$ref": "#/definitions/PublicKey"
  14209. }
  14210. }
  14211. },
  14212. "PullRequest": {
  14213. "description": "PullRequest",
  14214. "schema": {
  14215. "$ref": "#/definitions/PullRequest"
  14216. }
  14217. },
  14218. "PullRequestList": {
  14219. "description": "PullRequestList",
  14220. "schema": {
  14221. "type": "array",
  14222. "items": {
  14223. "$ref": "#/definitions/PullRequest"
  14224. }
  14225. }
  14226. },
  14227. "Reaction": {
  14228. "description": "Reaction",
  14229. "schema": {
  14230. "$ref": "#/definitions/Reaction"
  14231. }
  14232. },
  14233. "ReactionList": {
  14234. "description": "ReactionList",
  14235. "schema": {
  14236. "type": "array",
  14237. "items": {
  14238. "$ref": "#/definitions/Reaction"
  14239. }
  14240. }
  14241. },
  14242. "Reference": {
  14243. "description": "Reference",
  14244. "schema": {
  14245. "$ref": "#/definitions/Reference"
  14246. }
  14247. },
  14248. "ReferenceList": {
  14249. "description": "ReferenceList",
  14250. "schema": {
  14251. "type": "array",
  14252. "items": {
  14253. "$ref": "#/definitions/Reference"
  14254. }
  14255. }
  14256. },
  14257. "Release": {
  14258. "description": "Release",
  14259. "schema": {
  14260. "$ref": "#/definitions/Release"
  14261. }
  14262. },
  14263. "ReleaseList": {
  14264. "description": "ReleaseList",
  14265. "schema": {
  14266. "type": "array",
  14267. "items": {
  14268. "$ref": "#/definitions/Release"
  14269. }
  14270. }
  14271. },
  14272. "Repository": {
  14273. "description": "Repository",
  14274. "schema": {
  14275. "$ref": "#/definitions/Repository"
  14276. }
  14277. },
  14278. "RepositoryList": {
  14279. "description": "RepositoryList",
  14280. "schema": {
  14281. "type": "array",
  14282. "items": {
  14283. "$ref": "#/definitions/Repository"
  14284. }
  14285. }
  14286. },
  14287. "SearchResults": {
  14288. "description": "SearchResults",
  14289. "schema": {
  14290. "$ref": "#/definitions/SearchResults"
  14291. }
  14292. },
  14293. "ServerVersion": {
  14294. "description": "ServerVersion",
  14295. "schema": {
  14296. "$ref": "#/definitions/ServerVersion"
  14297. }
  14298. },
  14299. "Status": {
  14300. "description": "Status",
  14301. "schema": {
  14302. "$ref": "#/definitions/Status"
  14303. }
  14304. },
  14305. "StatusList": {
  14306. "description": "StatusList",
  14307. "schema": {
  14308. "type": "array",
  14309. "items": {
  14310. "$ref": "#/definitions/Status"
  14311. }
  14312. }
  14313. },
  14314. "StopWatch": {
  14315. "description": "StopWatch",
  14316. "schema": {
  14317. "$ref": "#/definitions/StopWatch"
  14318. }
  14319. },
  14320. "StopWatchList": {
  14321. "description": "StopWatchList",
  14322. "schema": {
  14323. "type": "array",
  14324. "items": {
  14325. "$ref": "#/definitions/StopWatch"
  14326. }
  14327. }
  14328. },
  14329. "Tag": {
  14330. "description": "Tag",
  14331. "schema": {
  14332. "$ref": "#/definitions/Tag"
  14333. }
  14334. },
  14335. "TagList": {
  14336. "description": "TagList",
  14337. "schema": {
  14338. "type": "array",
  14339. "items": {
  14340. "$ref": "#/definitions/Tag"
  14341. }
  14342. }
  14343. },
  14344. "Team": {
  14345. "description": "Team",
  14346. "schema": {
  14347. "$ref": "#/definitions/Team"
  14348. }
  14349. },
  14350. "TeamList": {
  14351. "description": "TeamList",
  14352. "schema": {
  14353. "type": "array",
  14354. "items": {
  14355. "$ref": "#/definitions/Team"
  14356. }
  14357. }
  14358. },
  14359. "TopicListResponse": {
  14360. "description": "TopicListResponse",
  14361. "schema": {
  14362. "type": "array",
  14363. "items": {
  14364. "$ref": "#/definitions/TopicResponse"
  14365. }
  14366. }
  14367. },
  14368. "TopicNames": {
  14369. "description": "TopicNames",
  14370. "schema": {
  14371. "$ref": "#/definitions/TopicName"
  14372. }
  14373. },
  14374. "TrackedTime": {
  14375. "description": "TrackedTime",
  14376. "schema": {
  14377. "$ref": "#/definitions/TrackedTime"
  14378. }
  14379. },
  14380. "TrackedTimeList": {
  14381. "description": "TrackedTimeList",
  14382. "schema": {
  14383. "type": "array",
  14384. "items": {
  14385. "$ref": "#/definitions/TrackedTime"
  14386. }
  14387. }
  14388. },
  14389. "User": {
  14390. "description": "User",
  14391. "schema": {
  14392. "$ref": "#/definitions/User"
  14393. }
  14394. },
  14395. "UserHeatmapData": {
  14396. "description": "UserHeatmapData",
  14397. "schema": {
  14398. "type": "array",
  14399. "items": {
  14400. "$ref": "#/definitions/UserHeatmapData"
  14401. }
  14402. }
  14403. },
  14404. "UserList": {
  14405. "description": "UserList",
  14406. "schema": {
  14407. "type": "array",
  14408. "items": {
  14409. "$ref": "#/definitions/User"
  14410. }
  14411. }
  14412. },
  14413. "WatchInfo": {
  14414. "description": "WatchInfo",
  14415. "schema": {
  14416. "$ref": "#/definitions/WatchInfo"
  14417. }
  14418. },
  14419. "empty": {
  14420. "description": "APIEmpty is an empty response"
  14421. },
  14422. "error": {
  14423. "description": "APIError is error format response",
  14424. "headers": {
  14425. "message": {
  14426. "type": "string"
  14427. },
  14428. "url": {
  14429. "type": "string"
  14430. }
  14431. }
  14432. },
  14433. "forbidden": {
  14434. "description": "APIForbiddenError is a forbidden error response",
  14435. "headers": {
  14436. "message": {
  14437. "type": "string"
  14438. },
  14439. "url": {
  14440. "type": "string"
  14441. }
  14442. }
  14443. },
  14444. "invalidTopicsError": {
  14445. "description": "APIInvalidTopicsError is error format response to invalid topics",
  14446. "headers": {
  14447. "invalidTopics": {
  14448. "type": "array",
  14449. "items": {
  14450. "type": "string"
  14451. }
  14452. },
  14453. "message": {
  14454. "type": "string"
  14455. }
  14456. }
  14457. },
  14458. "notFound": {
  14459. "description": "APINotFound is a not found empty response"
  14460. },
  14461. "parameterBodies": {
  14462. "description": "parameterBodies",
  14463. "schema": {
  14464. "$ref": "#/definitions/CreateOAuth2ApplicationOptions"
  14465. }
  14466. },
  14467. "redirect": {
  14468. "description": "APIRedirect is a redirect response"
  14469. },
  14470. "validationError": {
  14471. "description": "APIValidationError is error format response related to input validation",
  14472. "headers": {
  14473. "message": {
  14474. "type": "string"
  14475. },
  14476. "url": {
  14477. "type": "string"
  14478. }
  14479. }
  14480. }
  14481. },
  14482. "securityDefinitions": {
  14483. "AccessToken": {
  14484. "type": "apiKey",
  14485. "name": "access_token",
  14486. "in": "query"
  14487. },
  14488. "AuthorizationHeaderToken": {
  14489. "description": "API tokens must be prepended with \"token\" followed by a space.",
  14490. "type": "apiKey",
  14491. "name": "Authorization",
  14492. "in": "header"
  14493. },
  14494. "BasicAuth": {
  14495. "type": "basic"
  14496. },
  14497. "SudoHeader": {
  14498. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  14499. "type": "apiKey",
  14500. "name": "Sudo",
  14501. "in": "header"
  14502. },
  14503. "SudoParam": {
  14504. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  14505. "type": "apiKey",
  14506. "name": "sudo",
  14507. "in": "query"
  14508. },
  14509. "Token": {
  14510. "type": "apiKey",
  14511. "name": "token",
  14512. "in": "query"
  14513. }
  14514. },
  14515. "security": [
  14516. {
  14517. "BasicAuth": []
  14518. },
  14519. {
  14520. "Token": []
  14521. },
  14522. {
  14523. "AccessToken": []
  14524. },
  14525. {
  14526. "AuthorizationHeaderToken": []
  14527. },
  14528. {
  14529. "SudoParam": []
  14530. },
  14531. {
  14532. "SudoHeader": []
  14533. }
  14534. ]
  14535. }