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

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