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

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