Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

swagger.v1.json 66KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961
  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 provide API interface to communicate with this Gitea instance.",
  17. "title": "Gitea API.",
  18. "termsOfService": "there are no TOS at this moment, use at your own risk we take no responsibility",
  19. "license": {
  20. "name": "MIT",
  21. "url": "http://opensource.org/licenses/MIT"
  22. },
  23. "version": "1.1.1"
  24. },
  25. "basePath": "/api/v1",
  26. "paths": {
  27. "/admin/users": {
  28. "post": {
  29. "consumes": [
  30. "application/json"
  31. ],
  32. "produces": [
  33. "application/json"
  34. ],
  35. "tags": [
  36. "admin"
  37. ],
  38. "operationId": "adminCreateUser",
  39. "parameters": [
  40. {
  41. "x-go-name": "SourceID",
  42. "name": "source_id",
  43. "in": "body",
  44. "schema": {
  45. "type": "integer",
  46. "format": "int64"
  47. }
  48. },
  49. {
  50. "x-go-name": "LoginName",
  51. "name": "login_name",
  52. "in": "body",
  53. "schema": {
  54. "type": "string"
  55. }
  56. },
  57. {
  58. "x-go-name": "Username",
  59. "name": "username",
  60. "in": "body",
  61. "schema": {
  62. "type": "string"
  63. }
  64. },
  65. {
  66. "x-go-name": "FullName",
  67. "name": "full_name",
  68. "in": "body",
  69. "schema": {
  70. "type": "string"
  71. }
  72. },
  73. {
  74. "x-go-name": "Email",
  75. "name": "email",
  76. "in": "body",
  77. "schema": {
  78. "type": "string"
  79. }
  80. },
  81. {
  82. "x-go-name": "Password",
  83. "name": "password",
  84. "in": "body",
  85. "schema": {
  86. "type": "string"
  87. }
  88. },
  89. {
  90. "x-go-name": "SendNotify",
  91. "name": "send_notify",
  92. "in": "body",
  93. "schema": {
  94. "type": "boolean"
  95. }
  96. }
  97. ],
  98. "responses": {
  99. "201": {
  100. "$ref": "#/responses/User"
  101. },
  102. "403": {
  103. "$ref": "#/responses/forbidden"
  104. },
  105. "422": {
  106. "$ref": "#/responses/validationError"
  107. },
  108. "500": {
  109. "$ref": "#/responses/error"
  110. }
  111. }
  112. }
  113. },
  114. "/admin/users/{username}": {
  115. "delete": {
  116. "produces": [
  117. "application/json"
  118. ],
  119. "tags": [
  120. "admin"
  121. ],
  122. "operationId": "adminDeleteUser",
  123. "responses": {
  124. "204": {
  125. "$ref": "#/responses/empty"
  126. },
  127. "403": {
  128. "$ref": "#/responses/forbidden"
  129. },
  130. "422": {
  131. "$ref": "#/responses/validationError"
  132. },
  133. "500": {
  134. "$ref": "#/responses/error"
  135. }
  136. }
  137. },
  138. "patch": {
  139. "consumes": [
  140. "application/json"
  141. ],
  142. "produces": [
  143. "application/json"
  144. ],
  145. "tags": [
  146. "admin"
  147. ],
  148. "operationId": "adminEditUser",
  149. "parameters": [
  150. {
  151. "x-go-name": "SourceID",
  152. "name": "source_id",
  153. "in": "body",
  154. "schema": {
  155. "type": "integer",
  156. "format": "int64"
  157. }
  158. },
  159. {
  160. "x-go-name": "LoginName",
  161. "name": "login_name",
  162. "in": "body",
  163. "schema": {
  164. "type": "string"
  165. }
  166. },
  167. {
  168. "x-go-name": "FullName",
  169. "name": "full_name",
  170. "in": "body",
  171. "schema": {
  172. "type": "string"
  173. }
  174. },
  175. {
  176. "x-go-name": "Email",
  177. "name": "email",
  178. "in": "body",
  179. "schema": {
  180. "type": "string"
  181. }
  182. },
  183. {
  184. "x-go-name": "Password",
  185. "name": "password",
  186. "in": "body",
  187. "schema": {
  188. "type": "string"
  189. }
  190. },
  191. {
  192. "x-go-name": "Website",
  193. "name": "website",
  194. "in": "body",
  195. "schema": {
  196. "type": "string"
  197. }
  198. },
  199. {
  200. "x-go-name": "Location",
  201. "name": "location",
  202. "in": "body",
  203. "schema": {
  204. "type": "string"
  205. }
  206. },
  207. {
  208. "x-go-name": "Active",
  209. "name": "active",
  210. "in": "body",
  211. "schema": {
  212. "type": "boolean"
  213. }
  214. },
  215. {
  216. "x-go-name": "Admin",
  217. "name": "admin",
  218. "in": "body",
  219. "schema": {
  220. "type": "boolean"
  221. }
  222. },
  223. {
  224. "x-go-name": "AllowGitHook",
  225. "name": "allow_git_hook",
  226. "in": "body",
  227. "schema": {
  228. "type": "boolean"
  229. }
  230. },
  231. {
  232. "x-go-name": "AllowImportLocal",
  233. "name": "allow_import_local",
  234. "in": "body",
  235. "schema": {
  236. "type": "boolean"
  237. }
  238. },
  239. {
  240. "x-go-name": "MaxRepoCreation",
  241. "name": "max_repo_creation",
  242. "in": "body",
  243. "schema": {
  244. "type": "integer",
  245. "format": "int64"
  246. }
  247. }
  248. ],
  249. "responses": {
  250. "200": {
  251. "$ref": "#/responses/User"
  252. },
  253. "403": {
  254. "$ref": "#/responses/forbidden"
  255. },
  256. "422": {
  257. "$ref": "#/responses/validationError"
  258. },
  259. "500": {
  260. "$ref": "#/responses/error"
  261. }
  262. }
  263. }
  264. },
  265. "/admin/users/{username}/keys": {
  266. "post": {
  267. "consumes": [
  268. "application/json"
  269. ],
  270. "produces": [
  271. "application/json"
  272. ],
  273. "tags": [
  274. "admin"
  275. ],
  276. "operationId": "adminCreatePublicKey",
  277. "parameters": [
  278. {
  279. "uniqueItems": true,
  280. "x-go-name": "Title",
  281. "description": "Title of the key to add",
  282. "name": "title",
  283. "in": "body",
  284. "required": true,
  285. "schema": {
  286. "type": "string"
  287. }
  288. },
  289. {
  290. "uniqueItems": true,
  291. "x-go-name": "Key",
  292. "description": "An armored SSH key to add",
  293. "name": "key",
  294. "in": "body",
  295. "required": true,
  296. "schema": {
  297. "type": "string"
  298. }
  299. }
  300. ],
  301. "responses": {
  302. "201": {
  303. "$ref": "#/responses/PublicKey"
  304. },
  305. "403": {
  306. "$ref": "#/responses/forbidden"
  307. },
  308. "422": {
  309. "$ref": "#/responses/validationError"
  310. },
  311. "500": {
  312. "$ref": "#/responses/error"
  313. }
  314. }
  315. }
  316. },
  317. "/admin/users/{username}/orgs": {
  318. "post": {
  319. "consumes": [
  320. "application/json"
  321. ],
  322. "produces": [
  323. "application/json"
  324. ],
  325. "tags": [
  326. "admin"
  327. ],
  328. "operationId": "adminCreateOrg",
  329. "parameters": [
  330. {
  331. "x-go-name": "UserName",
  332. "name": "username",
  333. "in": "body",
  334. "schema": {
  335. "type": "string"
  336. }
  337. },
  338. {
  339. "x-go-name": "FullName",
  340. "name": "full_name",
  341. "in": "body",
  342. "schema": {
  343. "type": "string"
  344. }
  345. },
  346. {
  347. "x-go-name": "Description",
  348. "name": "description",
  349. "in": "body",
  350. "schema": {
  351. "type": "string"
  352. }
  353. },
  354. {
  355. "x-go-name": "Website",
  356. "name": "website",
  357. "in": "body",
  358. "schema": {
  359. "type": "string"
  360. }
  361. },
  362. {
  363. "x-go-name": "Location",
  364. "name": "location",
  365. "in": "body",
  366. "schema": {
  367. "type": "string"
  368. }
  369. }
  370. ],
  371. "responses": {
  372. "201": {
  373. "$ref": "#/responses/Organization"
  374. },
  375. "403": {
  376. "$ref": "#/responses/forbidden"
  377. },
  378. "422": {
  379. "$ref": "#/responses/validationError"
  380. },
  381. "500": {
  382. "$ref": "#/responses/error"
  383. }
  384. }
  385. }
  386. },
  387. "/admin/users/{username}/repos": {
  388. "post": {
  389. "consumes": [
  390. "application/json"
  391. ],
  392. "produces": [
  393. "application/json"
  394. ],
  395. "tags": [
  396. "admin"
  397. ],
  398. "operationId": "adminCreateRepo",
  399. "parameters": [
  400. {
  401. "uniqueItems": true,
  402. "x-go-name": "Name",
  403. "description": "Name of the repository to create",
  404. "name": "name",
  405. "in": "body",
  406. "schema": {
  407. "type": "string"
  408. }
  409. },
  410. {
  411. "x-go-name": "Description",
  412. "description": "Description of the repository to create",
  413. "name": "description",
  414. "in": "body",
  415. "schema": {
  416. "type": "string"
  417. }
  418. },
  419. {
  420. "x-go-name": "Private",
  421. "description": "Is the repository to create private ?",
  422. "name": "private",
  423. "in": "body",
  424. "schema": {
  425. "type": "boolean"
  426. }
  427. },
  428. {
  429. "x-go-name": "AutoInit",
  430. "description": "Init the repository to create ?",
  431. "name": "auto_init",
  432. "in": "body",
  433. "schema": {
  434. "type": "boolean"
  435. }
  436. },
  437. {
  438. "x-go-name": "Gitignores",
  439. "description": "Gitignores to use",
  440. "name": "gitignores",
  441. "in": "body",
  442. "schema": {
  443. "type": "string"
  444. }
  445. },
  446. {
  447. "x-go-name": "License",
  448. "description": "License to use",
  449. "name": "license",
  450. "in": "body",
  451. "schema": {
  452. "type": "string"
  453. }
  454. },
  455. {
  456. "x-go-name": "Readme",
  457. "description": "Readme of the repository to create",
  458. "name": "readme",
  459. "in": "body",
  460. "schema": {
  461. "type": "string"
  462. }
  463. }
  464. ],
  465. "responses": {
  466. "201": {
  467. "$ref": "#/responses/Repository"
  468. },
  469. "403": {
  470. "$ref": "#/responses/forbidden"
  471. },
  472. "422": {
  473. "$ref": "#/responses/validationError"
  474. },
  475. "500": {
  476. "$ref": "#/responses/error"
  477. }
  478. }
  479. }
  480. },
  481. "/markdown": {
  482. "post": {
  483. "consumes": [
  484. "application/json"
  485. ],
  486. "produces": [
  487. "text/html"
  488. ],
  489. "tags": [
  490. "miscellaneous"
  491. ],
  492. "operationId": "renderMarkdown",
  493. "parameters": [
  494. {
  495. "description": "Text markdown to render",
  496. "name": "Text",
  497. "in": "body",
  498. "schema": {
  499. "type": "string"
  500. }
  501. },
  502. {
  503. "description": "Mode to render",
  504. "name": "Mode",
  505. "in": "body",
  506. "schema": {
  507. "type": "string"
  508. }
  509. },
  510. {
  511. "description": "Context to render",
  512. "name": "Context",
  513. "in": "body",
  514. "schema": {
  515. "type": "string"
  516. }
  517. },
  518. {
  519. "description": "Is it a wiki page ?",
  520. "name": "Wiki",
  521. "in": "body",
  522. "schema": {
  523. "type": "boolean"
  524. }
  525. }
  526. ],
  527. "responses": {
  528. "200": {
  529. "$ref": "#/responses/MarkdownRender"
  530. },
  531. "422": {
  532. "$ref": "#/responses/validationError"
  533. }
  534. }
  535. }
  536. },
  537. "/markdown/raw": {
  538. "post": {
  539. "consumes": [
  540. "text/plain"
  541. ],
  542. "produces": [
  543. "text/html"
  544. ],
  545. "tags": [
  546. "miscellaneous"
  547. ],
  548. "operationId": "renderMarkdownRaw",
  549. "responses": {
  550. "200": {
  551. "$ref": "#/responses/MarkdownRender"
  552. },
  553. "422": {
  554. "$ref": "#/responses/validationError"
  555. }
  556. }
  557. }
  558. },
  559. "/org/{org}/repos": {
  560. "post": {
  561. "consumes": [
  562. "application/json"
  563. ],
  564. "produces": [
  565. "application/json"
  566. ],
  567. "tags": [
  568. "organization"
  569. ],
  570. "operationId": "createOrgRepo",
  571. "parameters": [
  572. {
  573. "uniqueItems": true,
  574. "x-go-name": "Name",
  575. "description": "Name of the repository to create",
  576. "name": "name",
  577. "in": "body",
  578. "schema": {
  579. "type": "string"
  580. }
  581. },
  582. {
  583. "x-go-name": "Description",
  584. "description": "Description of the repository to create",
  585. "name": "description",
  586. "in": "body",
  587. "schema": {
  588. "type": "string"
  589. }
  590. },
  591. {
  592. "x-go-name": "Private",
  593. "description": "Is the repository to create private ?",
  594. "name": "private",
  595. "in": "body",
  596. "schema": {
  597. "type": "boolean"
  598. }
  599. },
  600. {
  601. "x-go-name": "AutoInit",
  602. "description": "Init the repository to create ?",
  603. "name": "auto_init",
  604. "in": "body",
  605. "schema": {
  606. "type": "boolean"
  607. }
  608. },
  609. {
  610. "x-go-name": "Gitignores",
  611. "description": "Gitignores to use",
  612. "name": "gitignores",
  613. "in": "body",
  614. "schema": {
  615. "type": "string"
  616. }
  617. },
  618. {
  619. "x-go-name": "License",
  620. "description": "License to use",
  621. "name": "license",
  622. "in": "body",
  623. "schema": {
  624. "type": "string"
  625. }
  626. },
  627. {
  628. "x-go-name": "Readme",
  629. "description": "Readme of the repository to create",
  630. "name": "readme",
  631. "in": "body",
  632. "schema": {
  633. "type": "string"
  634. }
  635. }
  636. ],
  637. "responses": {
  638. "201": {
  639. "$ref": "#/responses/Repository"
  640. },
  641. "403": {
  642. "$ref": "#/responses/forbidden"
  643. },
  644. "422": {
  645. "$ref": "#/responses/validationError"
  646. },
  647. "500": {
  648. "$ref": "#/responses/error"
  649. }
  650. }
  651. }
  652. },
  653. "/orgs/{orgname}/hooks": {
  654. "get": {
  655. "produces": [
  656. "application/json"
  657. ],
  658. "tags": [
  659. "organization"
  660. ],
  661. "operationId": "orgListHooks",
  662. "responses": {
  663. "200": {
  664. "$ref": "#/responses/HookList"
  665. },
  666. "500": {
  667. "$ref": "#/responses/error"
  668. }
  669. }
  670. }
  671. },
  672. "/orgs/{orgname}/hooks/": {
  673. "post": {
  674. "consumes": [
  675. "application/json"
  676. ],
  677. "produces": [
  678. "application/json"
  679. ],
  680. "tags": [
  681. "organization"
  682. ],
  683. "operationId": "orgCreateHook",
  684. "parameters": [
  685. {
  686. "x-go-name": "Type",
  687. "name": "type",
  688. "in": "body",
  689. "schema": {
  690. "type": "string"
  691. }
  692. },
  693. {
  694. "x-go-name": "Config",
  695. "name": "config",
  696. "in": "body",
  697. "schema": {
  698. "type": "object",
  699. "additionalProperties": {
  700. "type": "string"
  701. }
  702. }
  703. },
  704. {
  705. "x-go-name": "Events",
  706. "name": "events",
  707. "in": "body",
  708. "schema": {
  709. "type": "array",
  710. "items": {
  711. "type": "string"
  712. }
  713. }
  714. },
  715. {
  716. "x-go-name": "Active",
  717. "name": "active",
  718. "in": "body",
  719. "schema": {
  720. "type": "boolean"
  721. }
  722. }
  723. ],
  724. "responses": {
  725. "201": {
  726. "$ref": "#/responses/Hook"
  727. },
  728. "422": {
  729. "$ref": "#/responses/validationError"
  730. },
  731. "500": {
  732. "$ref": "#/responses/error"
  733. }
  734. }
  735. }
  736. },
  737. "/orgs/{orgname}/hooks/{id}": {
  738. "get": {
  739. "produces": [
  740. "application/json"
  741. ],
  742. "tags": [
  743. "organization"
  744. ],
  745. "operationId": "orgGetHook",
  746. "responses": {
  747. "200": {
  748. "$ref": "#/responses/Hook"
  749. },
  750. "404": {
  751. "$ref": "#/responses/notFound"
  752. },
  753. "500": {
  754. "$ref": "#/responses/error"
  755. }
  756. }
  757. },
  758. "delete": {
  759. "produces": [
  760. "application/json"
  761. ],
  762. "tags": [
  763. "organization"
  764. ],
  765. "operationId": "orgDeleteHook",
  766. "responses": {
  767. "204": {
  768. "$ref": "#/responses/empty"
  769. },
  770. "404": {
  771. "$ref": "#/responses/notFound"
  772. },
  773. "500": {
  774. "$ref": "#/responses/error"
  775. }
  776. }
  777. },
  778. "patch": {
  779. "consumes": [
  780. "application/json"
  781. ],
  782. "produces": [
  783. "application/json"
  784. ],
  785. "tags": [
  786. "organization"
  787. ],
  788. "operationId": "orgEditHook",
  789. "parameters": [
  790. {
  791. "x-go-name": "Config",
  792. "name": "config",
  793. "in": "body",
  794. "schema": {
  795. "type": "object",
  796. "additionalProperties": {
  797. "type": "string"
  798. }
  799. }
  800. },
  801. {
  802. "x-go-name": "Events",
  803. "name": "events",
  804. "in": "body",
  805. "schema": {
  806. "type": "array",
  807. "items": {
  808. "type": "string"
  809. }
  810. }
  811. },
  812. {
  813. "x-go-name": "Active",
  814. "name": "active",
  815. "in": "body",
  816. "schema": {
  817. "type": "boolean"
  818. }
  819. }
  820. ],
  821. "responses": {
  822. "200": {
  823. "$ref": "#/responses/Hook"
  824. },
  825. "404": {
  826. "$ref": "#/responses/notFound"
  827. },
  828. "422": {
  829. "$ref": "#/responses/validationError"
  830. },
  831. "500": {
  832. "$ref": "#/responses/error"
  833. }
  834. }
  835. }
  836. },
  837. "/orgs/{orgname}/members": {
  838. "get": {
  839. "produces": [
  840. "application/json"
  841. ],
  842. "tags": [
  843. "organization"
  844. ],
  845. "operationId": "orgListMembers",
  846. "responses": {
  847. "200": {
  848. "$ref": "#/responses/UserList"
  849. },
  850. "500": {
  851. "$ref": "#/responses/error"
  852. }
  853. }
  854. }
  855. },
  856. "/orgs/{orgname}/members/{username}": {
  857. "get": {
  858. "produces": [
  859. "application/json"
  860. ],
  861. "tags": [
  862. "organization"
  863. ],
  864. "operationId": "orgIsMember",
  865. "responses": {
  866. "204": {
  867. "$ref": "#/responses/empty"
  868. },
  869. "302": {
  870. "$ref": "#/responses/redirect"
  871. },
  872. "404": {
  873. "$ref": "#/responses/notFound"
  874. }
  875. }
  876. },
  877. "delete": {
  878. "produces": [
  879. "application/json"
  880. ],
  881. "tags": [
  882. "organization"
  883. ],
  884. "operationId": "orgDeleteMember",
  885. "responses": {
  886. "204": {
  887. "$ref": "#/responses/empty"
  888. },
  889. "500": {
  890. "$ref": "#/responses/error"
  891. }
  892. }
  893. }
  894. },
  895. "/orgs/{orgname}/public_members": {
  896. "get": {
  897. "produces": [
  898. "application/json"
  899. ],
  900. "tags": [
  901. "organization"
  902. ],
  903. "operationId": "orgListPublicMembers",
  904. "responses": {
  905. "200": {
  906. "$ref": "#/responses/UserList"
  907. },
  908. "500": {
  909. "$ref": "#/responses/error"
  910. }
  911. }
  912. }
  913. },
  914. "/orgs/{orgname}/public_members/{username}": {
  915. "get": {
  916. "produces": [
  917. "application/json"
  918. ],
  919. "tags": [
  920. "organization"
  921. ],
  922. "operationId": "orgIsPublicMember",
  923. "responses": {
  924. "204": {
  925. "$ref": "#/responses/empty"
  926. },
  927. "404": {
  928. "$ref": "#/responses/notFound"
  929. }
  930. }
  931. },
  932. "put": {
  933. "produces": [
  934. "application/json"
  935. ],
  936. "tags": [
  937. "organization"
  938. ],
  939. "operationId": "orgPublicizeMember",
  940. "responses": {
  941. "204": {
  942. "$ref": "#/responses/empty"
  943. },
  944. "403": {
  945. "$ref": "#/responses/forbidden"
  946. },
  947. "500": {
  948. "$ref": "#/responses/error"
  949. }
  950. }
  951. },
  952. "delete": {
  953. "produces": [
  954. "application/json"
  955. ],
  956. "tags": [
  957. "organization"
  958. ],
  959. "operationId": "orgConcealMember",
  960. "responses": {
  961. "204": {
  962. "$ref": "#/responses/empty"
  963. },
  964. "403": {
  965. "$ref": "#/responses/forbidden"
  966. },
  967. "500": {
  968. "$ref": "#/responses/error"
  969. }
  970. }
  971. }
  972. },
  973. "/orgs/{orgname}/repos": {
  974. "get": {
  975. "produces": [
  976. "application/json"
  977. ],
  978. "tags": [
  979. "organization"
  980. ],
  981. "operationId": "orgListRepos",
  982. "responses": {
  983. "200": {
  984. "$ref": "#/responses/RepositoryList"
  985. },
  986. "500": {
  987. "$ref": "#/responses/error"
  988. }
  989. }
  990. }
  991. },
  992. "/repos/migrate": {
  993. "post": {
  994. "consumes": [
  995. "application/json"
  996. ],
  997. "produces": [
  998. "application/json"
  999. ],
  1000. "tags": [
  1001. "repository"
  1002. ],
  1003. "operationId": "repoMigrate",
  1004. "parameters": [
  1005. {
  1006. "x-go-name": "CloneAddr",
  1007. "name": "clone_addr",
  1008. "in": "body",
  1009. "schema": {
  1010. "type": "string"
  1011. }
  1012. },
  1013. {
  1014. "x-go-name": "AuthUsername",
  1015. "name": "auth_username",
  1016. "in": "body",
  1017. "schema": {
  1018. "type": "string"
  1019. }
  1020. },
  1021. {
  1022. "x-go-name": "AuthPassword",
  1023. "name": "auth_password",
  1024. "in": "body",
  1025. "schema": {
  1026. "type": "string"
  1027. }
  1028. },
  1029. {
  1030. "x-go-name": "UID",
  1031. "name": "uid",
  1032. "in": "body",
  1033. "schema": {
  1034. "type": "integer",
  1035. "format": "int64"
  1036. }
  1037. },
  1038. {
  1039. "x-go-name": "RepoName",
  1040. "name": "repo_name",
  1041. "in": "body",
  1042. "schema": {
  1043. "type": "string"
  1044. }
  1045. },
  1046. {
  1047. "x-go-name": "Mirror",
  1048. "name": "mirror",
  1049. "in": "body",
  1050. "schema": {
  1051. "type": "boolean"
  1052. }
  1053. },
  1054. {
  1055. "x-go-name": "Private",
  1056. "name": "private",
  1057. "in": "body",
  1058. "schema": {
  1059. "type": "boolean"
  1060. }
  1061. },
  1062. {
  1063. "x-go-name": "Description",
  1064. "name": "description",
  1065. "in": "body",
  1066. "schema": {
  1067. "type": "string"
  1068. }
  1069. }
  1070. ],
  1071. "responses": {
  1072. "201": {
  1073. "$ref": "#/responses/Repository"
  1074. },
  1075. "422": {
  1076. "$ref": "#/responses/validationError"
  1077. },
  1078. "500": {
  1079. "$ref": "#/responses/error"
  1080. }
  1081. }
  1082. }
  1083. },
  1084. "/repos/search": {
  1085. "get": {
  1086. "produces": [
  1087. "application/json"
  1088. ],
  1089. "tags": [
  1090. "repository"
  1091. ],
  1092. "operationId": "repoSearch",
  1093. "parameters": [
  1094. {
  1095. "type": "string",
  1096. "x-go-name": "Keyword",
  1097. "description": "Keyword to search",
  1098. "name": "q",
  1099. "in": "query"
  1100. },
  1101. {
  1102. "type": "integer",
  1103. "format": "int64",
  1104. "x-go-name": "OwnerID",
  1105. "description": "Repository owner to search",
  1106. "name": "uid",
  1107. "in": "query"
  1108. },
  1109. {
  1110. "type": "integer",
  1111. "format": "int64",
  1112. "x-go-name": "PageSize",
  1113. "description": "Limit of result\n\nmaximum: setting.ExplorePagingNum",
  1114. "name": "limit",
  1115. "in": "query"
  1116. },
  1117. {
  1118. "type": "string",
  1119. "x-go-name": "SearchMode",
  1120. "description": "Type of repository to search, related to owner",
  1121. "name": "mode",
  1122. "in": "query"
  1123. },
  1124. {
  1125. "type": "boolean",
  1126. "x-go-name": "OwnerExclusive",
  1127. "description": "Search only owners repositories\nHas effect only if owner is provided and mode is not \"collaborative\"",
  1128. "name": "exclusive",
  1129. "in": "query"
  1130. }
  1131. ],
  1132. "responses": {
  1133. "200": {
  1134. "$ref": "#/responses/SearchResults"
  1135. },
  1136. "422": {
  1137. "$ref": "#/responses/validationError"
  1138. },
  1139. "500": {
  1140. "$ref": "#/responses/SearchError"
  1141. }
  1142. }
  1143. }
  1144. },
  1145. "/repos/{owner}/{repo}/forks": {
  1146. "get": {
  1147. "produces": [
  1148. "application/json"
  1149. ],
  1150. "tags": [
  1151. "repository"
  1152. ],
  1153. "operationId": "listForks",
  1154. "responses": {
  1155. "200": {
  1156. "$ref": "#/responses/RepositoryList"
  1157. },
  1158. "500": {
  1159. "$ref": "#/responses/error"
  1160. }
  1161. }
  1162. },
  1163. "post": {
  1164. "produces": [
  1165. "application/json"
  1166. ],
  1167. "tags": [
  1168. "repository"
  1169. ],
  1170. "operationId": "createFork",
  1171. "parameters": [
  1172. {
  1173. "x-go-name": "Organization",
  1174. "name": "organization",
  1175. "in": "body",
  1176. "schema": {
  1177. "type": "string"
  1178. }
  1179. }
  1180. ],
  1181. "responses": {
  1182. "202": {
  1183. "$ref": "#/responses/Repository"
  1184. },
  1185. "403": {
  1186. "$ref": "#/responses/forbidden"
  1187. },
  1188. "422": {
  1189. "$ref": "#/responses/validationError"
  1190. },
  1191. "500": {
  1192. "$ref": "#/responses/error"
  1193. }
  1194. }
  1195. }
  1196. },
  1197. "/repos/{username}/{reponame}": {
  1198. "get": {
  1199. "produces": [
  1200. "application/json"
  1201. ],
  1202. "tags": [
  1203. "repository"
  1204. ],
  1205. "operationId": "repoGet",
  1206. "responses": {
  1207. "200": {
  1208. "$ref": "#/responses/Repository"
  1209. },
  1210. "500": {
  1211. "$ref": "#/responses/error"
  1212. }
  1213. }
  1214. },
  1215. "delete": {
  1216. "produces": [
  1217. "application/json"
  1218. ],
  1219. "tags": [
  1220. "repository"
  1221. ],
  1222. "operationId": "repoDelete",
  1223. "responses": {
  1224. "204": {
  1225. "$ref": "#/responses/empty"
  1226. },
  1227. "403": {
  1228. "$ref": "#/responses/forbidden"
  1229. },
  1230. "500": {
  1231. "$ref": "#/responses/error"
  1232. }
  1233. }
  1234. }
  1235. },
  1236. "/repos/{username}/{reponame}/hooks": {
  1237. "get": {
  1238. "produces": [
  1239. "application/json"
  1240. ],
  1241. "tags": [
  1242. "repository"
  1243. ],
  1244. "operationId": "repoListHooks",
  1245. "responses": {
  1246. "200": {
  1247. "$ref": "#/responses/HookList"
  1248. },
  1249. "500": {
  1250. "$ref": "#/responses/error"
  1251. }
  1252. }
  1253. },
  1254. "post": {
  1255. "consumes": [
  1256. "application/json"
  1257. ],
  1258. "produces": [
  1259. "application/json"
  1260. ],
  1261. "tags": [
  1262. "repository"
  1263. ],
  1264. "operationId": "repoCreateHook",
  1265. "parameters": [
  1266. {
  1267. "x-go-name": "Type",
  1268. "name": "type",
  1269. "in": "body",
  1270. "schema": {
  1271. "type": "string"
  1272. }
  1273. },
  1274. {
  1275. "x-go-name": "Config",
  1276. "name": "config",
  1277. "in": "body",
  1278. "schema": {
  1279. "type": "object",
  1280. "additionalProperties": {
  1281. "type": "string"
  1282. }
  1283. }
  1284. },
  1285. {
  1286. "x-go-name": "Events",
  1287. "name": "events",
  1288. "in": "body",
  1289. "schema": {
  1290. "type": "array",
  1291. "items": {
  1292. "type": "string"
  1293. }
  1294. }
  1295. },
  1296. {
  1297. "x-go-name": "Active",
  1298. "name": "active",
  1299. "in": "body",
  1300. "schema": {
  1301. "type": "boolean"
  1302. }
  1303. }
  1304. ],
  1305. "responses": {
  1306. "200": {
  1307. "$ref": "#/responses/Hook"
  1308. },
  1309. "422": {
  1310. "$ref": "#/responses/validationError"
  1311. },
  1312. "500": {
  1313. "$ref": "#/responses/error"
  1314. }
  1315. }
  1316. }
  1317. },
  1318. "/repos/{username}/{reponame}/hooks/{id}": {
  1319. "delete": {
  1320. "produces": [
  1321. "application/json"
  1322. ],
  1323. "tags": [
  1324. "repository"
  1325. ],
  1326. "operationId": "repoDeleteHook",
  1327. "responses": {
  1328. "204": {
  1329. "$ref": "#/responses/empty"
  1330. },
  1331. "404": {
  1332. "$ref": "#/responses/notFound"
  1333. },
  1334. "500": {
  1335. "$ref": "#/responses/error"
  1336. }
  1337. }
  1338. },
  1339. "patch": {
  1340. "produces": [
  1341. "application/json"
  1342. ],
  1343. "tags": [
  1344. "repository"
  1345. ],
  1346. "operationId": "repoEditHook",
  1347. "parameters": [
  1348. {
  1349. "x-go-name": "Config",
  1350. "name": "config",
  1351. "in": "body",
  1352. "schema": {
  1353. "type": "object",
  1354. "additionalProperties": {
  1355. "type": "string"
  1356. }
  1357. }
  1358. },
  1359. {
  1360. "x-go-name": "Events",
  1361. "name": "events",
  1362. "in": "body",
  1363. "schema": {
  1364. "type": "array",
  1365. "items": {
  1366. "type": "string"
  1367. }
  1368. }
  1369. },
  1370. {
  1371. "x-go-name": "Active",
  1372. "name": "active",
  1373. "in": "body",
  1374. "schema": {
  1375. "type": "boolean"
  1376. }
  1377. }
  1378. ],
  1379. "responses": {
  1380. "200": {
  1381. "$ref": "#/responses/Hook"
  1382. },
  1383. "422": {
  1384. "$ref": "#/responses/validationError"
  1385. },
  1386. "500": {
  1387. "$ref": "#/responses/error"
  1388. }
  1389. }
  1390. }
  1391. },
  1392. "/repos/{username}/{reponame}/issues/{issue}/times": {
  1393. "get": {
  1394. "produces": [
  1395. "application/json"
  1396. ],
  1397. "tags": [
  1398. "repository"
  1399. ],
  1400. "operationId": "issueTrackedTimes",
  1401. "responses": {
  1402. "200": {
  1403. "$ref": "#/responses/TrackedTimes"
  1404. },
  1405. "404": {
  1406. "$ref": "#/responses/error"
  1407. },
  1408. "500": {
  1409. "$ref": "#/responses/error"
  1410. }
  1411. }
  1412. },
  1413. "post": {
  1414. "produces": [
  1415. "application/json"
  1416. ],
  1417. "tags": [
  1418. "repository"
  1419. ],
  1420. "operationId": "addTime",
  1421. "parameters": [
  1422. {
  1423. "x-go-name": "Time",
  1424. "name": "time",
  1425. "in": "body",
  1426. "schema": {
  1427. "type": "integer",
  1428. "format": "int64"
  1429. }
  1430. }
  1431. ],
  1432. "responses": {
  1433. "200": {
  1434. "$ref": "#/responses/TrackedTime"
  1435. },
  1436. "400": {
  1437. "$ref": "#/responses/error"
  1438. },
  1439. "403": {
  1440. "$ref": "#/responses/error"
  1441. },
  1442. "404": {
  1443. "$ref": "#/responses/error"
  1444. },
  1445. "500": {
  1446. "$ref": "#/responses/error"
  1447. }
  1448. }
  1449. }
  1450. },
  1451. "/repos/{username}/{reponame}/mirror-sync": {
  1452. "post": {
  1453. "produces": [
  1454. "application/json"
  1455. ],
  1456. "tags": [
  1457. "repository"
  1458. ],
  1459. "operationId": "repoMirrorSync",
  1460. "responses": {
  1461. "200": {
  1462. "$ref": "#/responses/empty"
  1463. },
  1464. "403": {
  1465. "$ref": "#/responses/forbidden"
  1466. }
  1467. }
  1468. }
  1469. },
  1470. "/repos/{username}/{reponame}/subscription": {
  1471. "get": {
  1472. "tags": [
  1473. "repository"
  1474. ],
  1475. "operationId": "userCurrentCheckSubscription",
  1476. "responses": {
  1477. "200": {
  1478. "$ref": "#/responses/WatchInfo"
  1479. },
  1480. "404": {
  1481. "$ref": "#/responses/notFound"
  1482. }
  1483. }
  1484. },
  1485. "put": {
  1486. "tags": [
  1487. "repository"
  1488. ],
  1489. "operationId": "userCurrentPutSubscription",
  1490. "responses": {
  1491. "200": {
  1492. "$ref": "#/responses/WatchInfo"
  1493. },
  1494. "500": {
  1495. "$ref": "#/responses/error"
  1496. }
  1497. }
  1498. },
  1499. "delete": {
  1500. "tags": [
  1501. "repository"
  1502. ],
  1503. "operationId": "userCurrentDeleteSubscription",
  1504. "responses": {
  1505. "204": {
  1506. "$ref": "#/responses/empty"
  1507. },
  1508. "500": {
  1509. "$ref": "#/responses/error"
  1510. }
  1511. }
  1512. }
  1513. },
  1514. "/repos/{username}/{reponame}/times": {
  1515. "get": {
  1516. "produces": [
  1517. "application/json"
  1518. ],
  1519. "tags": [
  1520. "repository"
  1521. ],
  1522. "operationId": "repoTrackedTimes",
  1523. "responses": {
  1524. "200": {
  1525. "$ref": "#/responses/TrackedTimes"
  1526. },
  1527. "400": {
  1528. "$ref": "#/responses/error"
  1529. },
  1530. "500": {
  1531. "$ref": "#/responses/error"
  1532. }
  1533. }
  1534. }
  1535. },
  1536. "/repos/{username}/{reponame}/times/{timetrackingusername}": {
  1537. "get": {
  1538. "produces": [
  1539. "application/json"
  1540. ],
  1541. "tags": [
  1542. "user"
  1543. ],
  1544. "operationId": "userTrackedTimes",
  1545. "responses": {
  1546. "200": {
  1547. "$ref": "#/responses/TrackedTimes"
  1548. },
  1549. "400": {
  1550. "$ref": "#/responses/error"
  1551. },
  1552. "404": {
  1553. "$ref": "#/responses/error"
  1554. },
  1555. "500": {
  1556. "$ref": "#/responses/error"
  1557. }
  1558. }
  1559. }
  1560. },
  1561. "/repositories/{id}": {
  1562. "get": {
  1563. "produces": [
  1564. "application/json"
  1565. ],
  1566. "tags": [
  1567. "repository"
  1568. ],
  1569. "operationId": "repoGetByID",
  1570. "responses": {
  1571. "200": {
  1572. "$ref": "#/responses/Repository"
  1573. },
  1574. "500": {
  1575. "$ref": "#/responses/error"
  1576. }
  1577. }
  1578. }
  1579. },
  1580. "/user": {
  1581. "get": {
  1582. "produces": [
  1583. "application/json"
  1584. ],
  1585. "tags": [
  1586. "user"
  1587. ],
  1588. "operationId": "userGetCurrent",
  1589. "responses": {
  1590. "200": {
  1591. "$ref": "#/responses/User"
  1592. }
  1593. }
  1594. }
  1595. },
  1596. "/user/followers": {
  1597. "get": {
  1598. "produces": [
  1599. "application/json"
  1600. ],
  1601. "tags": [
  1602. "user"
  1603. ],
  1604. "operationId": "userCurrentListFollowers",
  1605. "responses": {
  1606. "200": {
  1607. "$ref": "#/responses/UserList"
  1608. },
  1609. "500": {
  1610. "$ref": "#/responses/error"
  1611. }
  1612. }
  1613. }
  1614. },
  1615. "/user/following": {
  1616. "get": {
  1617. "produces": [
  1618. "application/json"
  1619. ],
  1620. "tags": [
  1621. "user"
  1622. ],
  1623. "operationId": "userCurrentListFollowing",
  1624. "responses": {
  1625. "200": {
  1626. "$ref": "#/responses/UserList"
  1627. },
  1628. "500": {
  1629. "$ref": "#/responses/error"
  1630. }
  1631. }
  1632. }
  1633. },
  1634. "/user/following/{username}": {
  1635. "get": {
  1636. "tags": [
  1637. "user"
  1638. ],
  1639. "operationId": "userCurrentCheckFollowing",
  1640. "responses": {
  1641. "204": {
  1642. "$ref": "#/responses/empty"
  1643. },
  1644. "404": {
  1645. "$ref": "#/responses/notFound"
  1646. }
  1647. }
  1648. },
  1649. "put": {
  1650. "tags": [
  1651. "user"
  1652. ],
  1653. "operationId": "userCurrentPutFollow",
  1654. "responses": {
  1655. "204": {
  1656. "$ref": "#/responses/empty"
  1657. },
  1658. "500": {
  1659. "$ref": "#/responses/error"
  1660. }
  1661. }
  1662. },
  1663. "delete": {
  1664. "tags": [
  1665. "user"
  1666. ],
  1667. "operationId": "userCurrentDeleteFollow",
  1668. "responses": {
  1669. "204": {
  1670. "$ref": "#/responses/empty"
  1671. },
  1672. "500": {
  1673. "$ref": "#/responses/error"
  1674. }
  1675. }
  1676. }
  1677. },
  1678. "/user/gpg_keys": {
  1679. "get": {
  1680. "produces": [
  1681. "application/json"
  1682. ],
  1683. "tags": [
  1684. "user"
  1685. ],
  1686. "operationId": "userCurrentListGPGKeys",
  1687. "responses": {
  1688. "200": {
  1689. "$ref": "#/responses/GPGKeyList"
  1690. },
  1691. "500": {
  1692. "$ref": "#/responses/error"
  1693. }
  1694. }
  1695. },
  1696. "post": {
  1697. "consumes": [
  1698. "application/json"
  1699. ],
  1700. "produces": [
  1701. "application/json"
  1702. ],
  1703. "tags": [
  1704. "user"
  1705. ],
  1706. "operationId": "userCurrentPostGPGKey",
  1707. "parameters": [
  1708. {
  1709. "uniqueItems": true,
  1710. "x-go-name": "ArmoredKey",
  1711. "description": "An armored GPG key to add",
  1712. "name": "armored_public_key",
  1713. "in": "body",
  1714. "required": true,
  1715. "schema": {
  1716. "type": "string"
  1717. }
  1718. }
  1719. ],
  1720. "responses": {
  1721. "201": {
  1722. "$ref": "#/responses/GPGKey"
  1723. },
  1724. "422": {
  1725. "$ref": "#/responses/validationError"
  1726. },
  1727. "500": {
  1728. "$ref": "#/responses/error"
  1729. }
  1730. }
  1731. }
  1732. },
  1733. "/user/gpg_keys/{id}": {
  1734. "get": {
  1735. "produces": [
  1736. "application/json"
  1737. ],
  1738. "tags": [
  1739. "user"
  1740. ],
  1741. "operationId": "userCurrentGetGPGKey",
  1742. "responses": {
  1743. "200": {
  1744. "$ref": "#/responses/GPGKey"
  1745. },
  1746. "404": {
  1747. "$ref": "#/responses/notFound"
  1748. },
  1749. "500": {
  1750. "$ref": "#/responses/error"
  1751. }
  1752. }
  1753. },
  1754. "delete": {
  1755. "produces": [
  1756. "application/json"
  1757. ],
  1758. "tags": [
  1759. "user"
  1760. ],
  1761. "operationId": "userCurrentDeleteGPGKey",
  1762. "responses": {
  1763. "204": {
  1764. "$ref": "#/responses/empty"
  1765. },
  1766. "403": {
  1767. "$ref": "#/responses/forbidden"
  1768. },
  1769. "500": {
  1770. "$ref": "#/responses/error"
  1771. }
  1772. }
  1773. }
  1774. },
  1775. "/user/keys": {
  1776. "get": {
  1777. "produces": [
  1778. "application/json"
  1779. ],
  1780. "tags": [
  1781. "user"
  1782. ],
  1783. "operationId": "userCurrentListKeys",
  1784. "responses": {
  1785. "200": {
  1786. "$ref": "#/responses/PublicKeyList"
  1787. },
  1788. "500": {
  1789. "$ref": "#/responses/error"
  1790. }
  1791. }
  1792. },
  1793. "post": {
  1794. "consumes": [
  1795. "application/json"
  1796. ],
  1797. "produces": [
  1798. "application/json"
  1799. ],
  1800. "tags": [
  1801. "user"
  1802. ],
  1803. "operationId": "userCurrentPostKey",
  1804. "parameters": [
  1805. {
  1806. "uniqueItems": true,
  1807. "x-go-name": "Title",
  1808. "description": "Title of the key to add",
  1809. "name": "title",
  1810. "in": "body",
  1811. "required": true,
  1812. "schema": {
  1813. "type": "string"
  1814. }
  1815. },
  1816. {
  1817. "uniqueItems": true,
  1818. "x-go-name": "Key",
  1819. "description": "An armored SSH key to add",
  1820. "name": "key",
  1821. "in": "body",
  1822. "required": true,
  1823. "schema": {
  1824. "type": "string"
  1825. }
  1826. }
  1827. ],
  1828. "responses": {
  1829. "201": {
  1830. "$ref": "#/responses/PublicKey"
  1831. },
  1832. "422": {
  1833. "$ref": "#/responses/validationError"
  1834. },
  1835. "500": {
  1836. "$ref": "#/responses/error"
  1837. }
  1838. }
  1839. }
  1840. },
  1841. "/user/keys/{id}": {
  1842. "get": {
  1843. "produces": [
  1844. "application/json"
  1845. ],
  1846. "tags": [
  1847. "user"
  1848. ],
  1849. "operationId": "userCurrentGetKey",
  1850. "responses": {
  1851. "200": {
  1852. "$ref": "#/responses/PublicKey"
  1853. },
  1854. "404": {
  1855. "$ref": "#/responses/notFound"
  1856. },
  1857. "500": {
  1858. "$ref": "#/responses/error"
  1859. }
  1860. }
  1861. },
  1862. "delete": {
  1863. "produces": [
  1864. "application/json"
  1865. ],
  1866. "tags": [
  1867. "user"
  1868. ],
  1869. "operationId": "userCurrentDeleteKey",
  1870. "responses": {
  1871. "204": {
  1872. "$ref": "#/responses/empty"
  1873. },
  1874. "403": {
  1875. "$ref": "#/responses/forbidden"
  1876. },
  1877. "500": {
  1878. "$ref": "#/responses/error"
  1879. }
  1880. }
  1881. }
  1882. },
  1883. "/user/repos": {
  1884. "get": {
  1885. "produces": [
  1886. "application/json"
  1887. ],
  1888. "tags": [
  1889. "user"
  1890. ],
  1891. "operationId": "userCurrentListRepos",
  1892. "responses": {
  1893. "200": {
  1894. "$ref": "#/responses/RepositoryList"
  1895. },
  1896. "500": {
  1897. "$ref": "#/responses/error"
  1898. }
  1899. }
  1900. },
  1901. "post": {
  1902. "consumes": [
  1903. "application/json"
  1904. ],
  1905. "produces": [
  1906. "application/json"
  1907. ],
  1908. "tags": [
  1909. "repository",
  1910. "user"
  1911. ],
  1912. "operationId": "createCurrentUserRepo",
  1913. "parameters": [
  1914. {
  1915. "uniqueItems": true,
  1916. "x-go-name": "Name",
  1917. "description": "Name of the repository to create",
  1918. "name": "name",
  1919. "in": "body",
  1920. "schema": {
  1921. "type": "string"
  1922. }
  1923. },
  1924. {
  1925. "x-go-name": "Description",
  1926. "description": "Description of the repository to create",
  1927. "name": "description",
  1928. "in": "body",
  1929. "schema": {
  1930. "type": "string"
  1931. }
  1932. },
  1933. {
  1934. "x-go-name": "Private",
  1935. "description": "Is the repository to create private ?",
  1936. "name": "private",
  1937. "in": "body",
  1938. "schema": {
  1939. "type": "boolean"
  1940. }
  1941. },
  1942. {
  1943. "x-go-name": "AutoInit",
  1944. "description": "Init the repository to create ?",
  1945. "name": "auto_init",
  1946. "in": "body",
  1947. "schema": {
  1948. "type": "boolean"
  1949. }
  1950. },
  1951. {
  1952. "x-go-name": "Gitignores",
  1953. "description": "Gitignores to use",
  1954. "name": "gitignores",
  1955. "in": "body",
  1956. "schema": {
  1957. "type": "string"
  1958. }
  1959. },
  1960. {
  1961. "x-go-name": "License",
  1962. "description": "License to use",
  1963. "name": "license",
  1964. "in": "body",
  1965. "schema": {
  1966. "type": "string"
  1967. }
  1968. },
  1969. {
  1970. "x-go-name": "Readme",
  1971. "description": "Readme of the repository to create",
  1972. "name": "readme",
  1973. "in": "body",
  1974. "schema": {
  1975. "type": "string"
  1976. }
  1977. }
  1978. ],
  1979. "responses": {
  1980. "201": {
  1981. "$ref": "#/responses/Repository"
  1982. },
  1983. "403": {
  1984. "$ref": "#/responses/forbidden"
  1985. },
  1986. "422": {
  1987. "$ref": "#/responses/validationError"
  1988. },
  1989. "500": {
  1990. "$ref": "#/responses/error"
  1991. }
  1992. }
  1993. }
  1994. },
  1995. "/user/starred": {
  1996. "get": {
  1997. "produces": [
  1998. "application/json"
  1999. ],
  2000. "tags": [
  2001. "user"
  2002. ],
  2003. "operationId": "userCurrentListStarred",
  2004. "responses": {
  2005. "200": {
  2006. "$ref": "#/responses/RepositoryList"
  2007. },
  2008. "500": {
  2009. "$ref": "#/responses/error"
  2010. }
  2011. }
  2012. }
  2013. },
  2014. "/user/starred/{username}/{reponame}": {
  2015. "get": {
  2016. "tags": [
  2017. "user"
  2018. ],
  2019. "operationId": "userCurrentCheckStarring",
  2020. "responses": {
  2021. "204": {
  2022. "$ref": "#/responses/empty"
  2023. },
  2024. "404": {
  2025. "$ref": "#/responses/notFound"
  2026. }
  2027. }
  2028. },
  2029. "put": {
  2030. "tags": [
  2031. "user"
  2032. ],
  2033. "operationId": "userCurrentPutStar",
  2034. "responses": {
  2035. "204": {
  2036. "$ref": "#/responses/empty"
  2037. },
  2038. "500": {
  2039. "$ref": "#/responses/error"
  2040. }
  2041. }
  2042. },
  2043. "delete": {
  2044. "tags": [
  2045. "user"
  2046. ],
  2047. "operationId": "userCurrentDeleteStar",
  2048. "responses": {
  2049. "204": {
  2050. "$ref": "#/responses/empty"
  2051. },
  2052. "500": {
  2053. "$ref": "#/responses/error"
  2054. }
  2055. }
  2056. }
  2057. },
  2058. "/user/subscriptions": {
  2059. "get": {
  2060. "produces": [
  2061. "application/json"
  2062. ],
  2063. "tags": [
  2064. "user"
  2065. ],
  2066. "operationId": "userCurrentListSubscriptions",
  2067. "responses": {
  2068. "200": {
  2069. "$ref": "#/responses/RepositoryList"
  2070. },
  2071. "500": {
  2072. "$ref": "#/responses/error"
  2073. }
  2074. }
  2075. }
  2076. },
  2077. "/user/times": {
  2078. "get": {
  2079. "produces": [
  2080. "application/json"
  2081. ],
  2082. "tags": [
  2083. "user"
  2084. ],
  2085. "operationId": "userTrackedTimes",
  2086. "responses": {
  2087. "200": {
  2088. "$ref": "#/responses/TrackedTimes"
  2089. },
  2090. "500": {
  2091. "$ref": "#/responses/error"
  2092. }
  2093. }
  2094. }
  2095. },
  2096. "/users/:username/followers": {
  2097. "get": {
  2098. "produces": [
  2099. "application/json"
  2100. ],
  2101. "tags": [
  2102. "user"
  2103. ],
  2104. "operationId": "userListFollowers",
  2105. "responses": {
  2106. "200": {
  2107. "$ref": "#/responses/UserList"
  2108. },
  2109. "500": {
  2110. "$ref": "#/responses/error"
  2111. }
  2112. }
  2113. }
  2114. },
  2115. "/users/search": {
  2116. "get": {
  2117. "produces": [
  2118. "application/json"
  2119. ],
  2120. "tags": [
  2121. "user"
  2122. ],
  2123. "operationId": "userSearch",
  2124. "responses": {
  2125. "200": {
  2126. "$ref": "#/responses/UserList"
  2127. },
  2128. "500": {
  2129. "$ref": "#/responses/error"
  2130. }
  2131. }
  2132. }
  2133. },
  2134. "/users/{username}": {
  2135. "get": {
  2136. "produces": [
  2137. "application/json"
  2138. ],
  2139. "tags": [
  2140. "user"
  2141. ],
  2142. "operationId": "userGet",
  2143. "responses": {
  2144. "200": {
  2145. "$ref": "#/responses/User"
  2146. },
  2147. "404": {
  2148. "$ref": "#/responses/notFound"
  2149. },
  2150. "500": {
  2151. "$ref": "#/responses/error"
  2152. }
  2153. }
  2154. }
  2155. },
  2156. "/users/{username}/following": {
  2157. "get": {
  2158. "produces": [
  2159. "application/json"
  2160. ],
  2161. "tags": [
  2162. "user"
  2163. ],
  2164. "operationId": "userListFollowing",
  2165. "responses": {
  2166. "200": {
  2167. "$ref": "#/responses/UserList"
  2168. },
  2169. "500": {
  2170. "$ref": "#/responses/error"
  2171. }
  2172. }
  2173. }
  2174. },
  2175. "/users/{username}/following/:target": {
  2176. "get": {
  2177. "tags": [
  2178. "user"
  2179. ],
  2180. "operationId": "userCheckFollowing",
  2181. "responses": {
  2182. "204": {
  2183. "$ref": "#/responses/empty"
  2184. },
  2185. "404": {
  2186. "$ref": "#/responses/notFound"
  2187. }
  2188. }
  2189. }
  2190. },
  2191. "/users/{username}/gpg_keys": {
  2192. "get": {
  2193. "produces": [
  2194. "application/json"
  2195. ],
  2196. "tags": [
  2197. "user"
  2198. ],
  2199. "operationId": "userListGPGKeys",
  2200. "responses": {
  2201. "200": {
  2202. "$ref": "#/responses/GPGKeyList"
  2203. },
  2204. "500": {
  2205. "$ref": "#/responses/error"
  2206. }
  2207. }
  2208. }
  2209. },
  2210. "/users/{username}/keys": {
  2211. "get": {
  2212. "produces": [
  2213. "application/json"
  2214. ],
  2215. "tags": [
  2216. "user"
  2217. ],
  2218. "operationId": "userListKeys",
  2219. "responses": {
  2220. "200": {
  2221. "$ref": "#/responses/PublicKeyList"
  2222. },
  2223. "500": {
  2224. "$ref": "#/responses/error"
  2225. }
  2226. }
  2227. }
  2228. },
  2229. "/users/{username}/repos": {
  2230. "get": {
  2231. "produces": [
  2232. "application/json"
  2233. ],
  2234. "tags": [
  2235. "user"
  2236. ],
  2237. "operationId": "userListRepos",
  2238. "responses": {
  2239. "200": {
  2240. "$ref": "#/responses/RepositoryList"
  2241. },
  2242. "500": {
  2243. "$ref": "#/responses/error"
  2244. }
  2245. }
  2246. }
  2247. },
  2248. "/users/{username}/starred": {
  2249. "get": {
  2250. "produces": [
  2251. "application/json"
  2252. ],
  2253. "tags": [
  2254. "user"
  2255. ],
  2256. "operationId": "userListStarred",
  2257. "responses": {
  2258. "200": {
  2259. "$ref": "#/responses/RepositoryList"
  2260. },
  2261. "500": {
  2262. "$ref": "#/responses/error"
  2263. }
  2264. }
  2265. }
  2266. },
  2267. "/users/{username}/subscriptions": {
  2268. "get": {
  2269. "produces": [
  2270. "application/json"
  2271. ],
  2272. "tags": [
  2273. "user"
  2274. ],
  2275. "operationId": "userListSubscriptions",
  2276. "responses": {
  2277. "200": {
  2278. "$ref": "#/responses/RepositoryList"
  2279. },
  2280. "500": {
  2281. "$ref": "#/responses/error"
  2282. }
  2283. }
  2284. }
  2285. },
  2286. "/users/{username}/tokens": {
  2287. "get": {
  2288. "produces": [
  2289. "application/json"
  2290. ],
  2291. "tags": [
  2292. "user"
  2293. ],
  2294. "operationId": "userGetTokens",
  2295. "responses": {
  2296. "200": {
  2297. "$ref": "#/responses/AccessTokenList"
  2298. },
  2299. "500": {
  2300. "$ref": "#/responses/error"
  2301. }
  2302. }
  2303. }
  2304. },
  2305. "/version": {
  2306. "get": {
  2307. "description": "This show current running Gitea application version.",
  2308. "produces": [
  2309. "application/json"
  2310. ],
  2311. "tags": [
  2312. "miscellaneous"
  2313. ],
  2314. "summary": "Return Gitea running version.",
  2315. "operationId": "getVersion",
  2316. "responses": {
  2317. "200": {
  2318. "$ref": "#/responses/ServerVersion"
  2319. }
  2320. }
  2321. }
  2322. }
  2323. },
  2324. "definitions": {
  2325. "GPGKey": {
  2326. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  2327. "type": "object",
  2328. "properties": {
  2329. "can_certify": {
  2330. "type": "boolean",
  2331. "x-go-name": "CanCertify"
  2332. },
  2333. "can_encrypt_comms": {
  2334. "type": "boolean",
  2335. "x-go-name": "CanEncryptComms"
  2336. },
  2337. "can_encrypt_storage": {
  2338. "type": "boolean",
  2339. "x-go-name": "CanEncryptStorage"
  2340. },
  2341. "can_sign": {
  2342. "type": "boolean",
  2343. "x-go-name": "CanSign"
  2344. },
  2345. "created_at": {
  2346. "x-go-name": "Created"
  2347. },
  2348. "emails": {
  2349. "type": "array",
  2350. "items": {
  2351. "$ref": "#/definitions/GPGKeyEmail"
  2352. },
  2353. "x-go-name": "Emails"
  2354. },
  2355. "expires_at": {
  2356. "x-go-name": "Expires"
  2357. },
  2358. "id": {
  2359. "type": "integer",
  2360. "format": "int64",
  2361. "x-go-name": "ID"
  2362. },
  2363. "key_id": {
  2364. "type": "string",
  2365. "x-go-name": "KeyID"
  2366. },
  2367. "primary_key_id": {
  2368. "type": "string",
  2369. "x-go-name": "PrimaryKeyID"
  2370. },
  2371. "public_key": {
  2372. "type": "string",
  2373. "x-go-name": "PublicKey"
  2374. },
  2375. "subkeys": {
  2376. "type": "array",
  2377. "items": {
  2378. "type": "object"
  2379. },
  2380. "x-go-name": "SubsKey"
  2381. }
  2382. },
  2383. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  2384. },
  2385. "GPGKeyEmail": {
  2386. "description": "GPGKeyEmail an email attached to a GPGKey",
  2387. "type": "object",
  2388. "properties": {
  2389. "email": {
  2390. "type": "string",
  2391. "x-go-name": "Email"
  2392. },
  2393. "verified": {
  2394. "type": "boolean",
  2395. "x-go-name": "Verified"
  2396. }
  2397. },
  2398. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  2399. },
  2400. "Permission": {
  2401. "type": "object",
  2402. "title": "Permission represents a API permission.",
  2403. "properties": {
  2404. "admin": {
  2405. "type": "boolean",
  2406. "x-go-name": "Admin"
  2407. },
  2408. "pull": {
  2409. "type": "boolean",
  2410. "x-go-name": "Pull"
  2411. },
  2412. "push": {
  2413. "type": "boolean",
  2414. "x-go-name": "Push"
  2415. }
  2416. },
  2417. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  2418. },
  2419. "Repository": {
  2420. "type": "object",
  2421. "title": "Repository represents a API repository.",
  2422. "properties": {
  2423. "clone_url": {
  2424. "type": "string",
  2425. "x-go-name": "CloneURL"
  2426. },
  2427. "created_at": {
  2428. "x-go-name": "Created"
  2429. },
  2430. "default_branch": {
  2431. "type": "string",
  2432. "x-go-name": "DefaultBranch"
  2433. },
  2434. "description": {
  2435. "type": "string",
  2436. "x-go-name": "Description"
  2437. },
  2438. "empty": {
  2439. "type": "boolean",
  2440. "x-go-name": "Empty"
  2441. },
  2442. "fork": {
  2443. "type": "boolean",
  2444. "x-go-name": "Fork"
  2445. },
  2446. "forks_count": {
  2447. "type": "integer",
  2448. "format": "int64",
  2449. "x-go-name": "Forks"
  2450. },
  2451. "full_name": {
  2452. "type": "string",
  2453. "x-go-name": "FullName"
  2454. },
  2455. "html_url": {
  2456. "type": "string",
  2457. "x-go-name": "HTMLURL"
  2458. },
  2459. "id": {
  2460. "type": "integer",
  2461. "format": "int64",
  2462. "x-go-name": "ID"
  2463. },
  2464. "mirror": {
  2465. "type": "boolean",
  2466. "x-go-name": "Mirror"
  2467. },
  2468. "name": {
  2469. "type": "string",
  2470. "x-go-name": "Name"
  2471. },
  2472. "open_issues_count": {
  2473. "type": "integer",
  2474. "format": "int64",
  2475. "x-go-name": "OpenIssues"
  2476. },
  2477. "owner": {
  2478. "$ref": "#/definitions/User"
  2479. },
  2480. "parent": {
  2481. "type": "object"
  2482. },
  2483. "permissions": {
  2484. "$ref": "#/definitions/Permission"
  2485. },
  2486. "private": {
  2487. "type": "boolean",
  2488. "x-go-name": "Private"
  2489. },
  2490. "size": {
  2491. "type": "integer",
  2492. "format": "int64",
  2493. "x-go-name": "Size"
  2494. },
  2495. "ssh_url": {
  2496. "type": "string",
  2497. "x-go-name": "SSHURL"
  2498. },
  2499. "stars_count": {
  2500. "type": "integer",
  2501. "format": "int64",
  2502. "x-go-name": "Stars"
  2503. },
  2504. "updated_at": {
  2505. "x-go-name": "Updated"
  2506. },
  2507. "watchers_count": {
  2508. "type": "integer",
  2509. "format": "int64",
  2510. "x-go-name": "Watchers"
  2511. },
  2512. "website": {
  2513. "type": "string",
  2514. "x-go-name": "Website"
  2515. }
  2516. },
  2517. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  2518. },
  2519. "User": {
  2520. "type": "object",
  2521. "title": "User represents a API user.",
  2522. "properties": {
  2523. "avatar_url": {
  2524. "type": "string",
  2525. "x-go-name": "AvatarURL"
  2526. },
  2527. "email": {
  2528. "type": "string",
  2529. "x-go-name": "Email"
  2530. },
  2531. "full_name": {
  2532. "type": "string",
  2533. "x-go-name": "FullName"
  2534. },
  2535. "id": {
  2536. "type": "integer",
  2537. "format": "int64",
  2538. "x-go-name": "ID"
  2539. },
  2540. "login": {
  2541. "type": "string",
  2542. "x-go-name": "UserName"
  2543. }
  2544. },
  2545. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  2546. }
  2547. },
  2548. "responses": {
  2549. "AccessToken": {
  2550. "description": "AccessToken represents a API access token.",
  2551. "headers": {
  2552. "name": {
  2553. "type": "string"
  2554. },
  2555. "sha1": {
  2556. "type": "string"
  2557. }
  2558. }
  2559. },
  2560. "AccessTokenList": {
  2561. "description": "AccessTokenList represents a list of API access token."
  2562. },
  2563. "GPGKey": {
  2564. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  2565. "headers": {
  2566. "can_certify": {
  2567. "type": "boolean"
  2568. },
  2569. "can_encrypt_comms": {
  2570. "type": "boolean"
  2571. },
  2572. "can_encrypt_storage": {
  2573. "type": "boolean"
  2574. },
  2575. "can_sign": {
  2576. "type": "boolean"
  2577. },
  2578. "created_at": {},
  2579. "emails": {
  2580. "type": "array",
  2581. "items": {
  2582. "$ref": "#/definitions/GPGKeyEmail"
  2583. }
  2584. },
  2585. "expires_at": {},
  2586. "id": {
  2587. "type": "integer",
  2588. "format": "int64"
  2589. },
  2590. "key_id": {
  2591. "type": "string"
  2592. },
  2593. "primary_key_id": {
  2594. "type": "string"
  2595. },
  2596. "public_key": {
  2597. "type": "string"
  2598. },
  2599. "subkeys": {
  2600. "type": "array",
  2601. "items": {
  2602. "type": "object"
  2603. }
  2604. }
  2605. }
  2606. },
  2607. "GPGKeyList": {
  2608. "description": "GPGKeyList represents a list of GPGKey"
  2609. },
  2610. "Hook": {
  2611. "description": "Hook a hook is a web hook when one repository changed",
  2612. "schema": {
  2613. "type": "object",
  2614. "additionalProperties": {
  2615. "type": "string"
  2616. }
  2617. },
  2618. "headers": {
  2619. "active": {
  2620. "type": "boolean"
  2621. },
  2622. "config": {},
  2623. "created_at": {},
  2624. "events": {
  2625. "type": "array",
  2626. "items": {
  2627. "type": "string"
  2628. }
  2629. },
  2630. "id": {
  2631. "type": "integer",
  2632. "format": "int64"
  2633. },
  2634. "type": {
  2635. "type": "string"
  2636. },
  2637. "updated_at": {}
  2638. }
  2639. },
  2640. "HookList": {
  2641. "description": "HookList represents a list of API hook."
  2642. },
  2643. "MarkdownRender": {
  2644. "description": "MarkdownRender is a rendered markdown document"
  2645. },
  2646. "Organization": {
  2647. "description": "Organization a group of some repositories, users and teams",
  2648. "headers": {
  2649. "avatar_url": {
  2650. "type": "string"
  2651. },
  2652. "description": {
  2653. "type": "string"
  2654. },
  2655. "full_name": {
  2656. "type": "string"
  2657. },
  2658. "id": {
  2659. "type": "integer",
  2660. "format": "int64"
  2661. },
  2662. "location": {
  2663. "type": "string"
  2664. },
  2665. "username": {
  2666. "type": "string"
  2667. },
  2668. "website": {
  2669. "type": "string"
  2670. }
  2671. }
  2672. },
  2673. "PublicKey": {
  2674. "description": "PublicKey publickey is a user key to push code to repository",
  2675. "headers": {
  2676. "created_at": {},
  2677. "id": {
  2678. "type": "integer",
  2679. "format": "int64"
  2680. },
  2681. "key": {
  2682. "type": "string"
  2683. },
  2684. "title": {
  2685. "type": "string"
  2686. },
  2687. "url": {
  2688. "type": "string"
  2689. }
  2690. }
  2691. },
  2692. "PublicKeyList": {
  2693. "description": "PublicKeyList represents a list of PublicKey"
  2694. },
  2695. "Repository": {
  2696. "description": "Repository represents a API repository.",
  2697. "schema": {
  2698. "$ref": "#/definitions/Permission"
  2699. },
  2700. "headers": {
  2701. "clone_url": {
  2702. "type": "string"
  2703. },
  2704. "created_at": {},
  2705. "default_branch": {
  2706. "type": "string"
  2707. },
  2708. "description": {
  2709. "type": "string"
  2710. },
  2711. "empty": {
  2712. "type": "boolean"
  2713. },
  2714. "fork": {
  2715. "type": "boolean"
  2716. },
  2717. "forks_count": {
  2718. "type": "integer",
  2719. "format": "int64"
  2720. },
  2721. "full_name": {
  2722. "type": "string"
  2723. },
  2724. "html_url": {
  2725. "type": "string"
  2726. },
  2727. "id": {
  2728. "type": "integer",
  2729. "format": "int64"
  2730. },
  2731. "mirror": {
  2732. "type": "boolean"
  2733. },
  2734. "name": {
  2735. "type": "string"
  2736. },
  2737. "open_issues_count": {
  2738. "type": "integer",
  2739. "format": "int64"
  2740. },
  2741. "owner": {},
  2742. "parent": {},
  2743. "permissions": {},
  2744. "private": {
  2745. "type": "boolean"
  2746. },
  2747. "size": {
  2748. "type": "integer",
  2749. "format": "int64"
  2750. },
  2751. "ssh_url": {
  2752. "type": "string"
  2753. },
  2754. "stars_count": {
  2755. "type": "integer",
  2756. "format": "int64"
  2757. },
  2758. "updated_at": {},
  2759. "watchers_count": {
  2760. "type": "integer",
  2761. "format": "int64"
  2762. },
  2763. "website": {
  2764. "type": "string"
  2765. }
  2766. }
  2767. },
  2768. "RepositoryList": {
  2769. "description": "RepositoryList represents a list of API repository."
  2770. },
  2771. "SearchError": {
  2772. "description": "SearchError error of failing search",
  2773. "headers": {
  2774. "error": {
  2775. "type": "string"
  2776. },
  2777. "ok": {
  2778. "type": "boolean"
  2779. }
  2780. }
  2781. },
  2782. "SearchResults": {
  2783. "description": "SearchResults results of search",
  2784. "headers": {
  2785. "data": {
  2786. "type": "array",
  2787. "items": {
  2788. "$ref": "#/definitions/Repository"
  2789. }
  2790. },
  2791. "ok": {
  2792. "type": "boolean"
  2793. }
  2794. }
  2795. },
  2796. "ServerVersion": {
  2797. "description": "ServerVersion wraps the version of the server",
  2798. "headers": {
  2799. "Version": {
  2800. "type": "string"
  2801. }
  2802. }
  2803. },
  2804. "TrackedTime": {
  2805. "description": "TrackedTime worked time for an issue / pr",
  2806. "headers": {
  2807. "created": {},
  2808. "id": {
  2809. "type": "integer",
  2810. "format": "int64"
  2811. },
  2812. "issue_id": {
  2813. "type": "integer",
  2814. "format": "int64"
  2815. },
  2816. "time": {
  2817. "type": "integer",
  2818. "format": "int64",
  2819. "description": "Time in seconds"
  2820. },
  2821. "user_id": {
  2822. "type": "integer",
  2823. "format": "int64"
  2824. }
  2825. }
  2826. },
  2827. "TrackedTimes": {
  2828. "description": "TrackedTimes represent a list of tracked times"
  2829. },
  2830. "User": {
  2831. "description": "User represents a API user.",
  2832. "headers": {
  2833. "avatar_url": {
  2834. "type": "string"
  2835. },
  2836. "email": {
  2837. "type": "string"
  2838. },
  2839. "full_name": {
  2840. "type": "string"
  2841. },
  2842. "id": {
  2843. "type": "integer",
  2844. "format": "int64"
  2845. },
  2846. "login": {
  2847. "type": "string"
  2848. }
  2849. }
  2850. },
  2851. "UserList": {
  2852. "description": "UserList represents a list of API user."
  2853. },
  2854. "WatchInfo": {
  2855. "description": "WatchInfo represents a API watch status of one repository",
  2856. "schema": {
  2857. "type": "object"
  2858. },
  2859. "headers": {
  2860. "created_at": {},
  2861. "ignored": {
  2862. "type": "boolean"
  2863. },
  2864. "reason": {},
  2865. "repository_url": {
  2866. "type": "string"
  2867. },
  2868. "subscribed": {
  2869. "type": "boolean"
  2870. },
  2871. "url": {
  2872. "type": "string"
  2873. }
  2874. }
  2875. },
  2876. "empty": {
  2877. "description": "APIEmpty is an empty response"
  2878. },
  2879. "error": {
  2880. "description": "APIError is error format response",
  2881. "headers": {
  2882. "message": {
  2883. "type": "string"
  2884. },
  2885. "url": {
  2886. "type": "string"
  2887. }
  2888. }
  2889. },
  2890. "forbidden": {
  2891. "description": "APIForbiddenError is a forbidden error response",
  2892. "headers": {
  2893. "message": {
  2894. "type": "string"
  2895. },
  2896. "url": {
  2897. "type": "string"
  2898. }
  2899. }
  2900. },
  2901. "notFound": {
  2902. "description": "APINotFound is a not found empty response"
  2903. },
  2904. "redirect": {
  2905. "description": "APIRedirect is a redirect response"
  2906. },
  2907. "validationError": {
  2908. "description": "APIValidationError is error format response related to input validation",
  2909. "headers": {
  2910. "message": {
  2911. "type": "string"
  2912. },
  2913. "url": {
  2914. "type": "string"
  2915. }
  2916. }
  2917. }
  2918. },
  2919. "securityDefinitions": {
  2920. "AccessToken": {
  2921. "type": "apiKey",
  2922. "name": "access_token",
  2923. "in": "query"
  2924. },
  2925. "AuthorizationHeaderToken": {
  2926. "type": "apiKey",
  2927. "name": "Authorization",
  2928. "in": "header"
  2929. },
  2930. "BasicAuth": {
  2931. "type": "basic"
  2932. },
  2933. "Token": {
  2934. "type": "apiKey",
  2935. "name": "token",
  2936. "in": "query"
  2937. }
  2938. },
  2939. "security": [
  2940. {
  2941. "BasicAuth": [
  2942. "[]"
  2943. ]
  2944. },
  2945. {
  2946. "Token": [
  2947. "[]"
  2948. ]
  2949. },
  2950. {
  2951. "AccessToken": [
  2952. "[]"
  2953. ]
  2954. },
  2955. {
  2956. "AuthorizationHeaderToken": [
  2957. "[]"
  2958. ]
  2959. }
  2960. ]
  2961. }