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

1289 lines
29 KiB

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