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

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