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

v1_json.tmpl 281KB

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