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 32 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360
  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. "/markdown": {
  28. "post": {
  29. "consumes": [
  30. "application/json"
  31. ],
  32. "produces": [
  33. "text/html"
  34. ],
  35. "operationId": "renderMarkdown",
  36. "parameters": [
  37. {
  38. "description": "Text markdown to render",
  39. "name": "Text",
  40. "in": "body",
  41. "schema": {
  42. "type": "string"
  43. }
  44. },
  45. {
  46. "description": "Mode to render",
  47. "name": "Mode",
  48. "in": "body",
  49. "schema": {
  50. "type": "string"
  51. }
  52. },
  53. {
  54. "description": "Context to render",
  55. "name": "Context",
  56. "in": "body",
  57. "schema": {
  58. "type": "string"
  59. }
  60. },
  61. {
  62. "description": "Is it a wiki page ?",
  63. "name": "Wiki",
  64. "in": "body",
  65. "schema": {
  66. "type": "boolean"
  67. }
  68. }
  69. ],
  70. "responses": {
  71. "200": {
  72. "$ref": "#/responses/MarkdownRender"
  73. },
  74. "422": {
  75. "$ref": "#/responses/validationError"
  76. }
  77. }
  78. }
  79. },
  80. "/markdown/raw": {
  81. "post": {
  82. "consumes": [
  83. "text/plain"
  84. ],
  85. "produces": [
  86. "text/html"
  87. ],
  88. "operationId": "renderMarkdownRaw",
  89. "responses": {
  90. "200": {
  91. "$ref": "#/responses/MarkdownRender"
  92. },
  93. "422": {
  94. "$ref": "#/responses/validationError"
  95. }
  96. }
  97. }
  98. },
  99. "/org/{org}/repos": {
  100. "post": {
  101. "consumes": [
  102. "application/json"
  103. ],
  104. "produces": [
  105. "application/json"
  106. ],
  107. "operationId": "createOrgRepo",
  108. "parameters": [
  109. {
  110. "uniqueItems": true,
  111. "x-go-name": "Name",
  112. "description": "Name of the repository to create",
  113. "name": "name",
  114. "in": "body",
  115. "schema": {
  116. "type": "string"
  117. }
  118. },
  119. {
  120. "x-go-name": "Description",
  121. "description": "Description of the repository to create",
  122. "name": "description",
  123. "in": "body",
  124. "schema": {
  125. "type": "string"
  126. }
  127. },
  128. {
  129. "x-go-name": "Private",
  130. "description": "Is the repository to create private ?",
  131. "name": "private",
  132. "in": "body",
  133. "schema": {
  134. "type": "boolean"
  135. }
  136. },
  137. {
  138. "x-go-name": "AutoInit",
  139. "description": "Init the repository to create ?",
  140. "name": "auto_init",
  141. "in": "body",
  142. "schema": {
  143. "type": "boolean"
  144. }
  145. },
  146. {
  147. "x-go-name": "Gitignores",
  148. "description": "Gitignores to use",
  149. "name": "gitignores",
  150. "in": "body",
  151. "schema": {
  152. "type": "string"
  153. }
  154. },
  155. {
  156. "x-go-name": "License",
  157. "description": "License to use",
  158. "name": "license",
  159. "in": "body",
  160. "schema": {
  161. "type": "string"
  162. }
  163. },
  164. {
  165. "x-go-name": "Readme",
  166. "description": "Readme of the repository to create",
  167. "name": "readme",
  168. "in": "body",
  169. "schema": {
  170. "type": "string"
  171. }
  172. }
  173. ],
  174. "responses": {
  175. "201": {
  176. "$ref": "#/responses/Repository"
  177. },
  178. "403": {
  179. "$ref": "#/responses/forbidden"
  180. },
  181. "422": {
  182. "$ref": "#/responses/validationError"
  183. },
  184. "500": {
  185. "$ref": "#/responses/error"
  186. }
  187. }
  188. }
  189. },
  190. "/repos/search": {
  191. "get": {
  192. "produces": [
  193. "application/json"
  194. ],
  195. "operationId": "repoSearch",
  196. "parameters": [
  197. {
  198. "type": "string",
  199. "x-go-name": "Keyword",
  200. "description": "Keyword to search",
  201. "name": "q",
  202. "in": "query"
  203. },
  204. {
  205. "type": "integer",
  206. "format": "int64",
  207. "x-go-name": "OwnerID",
  208. "description": "Owner in we search search",
  209. "name": "uid",
  210. "in": "query"
  211. },
  212. {
  213. "type": "integer",
  214. "format": "int64",
  215. "x-go-name": "PageSize",
  216. "description": "Limit of result\n\nmaximum: setting.ExplorePagingNum",
  217. "name": "limit",
  218. "in": "query"
  219. }
  220. ],
  221. "responses": {
  222. "200": {
  223. "$ref": "#/responses/SearchResults"
  224. },
  225. "500": {
  226. "$ref": "#/responses/SearchError"
  227. }
  228. }
  229. }
  230. },
  231. "/repos/{owner}/{repo}/forks": {
  232. "get": {
  233. "produces": [
  234. "application/json"
  235. ],
  236. "operationId": "listForks",
  237. "responses": {
  238. "200": {
  239. "$ref": "#/responses/RepositoryList"
  240. },
  241. "500": {
  242. "$ref": "#/responses/error"
  243. }
  244. }
  245. },
  246. "post": {
  247. "produces": [
  248. "application/json"
  249. ],
  250. "operationId": "createFork",
  251. "responses": {
  252. "202": {
  253. "$ref": "#/responses/Repository"
  254. },
  255. "403": {
  256. "$ref": "#/responses/forbidden"
  257. },
  258. "422": {
  259. "$ref": "#/responses/validationError"
  260. },
  261. "500": {
  262. "$ref": "#/responses/error"
  263. }
  264. }
  265. }
  266. },
  267. "/repos/{username}/{reponame}/mirror-sync": {
  268. "post": {
  269. "produces": [
  270. "application/json"
  271. ],
  272. "operationId": "repoMirrorSync",
  273. "responses": {
  274. "200": {
  275. "$ref": "#/responses/empty"
  276. },
  277. "403": {
  278. "$ref": "#/responses/forbidden"
  279. }
  280. }
  281. }
  282. },
  283. "/repos/{username}/{reponame}/subscription": {
  284. "get": {
  285. "operationId": "userCurrentCheckSubscription",
  286. "responses": {
  287. "200": {
  288. "$ref": "#/responses/WatchInfo"
  289. },
  290. "404": {
  291. "$ref": "#/responses/notFound"
  292. }
  293. }
  294. },
  295. "put": {
  296. "operationId": "userCurrentPutSubscription",
  297. "responses": {
  298. "200": {
  299. "$ref": "#/responses/WatchInfo"
  300. },
  301. "500": {
  302. "$ref": "#/responses/error"
  303. }
  304. }
  305. },
  306. "delete": {
  307. "operationId": "userCurrentDeleteSubscription",
  308. "responses": {
  309. "204": {
  310. "$ref": "#/responses/empty"
  311. },
  312. "500": {
  313. "$ref": "#/responses/error"
  314. }
  315. }
  316. }
  317. },
  318. "/user": {
  319. "get": {
  320. "produces": [
  321. "application/json"
  322. ],
  323. "operationId": "userGetCurrent",
  324. "responses": {
  325. "200": {
  326. "$ref": "#/responses/User"
  327. }
  328. }
  329. }
  330. },
  331. "/user/followers": {
  332. "get": {
  333. "produces": [
  334. "application/json"
  335. ],
  336. "operationId": "userCurrentListFollowers",
  337. "responses": {
  338. "200": {
  339. "$ref": "#/responses/UserList"
  340. },
  341. "500": {
  342. "$ref": "#/responses/error"
  343. }
  344. }
  345. }
  346. },
  347. "/user/following": {
  348. "get": {
  349. "produces": [
  350. "application/json"
  351. ],
  352. "operationId": "userCurrentListFollowing",
  353. "responses": {
  354. "200": {
  355. "$ref": "#/responses/UserList"
  356. },
  357. "500": {
  358. "$ref": "#/responses/error"
  359. }
  360. }
  361. }
  362. },
  363. "/user/following/{username}": {
  364. "get": {
  365. "operationId": "userCurrentCheckFollowing",
  366. "responses": {
  367. "204": {
  368. "$ref": "#/responses/empty"
  369. },
  370. "404": {
  371. "$ref": "#/responses/notFound"
  372. }
  373. }
  374. },
  375. "put": {
  376. "operationId": "userCurrentPutFollow",
  377. "responses": {
  378. "204": {
  379. "$ref": "#/responses/empty"
  380. },
  381. "500": {
  382. "$ref": "#/responses/error"
  383. }
  384. }
  385. },
  386. "delete": {
  387. "operationId": "userCurrentDeleteFollow",
  388. "responses": {
  389. "204": {
  390. "$ref": "#/responses/empty"
  391. },
  392. "500": {
  393. "$ref": "#/responses/error"
  394. }
  395. }
  396. }
  397. },
  398. "/user/gpg_keys": {
  399. "get": {
  400. "produces": [
  401. "application/json"
  402. ],
  403. "operationId": "userCurrentListGPGKeys",
  404. "responses": {
  405. "200": {
  406. "$ref": "#/responses/GPGKeyList"
  407. },
  408. "500": {
  409. "$ref": "#/responses/error"
  410. }
  411. }
  412. },
  413. "post": {
  414. "consumes": [
  415. "application/json"
  416. ],
  417. "produces": [
  418. "application/json"
  419. ],
  420. "operationId": "userCurrentPostGPGKey",
  421. "parameters": [
  422. {
  423. "uniqueItems": true,
  424. "x-go-name": "ArmoredKey",
  425. "description": "An armored GPG key to add",
  426. "name": "armored_public_key",
  427. "in": "body",
  428. "required": true,
  429. "schema": {
  430. "type": "string"
  431. }
  432. }
  433. ],
  434. "responses": {
  435. "201": {
  436. "$ref": "#/responses/GPGKey"
  437. },
  438. "422": {
  439. "$ref": "#/responses/validationError"
  440. },
  441. "500": {
  442. "$ref": "#/responses/error"
  443. }
  444. }
  445. }
  446. },
  447. "/user/gpg_keys/{id}": {
  448. "get": {
  449. "produces": [
  450. "application/json"
  451. ],
  452. "operationId": "userCurrentGetGPGKey",
  453. "responses": {
  454. "200": {
  455. "$ref": "#/responses/GPGKey"
  456. },
  457. "404": {
  458. "$ref": "#/responses/notFound"
  459. },
  460. "500": {
  461. "$ref": "#/responses/error"
  462. }
  463. }
  464. },
  465. "delete": {
  466. "produces": [
  467. "application/json"
  468. ],
  469. "operationId": "userCurrentDeleteGPGKey",
  470. "responses": {
  471. "204": {
  472. "$ref": "#/responses/empty"
  473. },
  474. "403": {
  475. "$ref": "#/responses/forbidden"
  476. },
  477. "500": {
  478. "$ref": "#/responses/error"
  479. }
  480. }
  481. }
  482. },
  483. "/user/keys": {
  484. "get": {
  485. "produces": [
  486. "application/json"
  487. ],
  488. "operationId": "userCurrentListKeys",
  489. "responses": {
  490. "200": {
  491. "$ref": "#/responses/PublicKeyList"
  492. },
  493. "500": {
  494. "$ref": "#/responses/error"
  495. }
  496. }
  497. },
  498. "post": {
  499. "consumes": [
  500. "application/json"
  501. ],
  502. "produces": [
  503. "application/json"
  504. ],
  505. "operationId": "userCurrentPostKey",
  506. "parameters": [
  507. {
  508. "uniqueItems": true,
  509. "x-go-name": "Title",
  510. "description": "Title of the key to add",
  511. "name": "title",
  512. "in": "body",
  513. "required": true,
  514. "schema": {
  515. "type": "string"
  516. }
  517. },
  518. {
  519. "uniqueItems": true,
  520. "x-go-name": "Key",
  521. "description": "An armored SSH key to add",
  522. "name": "key",
  523. "in": "body",
  524. "required": true,
  525. "schema": {
  526. "type": "string"
  527. }
  528. }
  529. ],
  530. "responses": {
  531. "201": {
  532. "$ref": "#/responses/PublicKey"
  533. },
  534. "422": {
  535. "$ref": "#/responses/validationError"
  536. },
  537. "500": {
  538. "$ref": "#/responses/error"
  539. }
  540. }
  541. }
  542. },
  543. "/user/keys/{id}": {
  544. "get": {
  545. "produces": [
  546. "application/json"
  547. ],
  548. "operationId": "userCurrentGetKey",
  549. "responses": {
  550. "200": {
  551. "$ref": "#/responses/PublicKey"
  552. },
  553. "404": {
  554. "$ref": "#/responses/notFound"
  555. },
  556. "500": {
  557. "$ref": "#/responses/error"
  558. }
  559. }
  560. },
  561. "delete": {
  562. "produces": [
  563. "application/json"
  564. ],
  565. "operationId": "userCurrentDeleteKey",
  566. "responses": {
  567. "204": {
  568. "$ref": "#/responses/empty"
  569. },
  570. "403": {
  571. "$ref": "#/responses/forbidden"
  572. },
  573. "500": {
  574. "$ref": "#/responses/error"
  575. }
  576. }
  577. }
  578. },
  579. "/user/repos": {
  580. "get": {
  581. "produces": [
  582. "application/json"
  583. ],
  584. "operationId": "userCurrentListRepos",
  585. "responses": {
  586. "200": {
  587. "$ref": "#/responses/RepositoryList"
  588. },
  589. "500": {
  590. "$ref": "#/responses/error"
  591. }
  592. }
  593. }
  594. },
  595. "/user/starred": {
  596. "get": {
  597. "produces": [
  598. "application/json"
  599. ],
  600. "operationId": "userCurrentListStarred",
  601. "responses": {
  602. "200": {
  603. "$ref": "#/responses/RepositoryList"
  604. },
  605. "500": {
  606. "$ref": "#/responses/error"
  607. }
  608. }
  609. }
  610. },
  611. "/user/starred/{username}/{reponame}": {
  612. "get": {
  613. "operationId": "userCurrentCheckStarring",
  614. "responses": {
  615. "204": {
  616. "$ref": "#/responses/empty"
  617. },
  618. "404": {
  619. "$ref": "#/responses/notFound"
  620. }
  621. }
  622. },
  623. "put": {
  624. "operationId": "userCurrentPutStar",
  625. "responses": {
  626. "204": {
  627. "$ref": "#/responses/empty"
  628. },
  629. "500": {
  630. "$ref": "#/responses/error"
  631. }
  632. }
  633. },
  634. "delete": {
  635. "operationId": "userCurrentDeleteStar",
  636. "responses": {
  637. "204": {
  638. "$ref": "#/responses/empty"
  639. },
  640. "500": {
  641. "$ref": "#/responses/error"
  642. }
  643. }
  644. }
  645. },
  646. "/user/subscriptions": {
  647. "get": {
  648. "produces": [
  649. "application/json"
  650. ],
  651. "operationId": "userCurrentListSubscriptions",
  652. "responses": {
  653. "200": {
  654. "$ref": "#/responses/RepositoryList"
  655. },
  656. "500": {
  657. "$ref": "#/responses/error"
  658. }
  659. }
  660. }
  661. },
  662. "/users/:username/followers": {
  663. "get": {
  664. "produces": [
  665. "application/json"
  666. ],
  667. "operationId": "userListFollowers",
  668. "responses": {
  669. "200": {
  670. "$ref": "#/responses/UserList"
  671. },
  672. "500": {
  673. "$ref": "#/responses/error"
  674. }
  675. }
  676. }
  677. },
  678. "/users/search": {
  679. "get": {
  680. "produces": [
  681. "application/json"
  682. ],
  683. "operationId": "userSearch",
  684. "responses": {
  685. "200": {
  686. "$ref": "#/responses/UserList"
  687. },
  688. "500": {
  689. "$ref": "#/responses/error"
  690. }
  691. }
  692. }
  693. },
  694. "/users/{username}": {
  695. "get": {
  696. "produces": [
  697. "application/json"
  698. ],
  699. "operationId": "userGet",
  700. "responses": {
  701. "200": {
  702. "$ref": "#/responses/User"
  703. },
  704. "404": {
  705. "$ref": "#/responses/notFound"
  706. },
  707. "500": {
  708. "$ref": "#/responses/error"
  709. }
  710. }
  711. }
  712. },
  713. "/users/{username}/following": {
  714. "get": {
  715. "produces": [
  716. "application/json"
  717. ],
  718. "operationId": "userListFollowing",
  719. "responses": {
  720. "200": {
  721. "$ref": "#/responses/UserList"
  722. },
  723. "500": {
  724. "$ref": "#/responses/error"
  725. }
  726. }
  727. }
  728. },
  729. "/users/{username}/following/:target": {
  730. "get": {
  731. "operationId": "userCheckFollowing",
  732. "responses": {
  733. "204": {
  734. "$ref": "#/responses/empty"
  735. },
  736. "404": {
  737. "$ref": "#/responses/notFound"
  738. }
  739. }
  740. }
  741. },
  742. "/users/{username}/gpg_keys": {
  743. "get": {
  744. "produces": [
  745. "application/json"
  746. ],
  747. "operationId": "userListGPGKeys",
  748. "responses": {
  749. "200": {
  750. "$ref": "#/responses/GPGKeyList"
  751. },
  752. "500": {
  753. "$ref": "#/responses/error"
  754. }
  755. }
  756. }
  757. },
  758. "/users/{username}/keys": {
  759. "get": {
  760. "produces": [
  761. "application/json"
  762. ],
  763. "operationId": "userListKeys",
  764. "responses": {
  765. "200": {
  766. "$ref": "#/responses/PublicKeyList"
  767. },
  768. "500": {
  769. "$ref": "#/responses/error"
  770. }
  771. }
  772. }
  773. },
  774. "/users/{username}/repos": {
  775. "get": {
  776. "produces": [
  777. "application/json"
  778. ],
  779. "operationId": "userListRepos",
  780. "responses": {
  781. "200": {
  782. "$ref": "#/responses/RepositoryList"
  783. },
  784. "500": {
  785. "$ref": "#/responses/error"
  786. }
  787. }
  788. }
  789. },
  790. "/users/{username}/starred": {
  791. "get": {
  792. "produces": [
  793. "application/json"
  794. ],
  795. "operationId": "userListStarred",
  796. "responses": {
  797. "200": {
  798. "$ref": "#/responses/RepositoryList"
  799. },
  800. "500": {
  801. "$ref": "#/responses/error"
  802. }
  803. }
  804. }
  805. },
  806. "/users/{username}/subscriptions": {
  807. "get": {
  808. "produces": [
  809. "application/json"
  810. ],
  811. "operationId": "userListSubscriptions",
  812. "responses": {
  813. "200": {
  814. "$ref": "#/responses/RepositoryList"
  815. },
  816. "500": {
  817. "$ref": "#/responses/error"
  818. }
  819. }
  820. }
  821. },
  822. "/users/{username}/tokens": {
  823. "get": {
  824. "produces": [
  825. "application/json"
  826. ],
  827. "operationId": "userGetTokens",
  828. "responses": {
  829. "200": {
  830. "$ref": "#/responses/AccessTokenList"
  831. },
  832. "500": {
  833. "$ref": "#/responses/error"
  834. }
  835. }
  836. }
  837. },
  838. "/version": {
  839. "get": {
  840. "description": "This show current running Gitea application version.",
  841. "produces": [
  842. "application/json"
  843. ],
  844. "summary": "Return Gitea running version.",
  845. "operationId": "getVersion",
  846. "responses": {
  847. "200": {
  848. "$ref": "#/responses/ServerVersion"
  849. }
  850. }
  851. }
  852. }
  853. },
  854. "definitions": {
  855. "GPGKey": {
  856. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  857. "type": "object",
  858. "properties": {
  859. "can_certify": {
  860. "type": "boolean",
  861. "x-go-name": "CanCertify"
  862. },
  863. "can_encrypt_comms": {
  864. "type": "boolean",
  865. "x-go-name": "CanEncryptComms"
  866. },
  867. "can_encrypt_storage": {
  868. "type": "boolean",
  869. "x-go-name": "CanEncryptStorage"
  870. },
  871. "can_sign": {
  872. "type": "boolean",
  873. "x-go-name": "CanSign"
  874. },
  875. "created_at": {
  876. "x-go-name": "Created"
  877. },
  878. "emails": {
  879. "type": "array",
  880. "items": {
  881. "$ref": "#/definitions/GPGKeyEmail"
  882. },
  883. "x-go-name": "Emails"
  884. },
  885. "expires_at": {
  886. "x-go-name": "Expires"
  887. },
  888. "id": {
  889. "type": "integer",
  890. "format": "int64",
  891. "x-go-name": "ID"
  892. },
  893. "key_id": {
  894. "type": "string",
  895. "x-go-name": "KeyID"
  896. },
  897. "primary_key_id": {
  898. "type": "string",
  899. "x-go-name": "PrimaryKeyID"
  900. },
  901. "public_key": {
  902. "type": "string",
  903. "x-go-name": "PublicKey"
  904. },
  905. "subkeys": {
  906. "type": "array",
  907. "items": {
  908. "type": "object"
  909. },
  910. "x-go-name": "SubsKey"
  911. }
  912. },
  913. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  914. },
  915. "GPGKeyEmail": {
  916. "description": "GPGKeyEmail a email attache to a GPGKey",
  917. "type": "object",
  918. "properties": {
  919. "email": {
  920. "type": "string",
  921. "x-go-name": "Email"
  922. },
  923. "verified": {
  924. "type": "boolean",
  925. "x-go-name": "Verified"
  926. }
  927. },
  928. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  929. },
  930. "Permission": {
  931. "type": "object",
  932. "title": "Permission represents a API permission.",
  933. "properties": {
  934. "admin": {
  935. "type": "boolean",
  936. "x-go-name": "Admin"
  937. },
  938. "pull": {
  939. "type": "boolean",
  940. "x-go-name": "Pull"
  941. },
  942. "push": {
  943. "type": "boolean",
  944. "x-go-name": "Push"
  945. }
  946. },
  947. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  948. },
  949. "Repository": {
  950. "type": "object",
  951. "title": "Repository represents a API repository.",
  952. "properties": {
  953. "clone_url": {
  954. "type": "string",
  955. "x-go-name": "CloneURL"
  956. },
  957. "created_at": {
  958. "x-go-name": "Created"
  959. },
  960. "default_branch": {
  961. "type": "string",
  962. "x-go-name": "DefaultBranch"
  963. },
  964. "description": {
  965. "type": "string",
  966. "x-go-name": "Description"
  967. },
  968. "empty": {
  969. "type": "boolean",
  970. "x-go-name": "Empty"
  971. },
  972. "fork": {
  973. "type": "boolean",
  974. "x-go-name": "Fork"
  975. },
  976. "forks_count": {
  977. "type": "integer",
  978. "format": "int64",
  979. "x-go-name": "Forks"
  980. },
  981. "full_name": {
  982. "type": "string",
  983. "x-go-name": "FullName"
  984. },
  985. "html_url": {
  986. "type": "string",
  987. "x-go-name": "HTMLURL"
  988. },
  989. "id": {
  990. "type": "integer",
  991. "format": "int64",
  992. "x-go-name": "ID"
  993. },
  994. "mirror": {
  995. "type": "boolean",
  996. "x-go-name": "Mirror"
  997. },
  998. "name": {
  999. "type": "string",
  1000. "x-go-name": "Name"
  1001. },
  1002. "open_issues_count": {
  1003. "type": "integer",
  1004. "format": "int64",
  1005. "x-go-name": "OpenIssues"
  1006. },
  1007. "owner": {
  1008. "$ref": "#/definitions/User"
  1009. },
  1010. "parent": {
  1011. "type": "object"
  1012. },
  1013. "permissions": {
  1014. "$ref": "#/definitions/Permission"
  1015. },
  1016. "private": {
  1017. "type": "boolean",
  1018. "x-go-name": "Private"
  1019. },
  1020. "size": {
  1021. "type": "integer",
  1022. "format": "int64",
  1023. "x-go-name": "Size"
  1024. },
  1025. "ssh_url": {
  1026. "type": "string",
  1027. "x-go-name": "SSHURL"
  1028. },
  1029. "stars_count": {
  1030. "type": "integer",
  1031. "format": "int64",
  1032. "x-go-name": "Stars"
  1033. },
  1034. "updated_at": {
  1035. "x-go-name": "Updated"
  1036. },
  1037. "watchers_count": {
  1038. "type": "integer",
  1039. "format": "int64",
  1040. "x-go-name": "Watchers"
  1041. },
  1042. "website": {
  1043. "type": "string",
  1044. "x-go-name": "Website"
  1045. }
  1046. },
  1047. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  1048. },
  1049. "User": {
  1050. "type": "object",
  1051. "title": "User represents a API user.",
  1052. "properties": {
  1053. "avatar_url": {
  1054. "type": "string",
  1055. "x-go-name": "AvatarURL"
  1056. },
  1057. "email": {
  1058. "type": "string",
  1059. "x-go-name": "Email"
  1060. },
  1061. "full_name": {
  1062. "type": "string",
  1063. "x-go-name": "FullName"
  1064. },
  1065. "id": {
  1066. "type": "integer",
  1067. "format": "int64",
  1068. "x-go-name": "ID"
  1069. },
  1070. "login": {
  1071. "type": "string",
  1072. "x-go-name": "UserName"
  1073. }
  1074. },
  1075. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  1076. }
  1077. },
  1078. "responses": {
  1079. "AccessToken": {
  1080. "description": "AccessToken represents a API access token.",
  1081. "headers": {
  1082. "name": {
  1083. "type": "string"
  1084. },
  1085. "sha1": {
  1086. "type": "string"
  1087. }
  1088. }
  1089. },
  1090. "AccessTokenList": {
  1091. "description": "AccessTokenList represents a list of API access token."
  1092. },
  1093. "GPGKey": {
  1094. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  1095. "headers": {
  1096. "can_certify": {
  1097. "type": "boolean"
  1098. },
  1099. "can_encrypt_comms": {
  1100. "type": "boolean"
  1101. },
  1102. "can_encrypt_storage": {
  1103. "type": "boolean"
  1104. },
  1105. "can_sign": {
  1106. "type": "boolean"
  1107. },
  1108. "created_at": {},
  1109. "emails": {
  1110. "type": "array",
  1111. "items": {
  1112. "$ref": "#/definitions/GPGKeyEmail"
  1113. }
  1114. },
  1115. "expires_at": {},
  1116. "id": {
  1117. "type": "integer",
  1118. "format": "int64"
  1119. },
  1120. "key_id": {
  1121. "type": "string"
  1122. },
  1123. "primary_key_id": {
  1124. "type": "string"
  1125. },
  1126. "public_key": {
  1127. "type": "string"
  1128. },
  1129. "subkeys": {
  1130. "type": "array",
  1131. "items": {
  1132. "type": "object"
  1133. }
  1134. }
  1135. }
  1136. },
  1137. "GPGKeyList": {
  1138. "description": "GPGKeyList represents a list of GPGKey"
  1139. },
  1140. "MarkdownRender": {
  1141. "description": "MarkdownRender is a rendered markdown document"
  1142. },
  1143. "PublicKey": {
  1144. "description": "PublicKey publickey is a user key to push code to repository",
  1145. "headers": {
  1146. "created_at": {},
  1147. "id": {
  1148. "type": "integer",
  1149. "format": "int64"
  1150. },
  1151. "key": {
  1152. "type": "string"
  1153. },
  1154. "title": {
  1155. "type": "string"
  1156. },
  1157. "url": {
  1158. "type": "string"
  1159. }
  1160. }
  1161. },
  1162. "PublicKeyList": {
  1163. "description": "PublicKeyList represents a list of PublicKey"
  1164. },
  1165. "Repository": {
  1166. "description": "Repository represents a API repository.",
  1167. "schema": {
  1168. "$ref": "#/definitions/Permission"
  1169. },
  1170. "headers": {
  1171. "clone_url": {
  1172. "type": "string"
  1173. },
  1174. "created_at": {},
  1175. "default_branch": {
  1176. "type": "string"
  1177. },
  1178. "description": {
  1179. "type": "string"
  1180. },
  1181. "empty": {
  1182. "type": "boolean"
  1183. },
  1184. "fork": {
  1185. "type": "boolean"
  1186. },
  1187. "forks_count": {
  1188. "type": "integer",
  1189. "format": "int64"
  1190. },
  1191. "full_name": {
  1192. "type": "string"
  1193. },
  1194. "html_url": {
  1195. "type": "string"
  1196. },
  1197. "id": {
  1198. "type": "integer",
  1199. "format": "int64"
  1200. },
  1201. "mirror": {
  1202. "type": "boolean"
  1203. },
  1204. "name": {
  1205. "type": "string"
  1206. },
  1207. "open_issues_count": {
  1208. "type": "integer",
  1209. "format": "int64"
  1210. },
  1211. "owner": {},
  1212. "parent": {},
  1213. "permissions": {},
  1214. "private": {
  1215. "type": "boolean"
  1216. },
  1217. "size": {
  1218. "type": "integer",
  1219. "format": "int64"
  1220. },
  1221. "ssh_url": {
  1222. "type": "string"
  1223. },
  1224. "stars_count": {
  1225. "type": "integer",
  1226. "format": "int64"
  1227. },
  1228. "updated_at": {},
  1229. "watchers_count": {
  1230. "type": "integer",
  1231. "format": "int64"
  1232. },
  1233. "website": {
  1234. "type": "string"
  1235. }
  1236. }
  1237. },
  1238. "RepositoryList": {
  1239. "description": "RepositoryList represents a list of API repository."
  1240. },
  1241. "SearchError": {
  1242. "description": "SearchError error of failing search",
  1243. "headers": {
  1244. "error": {
  1245. "type": "string"
  1246. },
  1247. "ok": {
  1248. "type": "boolean"
  1249. }
  1250. }
  1251. },
  1252. "SearchResults": {
  1253. "description": "SearchResults results of search",
  1254. "headers": {
  1255. "data": {
  1256. "type": "array",
  1257. "items": {
  1258. "$ref": "#/definitions/Repository"
  1259. }
  1260. },
  1261. "ok": {
  1262. "type": "boolean"
  1263. }
  1264. }
  1265. },
  1266. "ServerVersion": {
  1267. "description": "ServerVersion wraps the version of the server",
  1268. "headers": {
  1269. "Version": {
  1270. "type": "string"
  1271. }
  1272. }
  1273. },
  1274. "User": {
  1275. "description": "User represents a API user.",
  1276. "headers": {
  1277. "avatar_url": {
  1278. "type": "string"
  1279. },
  1280. "email": {
  1281. "type": "string"
  1282. },
  1283. "full_name": {
  1284. "type": "string"
  1285. },
  1286. "id": {
  1287. "type": "integer",
  1288. "format": "int64"
  1289. },
  1290. "login": {
  1291. "type": "string"
  1292. }
  1293. }
  1294. },
  1295. "UserList": {
  1296. "description": "UserList represents a list of API user."
  1297. },
  1298. "WatchInfo": {
  1299. "description": "WatchInfo represents a API watch status of one repository",
  1300. "schema": {
  1301. "type": "object"
  1302. },
  1303. "headers": {
  1304. "created_at": {},
  1305. "ignored": {
  1306. "type": "boolean"
  1307. },
  1308. "reason": {},
  1309. "repository_url": {
  1310. "type": "string"
  1311. },
  1312. "subscribed": {
  1313. "type": "boolean"
  1314. },
  1315. "url": {
  1316. "type": "string"
  1317. }
  1318. }
  1319. },
  1320. "empty": {
  1321. "description": "APIEmpty is an empty response"
  1322. },
  1323. "error": {
  1324. "description": "APIError is error format response",
  1325. "headers": {
  1326. "message": {
  1327. "type": "string"
  1328. },
  1329. "url": {
  1330. "type": "string"
  1331. }
  1332. }
  1333. },
  1334. "forbidden": {
  1335. "description": "APIForbiddenError is a forbidden error response",
  1336. "headers": {
  1337. "message": {
  1338. "type": "string"
  1339. },
  1340. "url": {
  1341. "type": "string"
  1342. }
  1343. }
  1344. },
  1345. "notFound": {
  1346. "description": "APINotFound is a not found empty response"
  1347. },
  1348. "validationError": {
  1349. "description": "APIValidationError is error format response related to input validation",
  1350. "headers": {
  1351. "message": {
  1352. "type": "string"
  1353. },
  1354. "url": {
  1355. "type": "string"
  1356. }
  1357. }
  1358. }
  1359. }
  1360. }