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

swagger.v1.json 64 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819
  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": "Owner in we search 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. "responses": {
  1119. "200": {
  1120. "$ref": "#/responses/SearchResults"
  1121. },
  1122. "500": {
  1123. "$ref": "#/responses/SearchError"
  1124. }
  1125. }
  1126. }
  1127. },
  1128. "/repos/{owner}/{repo}/forks": {
  1129. "get": {
  1130. "produces": [
  1131. "application/json"
  1132. ],
  1133. "tags": [
  1134. "repository"
  1135. ],
  1136. "operationId": "listForks",
  1137. "responses": {
  1138. "200": {
  1139. "$ref": "#/responses/RepositoryList"
  1140. },
  1141. "500": {
  1142. "$ref": "#/responses/error"
  1143. }
  1144. }
  1145. },
  1146. "post": {
  1147. "produces": [
  1148. "application/json"
  1149. ],
  1150. "tags": [
  1151. "repository"
  1152. ],
  1153. "operationId": "createFork",
  1154. "parameters": [
  1155. {
  1156. "x-go-name": "Organization",
  1157. "name": "organization",
  1158. "in": "body",
  1159. "schema": {
  1160. "type": "string"
  1161. }
  1162. }
  1163. ],
  1164. "responses": {
  1165. "202": {
  1166. "$ref": "#/responses/Repository"
  1167. },
  1168. "403": {
  1169. "$ref": "#/responses/forbidden"
  1170. },
  1171. "422": {
  1172. "$ref": "#/responses/validationError"
  1173. },
  1174. "500": {
  1175. "$ref": "#/responses/error"
  1176. }
  1177. }
  1178. }
  1179. },
  1180. "/repos/{username}/{reponame}": {
  1181. "get": {
  1182. "produces": [
  1183. "application/json"
  1184. ],
  1185. "tags": [
  1186. "repository"
  1187. ],
  1188. "operationId": "repoGet",
  1189. "responses": {
  1190. "200": {
  1191. "$ref": "#/responses/Repository"
  1192. },
  1193. "500": {
  1194. "$ref": "#/responses/error"
  1195. }
  1196. }
  1197. },
  1198. "delete": {
  1199. "produces": [
  1200. "application/json"
  1201. ],
  1202. "tags": [
  1203. "repository"
  1204. ],
  1205. "operationId": "repoDelete",
  1206. "responses": {
  1207. "204": {
  1208. "$ref": "#/responses/empty"
  1209. },
  1210. "403": {
  1211. "$ref": "#/responses/forbidden"
  1212. },
  1213. "500": {
  1214. "$ref": "#/responses/error"
  1215. }
  1216. }
  1217. }
  1218. },
  1219. "/repos/{username}/{reponame}/hooks": {
  1220. "get": {
  1221. "produces": [
  1222. "application/json"
  1223. ],
  1224. "tags": [
  1225. "repository"
  1226. ],
  1227. "operationId": "repoListHooks",
  1228. "responses": {
  1229. "200": {
  1230. "$ref": "#/responses/HookList"
  1231. },
  1232. "500": {
  1233. "$ref": "#/responses/error"
  1234. }
  1235. }
  1236. },
  1237. "post": {
  1238. "consumes": [
  1239. "application/json"
  1240. ],
  1241. "produces": [
  1242. "application/json"
  1243. ],
  1244. "tags": [
  1245. "repository"
  1246. ],
  1247. "operationId": "repoCreateHook",
  1248. "parameters": [
  1249. {
  1250. "x-go-name": "Type",
  1251. "name": "type",
  1252. "in": "body",
  1253. "schema": {
  1254. "type": "string"
  1255. }
  1256. },
  1257. {
  1258. "x-go-name": "Config",
  1259. "name": "config",
  1260. "in": "body",
  1261. "schema": {
  1262. "type": "object",
  1263. "additionalProperties": {
  1264. "type": "string"
  1265. }
  1266. }
  1267. },
  1268. {
  1269. "x-go-name": "Events",
  1270. "name": "events",
  1271. "in": "body",
  1272. "schema": {
  1273. "type": "array",
  1274. "items": {
  1275. "type": "string"
  1276. }
  1277. }
  1278. },
  1279. {
  1280. "x-go-name": "Active",
  1281. "name": "active",
  1282. "in": "body",
  1283. "schema": {
  1284. "type": "boolean"
  1285. }
  1286. }
  1287. ],
  1288. "responses": {
  1289. "200": {
  1290. "$ref": "#/responses/Hook"
  1291. },
  1292. "422": {
  1293. "$ref": "#/responses/validationError"
  1294. },
  1295. "500": {
  1296. "$ref": "#/responses/error"
  1297. }
  1298. }
  1299. }
  1300. },
  1301. "/repos/{username}/{reponame}/hooks/{id}": {
  1302. "delete": {
  1303. "produces": [
  1304. "application/json"
  1305. ],
  1306. "tags": [
  1307. "repository"
  1308. ],
  1309. "operationId": "repoDeleteHook",
  1310. "responses": {
  1311. "204": {
  1312. "$ref": "#/responses/empty"
  1313. },
  1314. "404": {
  1315. "$ref": "#/responses/notFound"
  1316. },
  1317. "500": {
  1318. "$ref": "#/responses/error"
  1319. }
  1320. }
  1321. },
  1322. "patch": {
  1323. "produces": [
  1324. "application/json"
  1325. ],
  1326. "tags": [
  1327. "repository"
  1328. ],
  1329. "operationId": "repoEditHook",
  1330. "parameters": [
  1331. {
  1332. "x-go-name": "Config",
  1333. "name": "config",
  1334. "in": "body",
  1335. "schema": {
  1336. "type": "object",
  1337. "additionalProperties": {
  1338. "type": "string"
  1339. }
  1340. }
  1341. },
  1342. {
  1343. "x-go-name": "Events",
  1344. "name": "events",
  1345. "in": "body",
  1346. "schema": {
  1347. "type": "array",
  1348. "items": {
  1349. "type": "string"
  1350. }
  1351. }
  1352. },
  1353. {
  1354. "x-go-name": "Active",
  1355. "name": "active",
  1356. "in": "body",
  1357. "schema": {
  1358. "type": "boolean"
  1359. }
  1360. }
  1361. ],
  1362. "responses": {
  1363. "200": {
  1364. "$ref": "#/responses/Hook"
  1365. },
  1366. "422": {
  1367. "$ref": "#/responses/validationError"
  1368. },
  1369. "500": {
  1370. "$ref": "#/responses/error"
  1371. }
  1372. }
  1373. }
  1374. },
  1375. "/repos/{username}/{reponame}/mirror-sync": {
  1376. "post": {
  1377. "produces": [
  1378. "application/json"
  1379. ],
  1380. "tags": [
  1381. "repository"
  1382. ],
  1383. "operationId": "repoMirrorSync",
  1384. "responses": {
  1385. "200": {
  1386. "$ref": "#/responses/empty"
  1387. },
  1388. "403": {
  1389. "$ref": "#/responses/forbidden"
  1390. }
  1391. }
  1392. }
  1393. },
  1394. "/repos/{username}/{reponame}/subscription": {
  1395. "get": {
  1396. "tags": [
  1397. "repository"
  1398. ],
  1399. "operationId": "userCurrentCheckSubscription",
  1400. "responses": {
  1401. "200": {
  1402. "$ref": "#/responses/WatchInfo"
  1403. },
  1404. "404": {
  1405. "$ref": "#/responses/notFound"
  1406. }
  1407. }
  1408. },
  1409. "put": {
  1410. "tags": [
  1411. "repository"
  1412. ],
  1413. "operationId": "userCurrentPutSubscription",
  1414. "responses": {
  1415. "200": {
  1416. "$ref": "#/responses/WatchInfo"
  1417. },
  1418. "500": {
  1419. "$ref": "#/responses/error"
  1420. }
  1421. }
  1422. },
  1423. "delete": {
  1424. "tags": [
  1425. "repository"
  1426. ],
  1427. "operationId": "userCurrentDeleteSubscription",
  1428. "responses": {
  1429. "204": {
  1430. "$ref": "#/responses/empty"
  1431. },
  1432. "500": {
  1433. "$ref": "#/responses/error"
  1434. }
  1435. }
  1436. }
  1437. },
  1438. "/repositories/{id}": {
  1439. "get": {
  1440. "produces": [
  1441. "application/json"
  1442. ],
  1443. "tags": [
  1444. "repository"
  1445. ],
  1446. "operationId": "repoGetByID",
  1447. "responses": {
  1448. "200": {
  1449. "$ref": "#/responses/Repository"
  1450. },
  1451. "500": {
  1452. "$ref": "#/responses/error"
  1453. }
  1454. }
  1455. }
  1456. },
  1457. "/user": {
  1458. "get": {
  1459. "produces": [
  1460. "application/json"
  1461. ],
  1462. "tags": [
  1463. "user"
  1464. ],
  1465. "operationId": "userGetCurrent",
  1466. "responses": {
  1467. "200": {
  1468. "$ref": "#/responses/User"
  1469. }
  1470. }
  1471. }
  1472. },
  1473. "/user/followers": {
  1474. "get": {
  1475. "produces": [
  1476. "application/json"
  1477. ],
  1478. "tags": [
  1479. "user"
  1480. ],
  1481. "operationId": "userCurrentListFollowers",
  1482. "responses": {
  1483. "200": {
  1484. "$ref": "#/responses/UserList"
  1485. },
  1486. "500": {
  1487. "$ref": "#/responses/error"
  1488. }
  1489. }
  1490. }
  1491. },
  1492. "/user/following": {
  1493. "get": {
  1494. "produces": [
  1495. "application/json"
  1496. ],
  1497. "tags": [
  1498. "user"
  1499. ],
  1500. "operationId": "userCurrentListFollowing",
  1501. "responses": {
  1502. "200": {
  1503. "$ref": "#/responses/UserList"
  1504. },
  1505. "500": {
  1506. "$ref": "#/responses/error"
  1507. }
  1508. }
  1509. }
  1510. },
  1511. "/user/following/{username}": {
  1512. "get": {
  1513. "tags": [
  1514. "user"
  1515. ],
  1516. "operationId": "userCurrentCheckFollowing",
  1517. "responses": {
  1518. "204": {
  1519. "$ref": "#/responses/empty"
  1520. },
  1521. "404": {
  1522. "$ref": "#/responses/notFound"
  1523. }
  1524. }
  1525. },
  1526. "put": {
  1527. "tags": [
  1528. "user"
  1529. ],
  1530. "operationId": "userCurrentPutFollow",
  1531. "responses": {
  1532. "204": {
  1533. "$ref": "#/responses/empty"
  1534. },
  1535. "500": {
  1536. "$ref": "#/responses/error"
  1537. }
  1538. }
  1539. },
  1540. "delete": {
  1541. "tags": [
  1542. "user"
  1543. ],
  1544. "operationId": "userCurrentDeleteFollow",
  1545. "responses": {
  1546. "204": {
  1547. "$ref": "#/responses/empty"
  1548. },
  1549. "500": {
  1550. "$ref": "#/responses/error"
  1551. }
  1552. }
  1553. }
  1554. },
  1555. "/user/gpg_keys": {
  1556. "get": {
  1557. "produces": [
  1558. "application/json"
  1559. ],
  1560. "tags": [
  1561. "user"
  1562. ],
  1563. "operationId": "userCurrentListGPGKeys",
  1564. "responses": {
  1565. "200": {
  1566. "$ref": "#/responses/GPGKeyList"
  1567. },
  1568. "500": {
  1569. "$ref": "#/responses/error"
  1570. }
  1571. }
  1572. },
  1573. "post": {
  1574. "consumes": [
  1575. "application/json"
  1576. ],
  1577. "produces": [
  1578. "application/json"
  1579. ],
  1580. "tags": [
  1581. "user"
  1582. ],
  1583. "operationId": "userCurrentPostGPGKey",
  1584. "parameters": [
  1585. {
  1586. "uniqueItems": true,
  1587. "x-go-name": "ArmoredKey",
  1588. "description": "An armored GPG key to add",
  1589. "name": "armored_public_key",
  1590. "in": "body",
  1591. "required": true,
  1592. "schema": {
  1593. "type": "string"
  1594. }
  1595. }
  1596. ],
  1597. "responses": {
  1598. "201": {
  1599. "$ref": "#/responses/GPGKey"
  1600. },
  1601. "422": {
  1602. "$ref": "#/responses/validationError"
  1603. },
  1604. "500": {
  1605. "$ref": "#/responses/error"
  1606. }
  1607. }
  1608. }
  1609. },
  1610. "/user/gpg_keys/{id}": {
  1611. "get": {
  1612. "produces": [
  1613. "application/json"
  1614. ],
  1615. "tags": [
  1616. "user"
  1617. ],
  1618. "operationId": "userCurrentGetGPGKey",
  1619. "responses": {
  1620. "200": {
  1621. "$ref": "#/responses/GPGKey"
  1622. },
  1623. "404": {
  1624. "$ref": "#/responses/notFound"
  1625. },
  1626. "500": {
  1627. "$ref": "#/responses/error"
  1628. }
  1629. }
  1630. },
  1631. "delete": {
  1632. "produces": [
  1633. "application/json"
  1634. ],
  1635. "tags": [
  1636. "user"
  1637. ],
  1638. "operationId": "userCurrentDeleteGPGKey",
  1639. "responses": {
  1640. "204": {
  1641. "$ref": "#/responses/empty"
  1642. },
  1643. "403": {
  1644. "$ref": "#/responses/forbidden"
  1645. },
  1646. "500": {
  1647. "$ref": "#/responses/error"
  1648. }
  1649. }
  1650. }
  1651. },
  1652. "/user/keys": {
  1653. "get": {
  1654. "produces": [
  1655. "application/json"
  1656. ],
  1657. "tags": [
  1658. "user"
  1659. ],
  1660. "operationId": "userCurrentListKeys",
  1661. "responses": {
  1662. "200": {
  1663. "$ref": "#/responses/PublicKeyList"
  1664. },
  1665. "500": {
  1666. "$ref": "#/responses/error"
  1667. }
  1668. }
  1669. },
  1670. "post": {
  1671. "consumes": [
  1672. "application/json"
  1673. ],
  1674. "produces": [
  1675. "application/json"
  1676. ],
  1677. "tags": [
  1678. "user"
  1679. ],
  1680. "operationId": "userCurrentPostKey",
  1681. "parameters": [
  1682. {
  1683. "uniqueItems": true,
  1684. "x-go-name": "Title",
  1685. "description": "Title of the key to add",
  1686. "name": "title",
  1687. "in": "body",
  1688. "required": true,
  1689. "schema": {
  1690. "type": "string"
  1691. }
  1692. },
  1693. {
  1694. "uniqueItems": true,
  1695. "x-go-name": "Key",
  1696. "description": "An armored SSH key to add",
  1697. "name": "key",
  1698. "in": "body",
  1699. "required": true,
  1700. "schema": {
  1701. "type": "string"
  1702. }
  1703. }
  1704. ],
  1705. "responses": {
  1706. "201": {
  1707. "$ref": "#/responses/PublicKey"
  1708. },
  1709. "422": {
  1710. "$ref": "#/responses/validationError"
  1711. },
  1712. "500": {
  1713. "$ref": "#/responses/error"
  1714. }
  1715. }
  1716. }
  1717. },
  1718. "/user/keys/{id}": {
  1719. "get": {
  1720. "produces": [
  1721. "application/json"
  1722. ],
  1723. "tags": [
  1724. "user"
  1725. ],
  1726. "operationId": "userCurrentGetKey",
  1727. "responses": {
  1728. "200": {
  1729. "$ref": "#/responses/PublicKey"
  1730. },
  1731. "404": {
  1732. "$ref": "#/responses/notFound"
  1733. },
  1734. "500": {
  1735. "$ref": "#/responses/error"
  1736. }
  1737. }
  1738. },
  1739. "delete": {
  1740. "produces": [
  1741. "application/json"
  1742. ],
  1743. "tags": [
  1744. "user"
  1745. ],
  1746. "operationId": "userCurrentDeleteKey",
  1747. "responses": {
  1748. "204": {
  1749. "$ref": "#/responses/empty"
  1750. },
  1751. "403": {
  1752. "$ref": "#/responses/forbidden"
  1753. },
  1754. "500": {
  1755. "$ref": "#/responses/error"
  1756. }
  1757. }
  1758. }
  1759. },
  1760. "/user/repos": {
  1761. "get": {
  1762. "produces": [
  1763. "application/json"
  1764. ],
  1765. "tags": [
  1766. "user"
  1767. ],
  1768. "operationId": "userCurrentListRepos",
  1769. "responses": {
  1770. "200": {
  1771. "$ref": "#/responses/RepositoryList"
  1772. },
  1773. "500": {
  1774. "$ref": "#/responses/error"
  1775. }
  1776. }
  1777. },
  1778. "post": {
  1779. "consumes": [
  1780. "application/json"
  1781. ],
  1782. "produces": [
  1783. "application/json"
  1784. ],
  1785. "tags": [
  1786. "repository",
  1787. "user"
  1788. ],
  1789. "operationId": "createCurrentUserRepo",
  1790. "parameters": [
  1791. {
  1792. "uniqueItems": true,
  1793. "x-go-name": "Name",
  1794. "description": "Name of the repository to create",
  1795. "name": "name",
  1796. "in": "body",
  1797. "schema": {
  1798. "type": "string"
  1799. }
  1800. },
  1801. {
  1802. "x-go-name": "Description",
  1803. "description": "Description of the repository to create",
  1804. "name": "description",
  1805. "in": "body",
  1806. "schema": {
  1807. "type": "string"
  1808. }
  1809. },
  1810. {
  1811. "x-go-name": "Private",
  1812. "description": "Is the repository to create private ?",
  1813. "name": "private",
  1814. "in": "body",
  1815. "schema": {
  1816. "type": "boolean"
  1817. }
  1818. },
  1819. {
  1820. "x-go-name": "AutoInit",
  1821. "description": "Init the repository to create ?",
  1822. "name": "auto_init",
  1823. "in": "body",
  1824. "schema": {
  1825. "type": "boolean"
  1826. }
  1827. },
  1828. {
  1829. "x-go-name": "Gitignores",
  1830. "description": "Gitignores to use",
  1831. "name": "gitignores",
  1832. "in": "body",
  1833. "schema": {
  1834. "type": "string"
  1835. }
  1836. },
  1837. {
  1838. "x-go-name": "License",
  1839. "description": "License to use",
  1840. "name": "license",
  1841. "in": "body",
  1842. "schema": {
  1843. "type": "string"
  1844. }
  1845. },
  1846. {
  1847. "x-go-name": "Readme",
  1848. "description": "Readme of the repository to create",
  1849. "name": "readme",
  1850. "in": "body",
  1851. "schema": {
  1852. "type": "string"
  1853. }
  1854. }
  1855. ],
  1856. "responses": {
  1857. "201": {
  1858. "$ref": "#/responses/Repository"
  1859. },
  1860. "403": {
  1861. "$ref": "#/responses/forbidden"
  1862. },
  1863. "422": {
  1864. "$ref": "#/responses/validationError"
  1865. },
  1866. "500": {
  1867. "$ref": "#/responses/error"
  1868. }
  1869. }
  1870. }
  1871. },
  1872. "/user/starred": {
  1873. "get": {
  1874. "produces": [
  1875. "application/json"
  1876. ],
  1877. "tags": [
  1878. "user"
  1879. ],
  1880. "operationId": "userCurrentListStarred",
  1881. "responses": {
  1882. "200": {
  1883. "$ref": "#/responses/RepositoryList"
  1884. },
  1885. "500": {
  1886. "$ref": "#/responses/error"
  1887. }
  1888. }
  1889. }
  1890. },
  1891. "/user/starred/{username}/{reponame}": {
  1892. "get": {
  1893. "tags": [
  1894. "user"
  1895. ],
  1896. "operationId": "userCurrentCheckStarring",
  1897. "responses": {
  1898. "204": {
  1899. "$ref": "#/responses/empty"
  1900. },
  1901. "404": {
  1902. "$ref": "#/responses/notFound"
  1903. }
  1904. }
  1905. },
  1906. "put": {
  1907. "tags": [
  1908. "user"
  1909. ],
  1910. "operationId": "userCurrentPutStar",
  1911. "responses": {
  1912. "204": {
  1913. "$ref": "#/responses/empty"
  1914. },
  1915. "500": {
  1916. "$ref": "#/responses/error"
  1917. }
  1918. }
  1919. },
  1920. "delete": {
  1921. "tags": [
  1922. "user"
  1923. ],
  1924. "operationId": "userCurrentDeleteStar",
  1925. "responses": {
  1926. "204": {
  1927. "$ref": "#/responses/empty"
  1928. },
  1929. "500": {
  1930. "$ref": "#/responses/error"
  1931. }
  1932. }
  1933. }
  1934. },
  1935. "/user/subscriptions": {
  1936. "get": {
  1937. "produces": [
  1938. "application/json"
  1939. ],
  1940. "tags": [
  1941. "user"
  1942. ],
  1943. "operationId": "userCurrentListSubscriptions",
  1944. "responses": {
  1945. "200": {
  1946. "$ref": "#/responses/RepositoryList"
  1947. },
  1948. "500": {
  1949. "$ref": "#/responses/error"
  1950. }
  1951. }
  1952. }
  1953. },
  1954. "/users/:username/followers": {
  1955. "get": {
  1956. "produces": [
  1957. "application/json"
  1958. ],
  1959. "tags": [
  1960. "user"
  1961. ],
  1962. "operationId": "userListFollowers",
  1963. "responses": {
  1964. "200": {
  1965. "$ref": "#/responses/UserList"
  1966. },
  1967. "500": {
  1968. "$ref": "#/responses/error"
  1969. }
  1970. }
  1971. }
  1972. },
  1973. "/users/search": {
  1974. "get": {
  1975. "produces": [
  1976. "application/json"
  1977. ],
  1978. "tags": [
  1979. "user"
  1980. ],
  1981. "operationId": "userSearch",
  1982. "responses": {
  1983. "200": {
  1984. "$ref": "#/responses/UserList"
  1985. },
  1986. "500": {
  1987. "$ref": "#/responses/error"
  1988. }
  1989. }
  1990. }
  1991. },
  1992. "/users/{username}": {
  1993. "get": {
  1994. "produces": [
  1995. "application/json"
  1996. ],
  1997. "tags": [
  1998. "user"
  1999. ],
  2000. "operationId": "userGet",
  2001. "responses": {
  2002. "200": {
  2003. "$ref": "#/responses/User"
  2004. },
  2005. "404": {
  2006. "$ref": "#/responses/notFound"
  2007. },
  2008. "500": {
  2009. "$ref": "#/responses/error"
  2010. }
  2011. }
  2012. }
  2013. },
  2014. "/users/{username}/following": {
  2015. "get": {
  2016. "produces": [
  2017. "application/json"
  2018. ],
  2019. "tags": [
  2020. "user"
  2021. ],
  2022. "operationId": "userListFollowing",
  2023. "responses": {
  2024. "200": {
  2025. "$ref": "#/responses/UserList"
  2026. },
  2027. "500": {
  2028. "$ref": "#/responses/error"
  2029. }
  2030. }
  2031. }
  2032. },
  2033. "/users/{username}/following/:target": {
  2034. "get": {
  2035. "tags": [
  2036. "user"
  2037. ],
  2038. "operationId": "userCheckFollowing",
  2039. "responses": {
  2040. "204": {
  2041. "$ref": "#/responses/empty"
  2042. },
  2043. "404": {
  2044. "$ref": "#/responses/notFound"
  2045. }
  2046. }
  2047. }
  2048. },
  2049. "/users/{username}/gpg_keys": {
  2050. "get": {
  2051. "produces": [
  2052. "application/json"
  2053. ],
  2054. "tags": [
  2055. "user"
  2056. ],
  2057. "operationId": "userListGPGKeys",
  2058. "responses": {
  2059. "200": {
  2060. "$ref": "#/responses/GPGKeyList"
  2061. },
  2062. "500": {
  2063. "$ref": "#/responses/error"
  2064. }
  2065. }
  2066. }
  2067. },
  2068. "/users/{username}/keys": {
  2069. "get": {
  2070. "produces": [
  2071. "application/json"
  2072. ],
  2073. "tags": [
  2074. "user"
  2075. ],
  2076. "operationId": "userListKeys",
  2077. "responses": {
  2078. "200": {
  2079. "$ref": "#/responses/PublicKeyList"
  2080. },
  2081. "500": {
  2082. "$ref": "#/responses/error"
  2083. }
  2084. }
  2085. }
  2086. },
  2087. "/users/{username}/repos": {
  2088. "get": {
  2089. "produces": [
  2090. "application/json"
  2091. ],
  2092. "tags": [
  2093. "user"
  2094. ],
  2095. "operationId": "userListRepos",
  2096. "responses": {
  2097. "200": {
  2098. "$ref": "#/responses/RepositoryList"
  2099. },
  2100. "500": {
  2101. "$ref": "#/responses/error"
  2102. }
  2103. }
  2104. }
  2105. },
  2106. "/users/{username}/starred": {
  2107. "get": {
  2108. "produces": [
  2109. "application/json"
  2110. ],
  2111. "tags": [
  2112. "user"
  2113. ],
  2114. "operationId": "userListStarred",
  2115. "responses": {
  2116. "200": {
  2117. "$ref": "#/responses/RepositoryList"
  2118. },
  2119. "500": {
  2120. "$ref": "#/responses/error"
  2121. }
  2122. }
  2123. }
  2124. },
  2125. "/users/{username}/subscriptions": {
  2126. "get": {
  2127. "produces": [
  2128. "application/json"
  2129. ],
  2130. "tags": [
  2131. "user"
  2132. ],
  2133. "operationId": "userListSubscriptions",
  2134. "responses": {
  2135. "200": {
  2136. "$ref": "#/responses/RepositoryList"
  2137. },
  2138. "500": {
  2139. "$ref": "#/responses/error"
  2140. }
  2141. }
  2142. }
  2143. },
  2144. "/users/{username}/tokens": {
  2145. "get": {
  2146. "produces": [
  2147. "application/json"
  2148. ],
  2149. "tags": [
  2150. "user"
  2151. ],
  2152. "operationId": "userGetTokens",
  2153. "responses": {
  2154. "200": {
  2155. "$ref": "#/responses/AccessTokenList"
  2156. },
  2157. "500": {
  2158. "$ref": "#/responses/error"
  2159. }
  2160. }
  2161. }
  2162. },
  2163. "/version": {
  2164. "get": {
  2165. "description": "This show current running Gitea application version.",
  2166. "produces": [
  2167. "application/json"
  2168. ],
  2169. "tags": [
  2170. "miscellaneous"
  2171. ],
  2172. "summary": "Return Gitea running version.",
  2173. "operationId": "getVersion",
  2174. "responses": {
  2175. "200": {
  2176. "$ref": "#/responses/ServerVersion"
  2177. }
  2178. }
  2179. }
  2180. }
  2181. },
  2182. "definitions": {
  2183. "GPGKey": {
  2184. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  2185. "type": "object",
  2186. "properties": {
  2187. "can_certify": {
  2188. "type": "boolean",
  2189. "x-go-name": "CanCertify"
  2190. },
  2191. "can_encrypt_comms": {
  2192. "type": "boolean",
  2193. "x-go-name": "CanEncryptComms"
  2194. },
  2195. "can_encrypt_storage": {
  2196. "type": "boolean",
  2197. "x-go-name": "CanEncryptStorage"
  2198. },
  2199. "can_sign": {
  2200. "type": "boolean",
  2201. "x-go-name": "CanSign"
  2202. },
  2203. "created_at": {
  2204. "x-go-name": "Created"
  2205. },
  2206. "emails": {
  2207. "type": "array",
  2208. "items": {
  2209. "$ref": "#/definitions/GPGKeyEmail"
  2210. },
  2211. "x-go-name": "Emails"
  2212. },
  2213. "expires_at": {
  2214. "x-go-name": "Expires"
  2215. },
  2216. "id": {
  2217. "type": "integer",
  2218. "format": "int64",
  2219. "x-go-name": "ID"
  2220. },
  2221. "key_id": {
  2222. "type": "string",
  2223. "x-go-name": "KeyID"
  2224. },
  2225. "primary_key_id": {
  2226. "type": "string",
  2227. "x-go-name": "PrimaryKeyID"
  2228. },
  2229. "public_key": {
  2230. "type": "string",
  2231. "x-go-name": "PublicKey"
  2232. },
  2233. "subkeys": {
  2234. "type": "array",
  2235. "items": {
  2236. "type": "object"
  2237. },
  2238. "x-go-name": "SubsKey"
  2239. }
  2240. },
  2241. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  2242. },
  2243. "GPGKeyEmail": {
  2244. "description": "GPGKeyEmail an email attached to a GPGKey",
  2245. "type": "object",
  2246. "properties": {
  2247. "email": {
  2248. "type": "string",
  2249. "x-go-name": "Email"
  2250. },
  2251. "verified": {
  2252. "type": "boolean",
  2253. "x-go-name": "Verified"
  2254. }
  2255. },
  2256. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  2257. },
  2258. "Permission": {
  2259. "type": "object",
  2260. "title": "Permission represents a API permission.",
  2261. "properties": {
  2262. "admin": {
  2263. "type": "boolean",
  2264. "x-go-name": "Admin"
  2265. },
  2266. "pull": {
  2267. "type": "boolean",
  2268. "x-go-name": "Pull"
  2269. },
  2270. "push": {
  2271. "type": "boolean",
  2272. "x-go-name": "Push"
  2273. }
  2274. },
  2275. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  2276. },
  2277. "Repository": {
  2278. "type": "object",
  2279. "title": "Repository represents a API repository.",
  2280. "properties": {
  2281. "clone_url": {
  2282. "type": "string",
  2283. "x-go-name": "CloneURL"
  2284. },
  2285. "created_at": {
  2286. "x-go-name": "Created"
  2287. },
  2288. "default_branch": {
  2289. "type": "string",
  2290. "x-go-name": "DefaultBranch"
  2291. },
  2292. "description": {
  2293. "type": "string",
  2294. "x-go-name": "Description"
  2295. },
  2296. "empty": {
  2297. "type": "boolean",
  2298. "x-go-name": "Empty"
  2299. },
  2300. "fork": {
  2301. "type": "boolean",
  2302. "x-go-name": "Fork"
  2303. },
  2304. "forks_count": {
  2305. "type": "integer",
  2306. "format": "int64",
  2307. "x-go-name": "Forks"
  2308. },
  2309. "full_name": {
  2310. "type": "string",
  2311. "x-go-name": "FullName"
  2312. },
  2313. "html_url": {
  2314. "type": "string",
  2315. "x-go-name": "HTMLURL"
  2316. },
  2317. "id": {
  2318. "type": "integer",
  2319. "format": "int64",
  2320. "x-go-name": "ID"
  2321. },
  2322. "mirror": {
  2323. "type": "boolean",
  2324. "x-go-name": "Mirror"
  2325. },
  2326. "name": {
  2327. "type": "string",
  2328. "x-go-name": "Name"
  2329. },
  2330. "open_issues_count": {
  2331. "type": "integer",
  2332. "format": "int64",
  2333. "x-go-name": "OpenIssues"
  2334. },
  2335. "owner": {
  2336. "$ref": "#/definitions/User"
  2337. },
  2338. "parent": {
  2339. "type": "object"
  2340. },
  2341. "permissions": {
  2342. "$ref": "#/definitions/Permission"
  2343. },
  2344. "private": {
  2345. "type": "boolean",
  2346. "x-go-name": "Private"
  2347. },
  2348. "size": {
  2349. "type": "integer",
  2350. "format": "int64",
  2351. "x-go-name": "Size"
  2352. },
  2353. "ssh_url": {
  2354. "type": "string",
  2355. "x-go-name": "SSHURL"
  2356. },
  2357. "stars_count": {
  2358. "type": "integer",
  2359. "format": "int64",
  2360. "x-go-name": "Stars"
  2361. },
  2362. "updated_at": {
  2363. "x-go-name": "Updated"
  2364. },
  2365. "watchers_count": {
  2366. "type": "integer",
  2367. "format": "int64",
  2368. "x-go-name": "Watchers"
  2369. },
  2370. "website": {
  2371. "type": "string",
  2372. "x-go-name": "Website"
  2373. }
  2374. },
  2375. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  2376. },
  2377. "User": {
  2378. "type": "object",
  2379. "title": "User represents a API user.",
  2380. "properties": {
  2381. "avatar_url": {
  2382. "type": "string",
  2383. "x-go-name": "AvatarURL"
  2384. },
  2385. "email": {
  2386. "type": "string",
  2387. "x-go-name": "Email"
  2388. },
  2389. "full_name": {
  2390. "type": "string",
  2391. "x-go-name": "FullName"
  2392. },
  2393. "id": {
  2394. "type": "integer",
  2395. "format": "int64",
  2396. "x-go-name": "ID"
  2397. },
  2398. "login": {
  2399. "type": "string",
  2400. "x-go-name": "UserName"
  2401. }
  2402. },
  2403. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  2404. }
  2405. },
  2406. "responses": {
  2407. "AccessToken": {
  2408. "description": "AccessToken represents a API access token.",
  2409. "headers": {
  2410. "name": {
  2411. "type": "string"
  2412. },
  2413. "sha1": {
  2414. "type": "string"
  2415. }
  2416. }
  2417. },
  2418. "AccessTokenList": {
  2419. "description": "AccessTokenList represents a list of API access token."
  2420. },
  2421. "GPGKey": {
  2422. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  2423. "headers": {
  2424. "can_certify": {
  2425. "type": "boolean"
  2426. },
  2427. "can_encrypt_comms": {
  2428. "type": "boolean"
  2429. },
  2430. "can_encrypt_storage": {
  2431. "type": "boolean"
  2432. },
  2433. "can_sign": {
  2434. "type": "boolean"
  2435. },
  2436. "created_at": {},
  2437. "emails": {
  2438. "type": "array",
  2439. "items": {
  2440. "$ref": "#/definitions/GPGKeyEmail"
  2441. }
  2442. },
  2443. "expires_at": {},
  2444. "id": {
  2445. "type": "integer",
  2446. "format": "int64"
  2447. },
  2448. "key_id": {
  2449. "type": "string"
  2450. },
  2451. "primary_key_id": {
  2452. "type": "string"
  2453. },
  2454. "public_key": {
  2455. "type": "string"
  2456. },
  2457. "subkeys": {
  2458. "type": "array",
  2459. "items": {
  2460. "type": "object"
  2461. }
  2462. }
  2463. }
  2464. },
  2465. "GPGKeyList": {
  2466. "description": "GPGKeyList represents a list of GPGKey"
  2467. },
  2468. "Hook": {
  2469. "description": "Hook a hook is a web hook when one repository changed",
  2470. "schema": {
  2471. "type": "object",
  2472. "additionalProperties": {
  2473. "type": "string"
  2474. }
  2475. },
  2476. "headers": {
  2477. "active": {
  2478. "type": "boolean"
  2479. },
  2480. "config": {},
  2481. "created_at": {},
  2482. "events": {
  2483. "type": "array",
  2484. "items": {
  2485. "type": "string"
  2486. }
  2487. },
  2488. "id": {
  2489. "type": "integer",
  2490. "format": "int64"
  2491. },
  2492. "type": {
  2493. "type": "string"
  2494. },
  2495. "updated_at": {}
  2496. }
  2497. },
  2498. "HookList": {
  2499. "description": "HookList represents a list of API hook."
  2500. },
  2501. "MarkdownRender": {
  2502. "description": "MarkdownRender is a rendered markdown document"
  2503. },
  2504. "Organization": {
  2505. "description": "Organization a group of some repositories, users and teams",
  2506. "headers": {
  2507. "avatar_url": {
  2508. "type": "string"
  2509. },
  2510. "description": {
  2511. "type": "string"
  2512. },
  2513. "full_name": {
  2514. "type": "string"
  2515. },
  2516. "id": {
  2517. "type": "integer",
  2518. "format": "int64"
  2519. },
  2520. "location": {
  2521. "type": "string"
  2522. },
  2523. "username": {
  2524. "type": "string"
  2525. },
  2526. "website": {
  2527. "type": "string"
  2528. }
  2529. }
  2530. },
  2531. "PublicKey": {
  2532. "description": "PublicKey publickey is a user key to push code to repository",
  2533. "headers": {
  2534. "created_at": {},
  2535. "id": {
  2536. "type": "integer",
  2537. "format": "int64"
  2538. },
  2539. "key": {
  2540. "type": "string"
  2541. },
  2542. "title": {
  2543. "type": "string"
  2544. },
  2545. "url": {
  2546. "type": "string"
  2547. }
  2548. }
  2549. },
  2550. "PublicKeyList": {
  2551. "description": "PublicKeyList represents a list of PublicKey"
  2552. },
  2553. "Repository": {
  2554. "description": "Repository represents a API repository.",
  2555. "schema": {
  2556. "$ref": "#/definitions/Permission"
  2557. },
  2558. "headers": {
  2559. "clone_url": {
  2560. "type": "string"
  2561. },
  2562. "created_at": {},
  2563. "default_branch": {
  2564. "type": "string"
  2565. },
  2566. "description": {
  2567. "type": "string"
  2568. },
  2569. "empty": {
  2570. "type": "boolean"
  2571. },
  2572. "fork": {
  2573. "type": "boolean"
  2574. },
  2575. "forks_count": {
  2576. "type": "integer",
  2577. "format": "int64"
  2578. },
  2579. "full_name": {
  2580. "type": "string"
  2581. },
  2582. "html_url": {
  2583. "type": "string"
  2584. },
  2585. "id": {
  2586. "type": "integer",
  2587. "format": "int64"
  2588. },
  2589. "mirror": {
  2590. "type": "boolean"
  2591. },
  2592. "name": {
  2593. "type": "string"
  2594. },
  2595. "open_issues_count": {
  2596. "type": "integer",
  2597. "format": "int64"
  2598. },
  2599. "owner": {},
  2600. "parent": {},
  2601. "permissions": {},
  2602. "private": {
  2603. "type": "boolean"
  2604. },
  2605. "size": {
  2606. "type": "integer",
  2607. "format": "int64"
  2608. },
  2609. "ssh_url": {
  2610. "type": "string"
  2611. },
  2612. "stars_count": {
  2613. "type": "integer",
  2614. "format": "int64"
  2615. },
  2616. "updated_at": {},
  2617. "watchers_count": {
  2618. "type": "integer",
  2619. "format": "int64"
  2620. },
  2621. "website": {
  2622. "type": "string"
  2623. }
  2624. }
  2625. },
  2626. "RepositoryList": {
  2627. "description": "RepositoryList represents a list of API repository."
  2628. },
  2629. "SearchError": {
  2630. "description": "SearchError error of failing search",
  2631. "headers": {
  2632. "error": {
  2633. "type": "string"
  2634. },
  2635. "ok": {
  2636. "type": "boolean"
  2637. }
  2638. }
  2639. },
  2640. "SearchResults": {
  2641. "description": "SearchResults results of search",
  2642. "headers": {
  2643. "data": {
  2644. "type": "array",
  2645. "items": {
  2646. "$ref": "#/definitions/Repository"
  2647. }
  2648. },
  2649. "ok": {
  2650. "type": "boolean"
  2651. }
  2652. }
  2653. },
  2654. "ServerVersion": {
  2655. "description": "ServerVersion wraps the version of the server",
  2656. "headers": {
  2657. "Version": {
  2658. "type": "string"
  2659. }
  2660. }
  2661. },
  2662. "TrackedTime": {
  2663. "description": "TrackedTime worked time for an issue / pr",
  2664. "headers": {
  2665. "created": {},
  2666. "id": {
  2667. "type": "integer",
  2668. "format": "int64"
  2669. },
  2670. "issue_id": {
  2671. "type": "integer",
  2672. "format": "int64"
  2673. },
  2674. "time": {
  2675. "type": "integer",
  2676. "format": "int64",
  2677. "description": "Time in seconds"
  2678. },
  2679. "user_id": {
  2680. "type": "integer",
  2681. "format": "int64"
  2682. }
  2683. }
  2684. },
  2685. "TrackedTimes": {
  2686. "description": "TrackedTimes represent a list of tracked times"
  2687. },
  2688. "User": {
  2689. "description": "User represents a API user.",
  2690. "headers": {
  2691. "avatar_url": {
  2692. "type": "string"
  2693. },
  2694. "email": {
  2695. "type": "string"
  2696. },
  2697. "full_name": {
  2698. "type": "string"
  2699. },
  2700. "id": {
  2701. "type": "integer",
  2702. "format": "int64"
  2703. },
  2704. "login": {
  2705. "type": "string"
  2706. }
  2707. }
  2708. },
  2709. "UserList": {
  2710. "description": "UserList represents a list of API user."
  2711. },
  2712. "WatchInfo": {
  2713. "description": "WatchInfo represents a API watch status of one repository",
  2714. "schema": {
  2715. "type": "object"
  2716. },
  2717. "headers": {
  2718. "created_at": {},
  2719. "ignored": {
  2720. "type": "boolean"
  2721. },
  2722. "reason": {},
  2723. "repository_url": {
  2724. "type": "string"
  2725. },
  2726. "subscribed": {
  2727. "type": "boolean"
  2728. },
  2729. "url": {
  2730. "type": "string"
  2731. }
  2732. }
  2733. },
  2734. "empty": {
  2735. "description": "APIEmpty is an empty response"
  2736. },
  2737. "error": {
  2738. "description": "APIError is error format response",
  2739. "headers": {
  2740. "message": {
  2741. "type": "string"
  2742. },
  2743. "url": {
  2744. "type": "string"
  2745. }
  2746. }
  2747. },
  2748. "forbidden": {
  2749. "description": "APIForbiddenError is a forbidden error response",
  2750. "headers": {
  2751. "message": {
  2752. "type": "string"
  2753. },
  2754. "url": {
  2755. "type": "string"
  2756. }
  2757. }
  2758. },
  2759. "notFound": {
  2760. "description": "APINotFound is a not found empty response"
  2761. },
  2762. "redirect": {
  2763. "description": "APIRedirect is a redirect response"
  2764. },
  2765. "validationError": {
  2766. "description": "APIValidationError is error format response related to input validation",
  2767. "headers": {
  2768. "message": {
  2769. "type": "string"
  2770. },
  2771. "url": {
  2772. "type": "string"
  2773. }
  2774. }
  2775. }
  2776. },
  2777. "securityDefinitions": {
  2778. "AccessToken": {
  2779. "type": "apiKey",
  2780. "name": "access_token",
  2781. "in": "query"
  2782. },
  2783. "AuthorizationHeaderToken": {
  2784. "type": "apiKey",
  2785. "name": "Authorization",
  2786. "in": "header"
  2787. },
  2788. "BasicAuth": {
  2789. "type": "basic"
  2790. },
  2791. "Token": {
  2792. "type": "apiKey",
  2793. "name": "token",
  2794. "in": "query"
  2795. }
  2796. },
  2797. "security": [
  2798. {
  2799. "BasicAuth": [
  2800. "[]"
  2801. ]
  2802. },
  2803. {
  2804. "Token": [
  2805. "[]"
  2806. ]
  2807. },
  2808. {
  2809. "AccessToken": [
  2810. "[]"
  2811. ]
  2812. },
  2813. {
  2814. "AuthorizationHeaderToken": [
  2815. "[]"
  2816. ]
  2817. }
  2818. ]
  2819. }