本站源代码
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

11090 行
272KB

  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 documentation describes the Gitea API.",
  17. "title": "Gitea API.",
  18. "license": {
  19. "name": "MIT",
  20. "url": "http://opensource.org/licenses/MIT"
  21. },
  22. "version": "1.1.1"
  23. },
  24. "basePath": "{{AppSubUrl}}/api/v1",
  25. "paths": {
  26. "/admin/orgs": {
  27. "get": {
  28. "produces": [
  29. "application/json"
  30. ],
  31. "tags": [
  32. "admin"
  33. ],
  34. "summary": "List all organizations",
  35. "operationId": "adminGetAllOrgs",
  36. "parameters": [
  37. {
  38. "type": "integer",
  39. "description": "page number of results to return (1-based)",
  40. "name": "page",
  41. "in": "query"
  42. },
  43. {
  44. "type": "integer",
  45. "description": "page size of results, maximum page size is 50",
  46. "name": "limit",
  47. "in": "query"
  48. }
  49. ],
  50. "responses": {
  51. "200": {
  52. "$ref": "#/responses/OrganizationList"
  53. },
  54. "403": {
  55. "$ref": "#/responses/forbidden"
  56. }
  57. }
  58. }
  59. },
  60. "/admin/users": {
  61. "get": {
  62. "produces": [
  63. "application/json"
  64. ],
  65. "tags": [
  66. "admin"
  67. ],
  68. "summary": "List all users",
  69. "operationId": "adminGetAllUsers",
  70. "responses": {
  71. "200": {
  72. "$ref": "#/responses/UserList"
  73. },
  74. "403": {
  75. "$ref": "#/responses/forbidden"
  76. }
  77. }
  78. },
  79. "post": {
  80. "consumes": [
  81. "application/json"
  82. ],
  83. "produces": [
  84. "application/json"
  85. ],
  86. "tags": [
  87. "admin"
  88. ],
  89. "summary": "Create a user",
  90. "operationId": "adminCreateUser",
  91. "parameters": [
  92. {
  93. "name": "body",
  94. "in": "body",
  95. "schema": {
  96. "$ref": "#/definitions/CreateUserOption"
  97. }
  98. }
  99. ],
  100. "responses": {
  101. "201": {
  102. "$ref": "#/responses/User"
  103. },
  104. "403": {
  105. "$ref": "#/responses/forbidden"
  106. },
  107. "422": {
  108. "$ref": "#/responses/validationError"
  109. }
  110. }
  111. }
  112. },
  113. "/admin/users/{username}": {
  114. "delete": {
  115. "produces": [
  116. "application/json"
  117. ],
  118. "tags": [
  119. "admin"
  120. ],
  121. "summary": "Delete a user",
  122. "operationId": "adminDeleteUser",
  123. "parameters": [
  124. {
  125. "type": "string",
  126. "description": "username of user to delete",
  127. "name": "username",
  128. "in": "path",
  129. "required": true
  130. }
  131. ],
  132. "responses": {
  133. "204": {
  134. "$ref": "#/responses/empty"
  135. },
  136. "403": {
  137. "$ref": "#/responses/forbidden"
  138. },
  139. "422": {
  140. "$ref": "#/responses/validationError"
  141. }
  142. }
  143. },
  144. "patch": {
  145. "consumes": [
  146. "application/json"
  147. ],
  148. "produces": [
  149. "application/json"
  150. ],
  151. "tags": [
  152. "admin"
  153. ],
  154. "summary": "Edit an existing user",
  155. "operationId": "adminEditUser",
  156. "parameters": [
  157. {
  158. "type": "string",
  159. "description": "username of user to edit",
  160. "name": "username",
  161. "in": "path",
  162. "required": true
  163. },
  164. {
  165. "name": "body",
  166. "in": "body",
  167. "schema": {
  168. "$ref": "#/definitions/EditUserOption"
  169. }
  170. }
  171. ],
  172. "responses": {
  173. "200": {
  174. "$ref": "#/responses/User"
  175. },
  176. "403": {
  177. "$ref": "#/responses/forbidden"
  178. },
  179. "422": {
  180. "$ref": "#/responses/validationError"
  181. }
  182. }
  183. }
  184. },
  185. "/admin/users/{username}/keys": {
  186. "post": {
  187. "consumes": [
  188. "application/json"
  189. ],
  190. "produces": [
  191. "application/json"
  192. ],
  193. "tags": [
  194. "admin"
  195. ],
  196. "summary": "Add a public key on behalf of a user",
  197. "operationId": "adminCreatePublicKey",
  198. "parameters": [
  199. {
  200. "type": "string",
  201. "description": "username of the user",
  202. "name": "username",
  203. "in": "path",
  204. "required": true
  205. },
  206. {
  207. "name": "key",
  208. "in": "body",
  209. "schema": {
  210. "$ref": "#/definitions/CreateKeyOption"
  211. }
  212. }
  213. ],
  214. "responses": {
  215. "201": {
  216. "$ref": "#/responses/PublicKey"
  217. },
  218. "403": {
  219. "$ref": "#/responses/forbidden"
  220. },
  221. "422": {
  222. "$ref": "#/responses/validationError"
  223. }
  224. }
  225. }
  226. },
  227. "/admin/users/{username}/keys/{id}": {
  228. "delete": {
  229. "produces": [
  230. "application/json"
  231. ],
  232. "tags": [
  233. "admin"
  234. ],
  235. "summary": "Delete a user's public key",
  236. "operationId": "adminDeleteUserPublicKey",
  237. "parameters": [
  238. {
  239. "type": "string",
  240. "description": "username of user",
  241. "name": "username",
  242. "in": "path",
  243. "required": true
  244. },
  245. {
  246. "type": "integer",
  247. "format": "int64",
  248. "description": "id of the key to delete",
  249. "name": "id",
  250. "in": "path",
  251. "required": true
  252. }
  253. ],
  254. "responses": {
  255. "204": {
  256. "$ref": "#/responses/empty"
  257. },
  258. "403": {
  259. "$ref": "#/responses/forbidden"
  260. },
  261. "404": {
  262. "$ref": "#/responses/notFound"
  263. }
  264. }
  265. }
  266. },
  267. "/admin/users/{username}/orgs": {
  268. "post": {
  269. "consumes": [
  270. "application/json"
  271. ],
  272. "produces": [
  273. "application/json"
  274. ],
  275. "tags": [
  276. "admin"
  277. ],
  278. "summary": "Create an organization",
  279. "operationId": "adminCreateOrg",
  280. "parameters": [
  281. {
  282. "type": "string",
  283. "description": "username of the user that will own the created organization",
  284. "name": "username",
  285. "in": "path",
  286. "required": true
  287. },
  288. {
  289. "name": "organization",
  290. "in": "body",
  291. "required": true,
  292. "schema": {
  293. "$ref": "#/definitions/CreateOrgOption"
  294. }
  295. }
  296. ],
  297. "responses": {
  298. "201": {
  299. "$ref": "#/responses/Organization"
  300. },
  301. "403": {
  302. "$ref": "#/responses/forbidden"
  303. },
  304. "422": {
  305. "$ref": "#/responses/validationError"
  306. }
  307. }
  308. }
  309. },
  310. "/admin/users/{username}/repos": {
  311. "post": {
  312. "consumes": [
  313. "application/json"
  314. ],
  315. "produces": [
  316. "application/json"
  317. ],
  318. "tags": [
  319. "admin"
  320. ],
  321. "summary": "Create a repository on behalf a user",
  322. "operationId": "adminCreateRepo",
  323. "parameters": [
  324. {
  325. "type": "string",
  326. "description": "username of the user. This user will own the created repository",
  327. "name": "username",
  328. "in": "path",
  329. "required": true
  330. },
  331. {
  332. "name": "repository",
  333. "in": "body",
  334. "required": true,
  335. "schema": {
  336. "$ref": "#/definitions/CreateRepoOption"
  337. }
  338. }
  339. ],
  340. "responses": {
  341. "201": {
  342. "$ref": "#/responses/Repository"
  343. },
  344. "403": {
  345. "$ref": "#/responses/forbidden"
  346. },
  347. "422": {
  348. "$ref": "#/responses/validationError"
  349. }
  350. }
  351. }
  352. },
  353. "/markdown": {
  354. "post": {
  355. "consumes": [
  356. "application/json"
  357. ],
  358. "produces": [
  359. "text/html"
  360. ],
  361. "tags": [
  362. "miscellaneous"
  363. ],
  364. "summary": "Render a markdown document as HTML",
  365. "operationId": "renderMarkdown",
  366. "parameters": [
  367. {
  368. "name": "body",
  369. "in": "body",
  370. "schema": {
  371. "$ref": "#/definitions/MarkdownOption"
  372. }
  373. }
  374. ],
  375. "responses": {
  376. "200": {
  377. "$ref": "#/responses/MarkdownRender"
  378. },
  379. "422": {
  380. "$ref": "#/responses/validationError"
  381. }
  382. }
  383. }
  384. },
  385. "/markdown/raw": {
  386. "post": {
  387. "consumes": [
  388. "text/plain"
  389. ],
  390. "produces": [
  391. "text/html"
  392. ],
  393. "tags": [
  394. "miscellaneous"
  395. ],
  396. "summary": "Render raw markdown as HTML",
  397. "operationId": "renderMarkdownRaw",
  398. "parameters": [
  399. {
  400. "description": "Request body to render",
  401. "name": "body",
  402. "in": "body",
  403. "required": true,
  404. "schema": {
  405. "type": "string"
  406. }
  407. }
  408. ],
  409. "responses": {
  410. "200": {
  411. "$ref": "#/responses/MarkdownRender"
  412. },
  413. "422": {
  414. "$ref": "#/responses/validationError"
  415. }
  416. }
  417. }
  418. },
  419. "/org/{org}/repos": {
  420. "post": {
  421. "consumes": [
  422. "application/json"
  423. ],
  424. "produces": [
  425. "application/json"
  426. ],
  427. "tags": [
  428. "organization"
  429. ],
  430. "summary": "Create a repository in an organization",
  431. "operationId": "createOrgRepo",
  432. "parameters": [
  433. {
  434. "type": "string",
  435. "description": "name of organization",
  436. "name": "org",
  437. "in": "path",
  438. "required": true
  439. },
  440. {
  441. "name": "body",
  442. "in": "body",
  443. "schema": {
  444. "$ref": "#/definitions/CreateRepoOption"
  445. }
  446. }
  447. ],
  448. "responses": {
  449. "201": {
  450. "$ref": "#/responses/Repository"
  451. },
  452. "403": {
  453. "$ref": "#/responses/forbidden"
  454. },
  455. "422": {
  456. "$ref": "#/responses/validationError"
  457. }
  458. }
  459. }
  460. },
  461. "/orgs": {
  462. "post": {
  463. "consumes": [
  464. "application/json"
  465. ],
  466. "produces": [
  467. "application/json"
  468. ],
  469. "tags": [
  470. "organization"
  471. ],
  472. "summary": "Create an organization",
  473. "operationId": "orgCreate",
  474. "parameters": [
  475. {
  476. "name": "organization",
  477. "in": "body",
  478. "required": true,
  479. "schema": {
  480. "$ref": "#/definitions/CreateOrgOption"
  481. }
  482. }
  483. ],
  484. "responses": {
  485. "201": {
  486. "$ref": "#/responses/Organization"
  487. },
  488. "403": {
  489. "$ref": "#/responses/forbidden"
  490. },
  491. "422": {
  492. "$ref": "#/responses/validationError"
  493. }
  494. }
  495. }
  496. },
  497. "/orgs/{org}": {
  498. "get": {
  499. "produces": [
  500. "application/json"
  501. ],
  502. "tags": [
  503. "organization"
  504. ],
  505. "summary": "Get an organization",
  506. "operationId": "orgGet",
  507. "parameters": [
  508. {
  509. "type": "string",
  510. "description": "name of the organization to get",
  511. "name": "org",
  512. "in": "path",
  513. "required": true
  514. }
  515. ],
  516. "responses": {
  517. "200": {
  518. "$ref": "#/responses/Organization"
  519. }
  520. }
  521. },
  522. "delete": {
  523. "produces": [
  524. "application/json"
  525. ],
  526. "tags": [
  527. "organization"
  528. ],
  529. "summary": "Delete an organization",
  530. "operationId": "orgDelete",
  531. "parameters": [
  532. {
  533. "type": "string",
  534. "description": "organization that is to be deleted",
  535. "name": "org",
  536. "in": "path",
  537. "required": true
  538. }
  539. ],
  540. "responses": {
  541. "204": {
  542. "$ref": "#/responses/empty"
  543. }
  544. }
  545. },
  546. "patch": {
  547. "consumes": [
  548. "application/json"
  549. ],
  550. "produces": [
  551. "application/json"
  552. ],
  553. "tags": [
  554. "organization"
  555. ],
  556. "summary": "Edit an organization",
  557. "operationId": "orgEdit",
  558. "parameters": [
  559. {
  560. "type": "string",
  561. "description": "name of the organization to edit",
  562. "name": "org",
  563. "in": "path",
  564. "required": true
  565. },
  566. {
  567. "name": "body",
  568. "in": "body",
  569. "required": true,
  570. "schema": {
  571. "$ref": "#/definitions/EditOrgOption"
  572. }
  573. }
  574. ],
  575. "responses": {
  576. "200": {
  577. "$ref": "#/responses/Organization"
  578. }
  579. }
  580. }
  581. },
  582. "/orgs/{org}/hooks": {
  583. "get": {
  584. "produces": [
  585. "application/json"
  586. ],
  587. "tags": [
  588. "organization"
  589. ],
  590. "summary": "List an organization's webhooks",
  591. "operationId": "orgListHooks",
  592. "parameters": [
  593. {
  594. "type": "string",
  595. "description": "name of the organization",
  596. "name": "org",
  597. "in": "path",
  598. "required": true
  599. }
  600. ],
  601. "responses": {
  602. "200": {
  603. "$ref": "#/responses/HookList"
  604. }
  605. }
  606. }
  607. },
  608. "/orgs/{org}/hooks/": {
  609. "post": {
  610. "consumes": [
  611. "application/json"
  612. ],
  613. "produces": [
  614. "application/json"
  615. ],
  616. "tags": [
  617. "organization"
  618. ],
  619. "summary": "Create a hook",
  620. "operationId": "orgCreateHook",
  621. "parameters": [
  622. {
  623. "type": "string",
  624. "description": "name of the organization",
  625. "name": "org",
  626. "in": "path",
  627. "required": true
  628. },
  629. {
  630. "name": "body",
  631. "in": "body",
  632. "required": true,
  633. "schema": {
  634. "$ref": "#/definitions/CreateHookOption"
  635. }
  636. }
  637. ],
  638. "responses": {
  639. "201": {
  640. "$ref": "#/responses/Hook"
  641. }
  642. }
  643. }
  644. },
  645. "/orgs/{org}/hooks/{id}": {
  646. "get": {
  647. "produces": [
  648. "application/json"
  649. ],
  650. "tags": [
  651. "organization"
  652. ],
  653. "summary": "Get a hook",
  654. "operationId": "orgGetHook",
  655. "parameters": [
  656. {
  657. "type": "string",
  658. "description": "name of the organization",
  659. "name": "org",
  660. "in": "path",
  661. "required": true
  662. },
  663. {
  664. "type": "integer",
  665. "format": "int64",
  666. "description": "id of the hook to get",
  667. "name": "id",
  668. "in": "path",
  669. "required": true
  670. }
  671. ],
  672. "responses": {
  673. "200": {
  674. "$ref": "#/responses/Hook"
  675. }
  676. }
  677. },
  678. "delete": {
  679. "produces": [
  680. "application/json"
  681. ],
  682. "tags": [
  683. "organization"
  684. ],
  685. "summary": "Delete a hook",
  686. "operationId": "orgDeleteHook",
  687. "parameters": [
  688. {
  689. "type": "string",
  690. "description": "name of the organization",
  691. "name": "org",
  692. "in": "path",
  693. "required": true
  694. },
  695. {
  696. "type": "integer",
  697. "format": "int64",
  698. "description": "id of the hook to delete",
  699. "name": "id",
  700. "in": "path",
  701. "required": true
  702. }
  703. ],
  704. "responses": {
  705. "204": {
  706. "$ref": "#/responses/empty"
  707. }
  708. }
  709. },
  710. "patch": {
  711. "consumes": [
  712. "application/json"
  713. ],
  714. "produces": [
  715. "application/json"
  716. ],
  717. "tags": [
  718. "organization"
  719. ],
  720. "summary": "Update a hook",
  721. "operationId": "orgEditHook",
  722. "parameters": [
  723. {
  724. "type": "string",
  725. "description": "name of the organization",
  726. "name": "org",
  727. "in": "path",
  728. "required": true
  729. },
  730. {
  731. "type": "integer",
  732. "format": "int64",
  733. "description": "id of the hook to update",
  734. "name": "id",
  735. "in": "path",
  736. "required": true
  737. },
  738. {
  739. "name": "body",
  740. "in": "body",
  741. "schema": {
  742. "$ref": "#/definitions/EditHookOption"
  743. }
  744. }
  745. ],
  746. "responses": {
  747. "200": {
  748. "$ref": "#/responses/Hook"
  749. }
  750. }
  751. }
  752. },
  753. "/orgs/{org}/members": {
  754. "get": {
  755. "produces": [
  756. "application/json"
  757. ],
  758. "tags": [
  759. "organization"
  760. ],
  761. "summary": "List an organization's members",
  762. "operationId": "orgListMembers",
  763. "parameters": [
  764. {
  765. "type": "string",
  766. "description": "name of the organization",
  767. "name": "org",
  768. "in": "path",
  769. "required": true
  770. }
  771. ],
  772. "responses": {
  773. "200": {
  774. "$ref": "#/responses/UserList"
  775. }
  776. }
  777. }
  778. },
  779. "/orgs/{org}/members/{username}": {
  780. "get": {
  781. "tags": [
  782. "organization"
  783. ],
  784. "summary": "Check if a user is a member of an organization",
  785. "operationId": "orgIsMember",
  786. "parameters": [
  787. {
  788. "type": "string",
  789. "description": "name of the organization",
  790. "name": "org",
  791. "in": "path",
  792. "required": true
  793. },
  794. {
  795. "type": "string",
  796. "description": "username of the user",
  797. "name": "username",
  798. "in": "path",
  799. "required": true
  800. }
  801. ],
  802. "responses": {
  803. "204": {
  804. "description": "user is a member"
  805. },
  806. "404": {
  807. "description": "user is not a member"
  808. }
  809. }
  810. },
  811. "delete": {
  812. "produces": [
  813. "application/json"
  814. ],
  815. "tags": [
  816. "organization"
  817. ],
  818. "summary": "Remove a member from an organization",
  819. "operationId": "orgDeleteMember",
  820. "parameters": [
  821. {
  822. "type": "string",
  823. "description": "name of the organization",
  824. "name": "org",
  825. "in": "path",
  826. "required": true
  827. },
  828. {
  829. "type": "string",
  830. "description": "username of the user",
  831. "name": "username",
  832. "in": "path",
  833. "required": true
  834. }
  835. ],
  836. "responses": {
  837. "204": {
  838. "description": "member removed"
  839. }
  840. }
  841. }
  842. },
  843. "/orgs/{org}/public_members": {
  844. "get": {
  845. "produces": [
  846. "application/json"
  847. ],
  848. "tags": [
  849. "organization"
  850. ],
  851. "summary": "List an organization's public members",
  852. "operationId": "orgListPublicMembers",
  853. "parameters": [
  854. {
  855. "type": "string",
  856. "description": "name of the organization",
  857. "name": "org",
  858. "in": "path",
  859. "required": true
  860. }
  861. ],
  862. "responses": {
  863. "200": {
  864. "$ref": "#/responses/UserList"
  865. }
  866. }
  867. }
  868. },
  869. "/orgs/{org}/public_members/{username}": {
  870. "get": {
  871. "tags": [
  872. "organization"
  873. ],
  874. "summary": "Check if a user is a public member of an organization",
  875. "operationId": "orgIsPublicMember",
  876. "parameters": [
  877. {
  878. "type": "string",
  879. "description": "name of the organization",
  880. "name": "org",
  881. "in": "path",
  882. "required": true
  883. },
  884. {
  885. "type": "string",
  886. "description": "username of the user",
  887. "name": "username",
  888. "in": "path",
  889. "required": true
  890. }
  891. ],
  892. "responses": {
  893. "204": {
  894. "description": "user is a public member"
  895. },
  896. "404": {
  897. "description": "user is not a public member"
  898. }
  899. }
  900. },
  901. "put": {
  902. "produces": [
  903. "application/json"
  904. ],
  905. "tags": [
  906. "organization"
  907. ],
  908. "summary": "Publicize a user's membership",
  909. "operationId": "orgPublicizeMember",
  910. "parameters": [
  911. {
  912. "type": "string",
  913. "description": "name of the organization",
  914. "name": "org",
  915. "in": "path",
  916. "required": true
  917. },
  918. {
  919. "type": "string",
  920. "description": "username of the user",
  921. "name": "username",
  922. "in": "path",
  923. "required": true
  924. }
  925. ],
  926. "responses": {
  927. "204": {
  928. "description": "membership publicized"
  929. }
  930. }
  931. },
  932. "delete": {
  933. "produces": [
  934. "application/json"
  935. ],
  936. "tags": [
  937. "organization"
  938. ],
  939. "summary": "Conceal a user's membership",
  940. "operationId": "orgConcealMember",
  941. "parameters": [
  942. {
  943. "type": "string",
  944. "description": "name of the organization",
  945. "name": "org",
  946. "in": "path",
  947. "required": true
  948. },
  949. {
  950. "type": "string",
  951. "description": "username of the user",
  952. "name": "username",
  953. "in": "path",
  954. "required": true
  955. }
  956. ],
  957. "responses": {
  958. "204": {
  959. "$ref": "#/responses/empty"
  960. }
  961. }
  962. }
  963. },
  964. "/orgs/{org}/repos": {
  965. "get": {
  966. "produces": [
  967. "application/json"
  968. ],
  969. "tags": [
  970. "organization"
  971. ],
  972. "summary": "List an organization's repos",
  973. "operationId": "orgListRepos",
  974. "parameters": [
  975. {
  976. "type": "string",
  977. "description": "name of the organization",
  978. "name": "org",
  979. "in": "path",
  980. "required": true
  981. }
  982. ],
  983. "responses": {
  984. "200": {
  985. "$ref": "#/responses/RepositoryList"
  986. }
  987. }
  988. }
  989. },
  990. "/orgs/{org}/teams": {
  991. "get": {
  992. "produces": [
  993. "application/json"
  994. ],
  995. "tags": [
  996. "organization"
  997. ],
  998. "summary": "List an organization's teams",
  999. "operationId": "orgListTeams",
  1000. "parameters": [
  1001. {
  1002. "type": "string",
  1003. "description": "name of the organization",
  1004. "name": "org",
  1005. "in": "path",
  1006. "required": true
  1007. }
  1008. ],
  1009. "responses": {
  1010. "200": {
  1011. "$ref": "#/responses/TeamList"
  1012. }
  1013. }
  1014. },
  1015. "post": {
  1016. "consumes": [
  1017. "application/json"
  1018. ],
  1019. "produces": [
  1020. "application/json"
  1021. ],
  1022. "tags": [
  1023. "organization"
  1024. ],
  1025. "summary": "Create a team",
  1026. "operationId": "orgCreateTeam",
  1027. "parameters": [
  1028. {
  1029. "type": "string",
  1030. "description": "name of the organization",
  1031. "name": "org",
  1032. "in": "path",
  1033. "required": true
  1034. },
  1035. {
  1036. "name": "body",
  1037. "in": "body",
  1038. "schema": {
  1039. "$ref": "#/definitions/CreateTeamOption"
  1040. }
  1041. }
  1042. ],
  1043. "responses": {
  1044. "201": {
  1045. "$ref": "#/responses/Team"
  1046. }
  1047. }
  1048. }
  1049. },
  1050. "/orgs/{org}/teams/search": {
  1051. "get": {
  1052. "produces": [
  1053. "application/json"
  1054. ],
  1055. "tags": [
  1056. "organization"
  1057. ],
  1058. "summary": "Search for teams within an organization",
  1059. "operationId": "teamSearch",
  1060. "parameters": [
  1061. {
  1062. "type": "string",
  1063. "description": "name of the organization",
  1064. "name": "org",
  1065. "in": "path",
  1066. "required": true
  1067. },
  1068. {
  1069. "type": "string",
  1070. "description": "keywords to search",
  1071. "name": "q",
  1072. "in": "query"
  1073. },
  1074. {
  1075. "type": "boolean",
  1076. "description": "include search within team description (defaults to true)",
  1077. "name": "include_desc",
  1078. "in": "query"
  1079. },
  1080. {
  1081. "type": "integer",
  1082. "description": "limit size of results",
  1083. "name": "limit",
  1084. "in": "query"
  1085. },
  1086. {
  1087. "type": "integer",
  1088. "description": "page number of results to return (1-based)",
  1089. "name": "page",
  1090. "in": "query"
  1091. }
  1092. ],
  1093. "responses": {
  1094. "200": {
  1095. "description": "SearchResults of a successful search",
  1096. "schema": {
  1097. "type": "object",
  1098. "properties": {
  1099. "data": {
  1100. "type": "array",
  1101. "items": {
  1102. "$ref": "#/definitions/Team"
  1103. }
  1104. },
  1105. "ok": {
  1106. "type": "boolean"
  1107. }
  1108. }
  1109. }
  1110. }
  1111. }
  1112. }
  1113. },
  1114. "/repos/migrate": {
  1115. "post": {
  1116. "consumes": [
  1117. "application/json"
  1118. ],
  1119. "produces": [
  1120. "application/json"
  1121. ],
  1122. "tags": [
  1123. "repository"
  1124. ],
  1125. "summary": "Migrate a remote git repository",
  1126. "operationId": "repoMigrate",
  1127. "parameters": [
  1128. {
  1129. "name": "body",
  1130. "in": "body",
  1131. "schema": {
  1132. "$ref": "#/definitions/MigrateRepoForm"
  1133. }
  1134. }
  1135. ],
  1136. "responses": {
  1137. "201": {
  1138. "$ref": "#/responses/Repository"
  1139. }
  1140. }
  1141. }
  1142. },
  1143. "/repos/search": {
  1144. "get": {
  1145. "produces": [
  1146. "application/json"
  1147. ],
  1148. "tags": [
  1149. "repository"
  1150. ],
  1151. "summary": "Search for repositories",
  1152. "operationId": "repoSearch",
  1153. "parameters": [
  1154. {
  1155. "type": "string",
  1156. "description": "keyword",
  1157. "name": "q",
  1158. "in": "query"
  1159. },
  1160. {
  1161. "type": "boolean",
  1162. "description": "Limit search to repositories with keyword as topic",
  1163. "name": "topic",
  1164. "in": "query"
  1165. },
  1166. {
  1167. "type": "boolean",
  1168. "description": "include search of keyword within repository description",
  1169. "name": "includeDesc",
  1170. "in": "query"
  1171. },
  1172. {
  1173. "type": "integer",
  1174. "format": "int64",
  1175. "description": "search only for repos that the user with the given id owns or contributes to",
  1176. "name": "uid",
  1177. "in": "query"
  1178. },
  1179. {
  1180. "type": "integer",
  1181. "format": "int64",
  1182. "description": "search only for repos that the user with the given id has starred",
  1183. "name": "starredBy",
  1184. "in": "query"
  1185. },
  1186. {
  1187. "type": "boolean",
  1188. "description": "include private repositories this user has access to (defaults to true)",
  1189. "name": "private",
  1190. "in": "query"
  1191. },
  1192. {
  1193. "type": "integer",
  1194. "description": "page number of results to return (1-based)",
  1195. "name": "page",
  1196. "in": "query"
  1197. },
  1198. {
  1199. "type": "integer",
  1200. "description": "page size of results, maximum page size is 50",
  1201. "name": "limit",
  1202. "in": "query"
  1203. },
  1204. {
  1205. "type": "string",
  1206. "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"",
  1207. "name": "mode",
  1208. "in": "query"
  1209. },
  1210. {
  1211. "type": "boolean",
  1212. "description": "if `uid` is given, search only for repos that the user owns",
  1213. "name": "exclusive",
  1214. "in": "query"
  1215. },
  1216. {
  1217. "type": "string",
  1218. "description": "sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"",
  1219. "name": "sort",
  1220. "in": "query"
  1221. },
  1222. {
  1223. "type": "string",
  1224. "description": "sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.",
  1225. "name": "order",
  1226. "in": "query"
  1227. }
  1228. ],
  1229. "responses": {
  1230. "200": {
  1231. "$ref": "#/responses/SearchResults"
  1232. },
  1233. "422": {
  1234. "$ref": "#/responses/validationError"
  1235. }
  1236. }
  1237. }
  1238. },
  1239. "/repos/{owner}/{repo}": {
  1240. "get": {
  1241. "produces": [
  1242. "application/json"
  1243. ],
  1244. "tags": [
  1245. "repository"
  1246. ],
  1247. "summary": "Get a repository",
  1248. "operationId": "repoGet",
  1249. "parameters": [
  1250. {
  1251. "type": "string",
  1252. "description": "owner of the repo",
  1253. "name": "owner",
  1254. "in": "path",
  1255. "required": true
  1256. },
  1257. {
  1258. "type": "string",
  1259. "description": "name of the repo",
  1260. "name": "repo",
  1261. "in": "path",
  1262. "required": true
  1263. }
  1264. ],
  1265. "responses": {
  1266. "200": {
  1267. "$ref": "#/responses/Repository"
  1268. }
  1269. }
  1270. },
  1271. "delete": {
  1272. "produces": [
  1273. "application/json"
  1274. ],
  1275. "tags": [
  1276. "repository"
  1277. ],
  1278. "summary": "Delete a repository",
  1279. "operationId": "repoDelete",
  1280. "parameters": [
  1281. {
  1282. "type": "string",
  1283. "description": "owner of the repo to delete",
  1284. "name": "owner",
  1285. "in": "path",
  1286. "required": true
  1287. },
  1288. {
  1289. "type": "string",
  1290. "description": "name of the repo to delete",
  1291. "name": "repo",
  1292. "in": "path",
  1293. "required": true
  1294. }
  1295. ],
  1296. "responses": {
  1297. "204": {
  1298. "$ref": "#/responses/empty"
  1299. },
  1300. "403": {
  1301. "$ref": "#/responses/forbidden"
  1302. }
  1303. }
  1304. },
  1305. "patch": {
  1306. "produces": [
  1307. "application/json"
  1308. ],
  1309. "tags": [
  1310. "repository"
  1311. ],
  1312. "summary": "Edit a repository's properties. Only fields that are set will be changed.",
  1313. "operationId": "repoEdit",
  1314. "parameters": [
  1315. {
  1316. "type": "string",
  1317. "description": "owner of the repo to edit",
  1318. "name": "owner",
  1319. "in": "path",
  1320. "required": true
  1321. },
  1322. {
  1323. "type": "string",
  1324. "description": "name of the repo to edit",
  1325. "name": "repo",
  1326. "in": "path",
  1327. "required": true
  1328. },
  1329. {
  1330. "description": "Properties of a repo that you can edit",
  1331. "name": "body",
  1332. "in": "body",
  1333. "schema": {
  1334. "$ref": "#/definitions/EditRepoOption"
  1335. }
  1336. }
  1337. ],
  1338. "responses": {
  1339. "200": {
  1340. "$ref": "#/responses/Repository"
  1341. },
  1342. "403": {
  1343. "$ref": "#/responses/forbidden"
  1344. },
  1345. "422": {
  1346. "$ref": "#/responses/validationError"
  1347. }
  1348. }
  1349. }
  1350. },
  1351. "/repos/{owner}/{repo}/archive/{archive}": {
  1352. "get": {
  1353. "produces": [
  1354. "application/json"
  1355. ],
  1356. "tags": [
  1357. "repository"
  1358. ],
  1359. "summary": "Get an archive of a repository",
  1360. "operationId": "repoGetArchive",
  1361. "parameters": [
  1362. {
  1363. "type": "string",
  1364. "description": "owner of the repo",
  1365. "name": "owner",
  1366. "in": "path",
  1367. "required": true
  1368. },
  1369. {
  1370. "type": "string",
  1371. "description": "name of the repo",
  1372. "name": "repo",
  1373. "in": "path",
  1374. "required": true
  1375. },
  1376. {
  1377. "type": "string",
  1378. "description": "archive to download, consisting of a git reference and archive",
  1379. "name": "archive",
  1380. "in": "path",
  1381. "required": true
  1382. }
  1383. ],
  1384. "responses": {
  1385. "200": {
  1386. "description": "success"
  1387. }
  1388. }
  1389. }
  1390. },
  1391. "/repos/{owner}/{repo}/branches": {
  1392. "get": {
  1393. "produces": [
  1394. "application/json"
  1395. ],
  1396. "tags": [
  1397. "repository"
  1398. ],
  1399. "summary": "List a repository's branches",
  1400. "operationId": "repoListBranches",
  1401. "parameters": [
  1402. {
  1403. "type": "string",
  1404. "description": "owner of the repo",
  1405. "name": "owner",
  1406. "in": "path",
  1407. "required": true
  1408. },
  1409. {
  1410. "type": "string",
  1411. "description": "name of the repo",
  1412. "name": "repo",
  1413. "in": "path",
  1414. "required": true
  1415. }
  1416. ],
  1417. "responses": {
  1418. "200": {
  1419. "$ref": "#/responses/BranchList"
  1420. }
  1421. }
  1422. }
  1423. },
  1424. "/repos/{owner}/{repo}/branches/{branch}": {
  1425. "get": {
  1426. "produces": [
  1427. "application/json"
  1428. ],
  1429. "tags": [
  1430. "repository"
  1431. ],
  1432. "summary": "Retrieve a specific branch from a repository",
  1433. "operationId": "repoGetBranch",
  1434. "parameters": [
  1435. {
  1436. "type": "string",
  1437. "description": "owner of the repo",
  1438. "name": "owner",
  1439. "in": "path",
  1440. "required": true
  1441. },
  1442. {
  1443. "type": "string",
  1444. "description": "name of the repo",
  1445. "name": "repo",
  1446. "in": "path",
  1447. "required": true
  1448. },
  1449. {
  1450. "type": "string",
  1451. "description": "branch to get",
  1452. "name": "branch",
  1453. "in": "path",
  1454. "required": true
  1455. }
  1456. ],
  1457. "responses": {
  1458. "200": {
  1459. "$ref": "#/responses/Branch"
  1460. }
  1461. }
  1462. }
  1463. },
  1464. "/repos/{owner}/{repo}/collaborators": {
  1465. "get": {
  1466. "produces": [
  1467. "application/json"
  1468. ],
  1469. "tags": [
  1470. "repository"
  1471. ],
  1472. "summary": "List a repository's collaborators",
  1473. "operationId": "repoListCollaborators",
  1474. "parameters": [
  1475. {
  1476. "type": "string",
  1477. "description": "owner of the repo",
  1478. "name": "owner",
  1479. "in": "path",
  1480. "required": true
  1481. },
  1482. {
  1483. "type": "string",
  1484. "description": "name of the repo",
  1485. "name": "repo",
  1486. "in": "path",
  1487. "required": true
  1488. }
  1489. ],
  1490. "responses": {
  1491. "200": {
  1492. "$ref": "#/responses/UserList"
  1493. }
  1494. }
  1495. }
  1496. },
  1497. "/repos/{owner}/{repo}/collaborators/{collaborator}": {
  1498. "get": {
  1499. "produces": [
  1500. "application/json"
  1501. ],
  1502. "tags": [
  1503. "repository"
  1504. ],
  1505. "summary": "Check if a user is a collaborator of a repository",
  1506. "operationId": "repoCheckCollaborator",
  1507. "parameters": [
  1508. {
  1509. "type": "string",
  1510. "description": "owner of the repo",
  1511. "name": "owner",
  1512. "in": "path",
  1513. "required": true
  1514. },
  1515. {
  1516. "type": "string",
  1517. "description": "name of the repo",
  1518. "name": "repo",
  1519. "in": "path",
  1520. "required": true
  1521. },
  1522. {
  1523. "type": "string",
  1524. "description": "username of the collaborator",
  1525. "name": "collaborator",
  1526. "in": "path",
  1527. "required": true
  1528. }
  1529. ],
  1530. "responses": {
  1531. "204": {
  1532. "$ref": "#/responses/empty"
  1533. },
  1534. "404": {
  1535. "$ref": "#/responses/empty"
  1536. }
  1537. }
  1538. },
  1539. "put": {
  1540. "produces": [
  1541. "application/json"
  1542. ],
  1543. "tags": [
  1544. "repository"
  1545. ],
  1546. "summary": "Add a collaborator to a repository",
  1547. "operationId": "repoAddCollaborator",
  1548. "parameters": [
  1549. {
  1550. "type": "string",
  1551. "description": "owner of the repo",
  1552. "name": "owner",
  1553. "in": "path",
  1554. "required": true
  1555. },
  1556. {
  1557. "type": "string",
  1558. "description": "name of the repo",
  1559. "name": "repo",
  1560. "in": "path",
  1561. "required": true
  1562. },
  1563. {
  1564. "type": "string",
  1565. "description": "username of the collaborator to add",
  1566. "name": "collaborator",
  1567. "in": "path",
  1568. "required": true
  1569. },
  1570. {
  1571. "name": "body",
  1572. "in": "body",
  1573. "schema": {
  1574. "$ref": "#/definitions/AddCollaboratorOption"
  1575. }
  1576. }
  1577. ],
  1578. "responses": {
  1579. "204": {
  1580. "$ref": "#/responses/empty"
  1581. }
  1582. }
  1583. },
  1584. "delete": {
  1585. "produces": [
  1586. "application/json"
  1587. ],
  1588. "tags": [
  1589. "repository"
  1590. ],
  1591. "summary": "Delete a collaborator from a repository",
  1592. "operationId": "repoDeleteCollaborator",
  1593. "parameters": [
  1594. {
  1595. "type": "string",
  1596. "description": "owner of the repo",
  1597. "name": "owner",
  1598. "in": "path",
  1599. "required": true
  1600. },
  1601. {
  1602. "type": "string",
  1603. "description": "name of the repo",
  1604. "name": "repo",
  1605. "in": "path",
  1606. "required": true
  1607. },
  1608. {
  1609. "type": "string",
  1610. "description": "username of the collaborator to delete",
  1611. "name": "collaborator",
  1612. "in": "path",
  1613. "required": true
  1614. }
  1615. ],
  1616. "responses": {
  1617. "204": {
  1618. "$ref": "#/responses/empty"
  1619. }
  1620. }
  1621. }
  1622. },
  1623. "/repos/{owner}/{repo}/commits": {
  1624. "get": {
  1625. "produces": [
  1626. "application/json"
  1627. ],
  1628. "tags": [
  1629. "repository"
  1630. ],
  1631. "summary": "Get a list of all commits from a repository",
  1632. "operationId": "repoGetAllCommits",
  1633. "parameters": [
  1634. {
  1635. "type": "string",
  1636. "description": "owner of the repo",
  1637. "name": "owner",
  1638. "in": "path",
  1639. "required": true
  1640. },
  1641. {
  1642. "type": "string",
  1643. "description": "name of the repo",
  1644. "name": "repo",
  1645. "in": "path",
  1646. "required": true
  1647. },
  1648. {
  1649. "type": "string",
  1650. "description": "SHA or branch to start listing commits from (usually 'master')",
  1651. "name": "sha",
  1652. "in": "query"
  1653. },
  1654. {
  1655. "type": "integer",
  1656. "description": "page number of requested commits",
  1657. "name": "page",
  1658. "in": "query"
  1659. }
  1660. ],
  1661. "responses": {
  1662. "200": {
  1663. "$ref": "#/responses/CommitList"
  1664. },
  1665. "404": {
  1666. "$ref": "#/responses/notFound"
  1667. },
  1668. "409": {
  1669. "$ref": "#/responses/EmptyRepository"
  1670. }
  1671. }
  1672. }
  1673. },
  1674. "/repos/{owner}/{repo}/commits/{ref}/statuses": {
  1675. "get": {
  1676. "produces": [
  1677. "application/json"
  1678. ],
  1679. "tags": [
  1680. "repository"
  1681. ],
  1682. "summary": "Get a commit's combined status, by branch/tag/commit reference",
  1683. "operationId": "repoGetCombinedStatusByRef",
  1684. "parameters": [
  1685. {
  1686. "type": "string",
  1687. "description": "owner of the repo",
  1688. "name": "owner",
  1689. "in": "path",
  1690. "required": true
  1691. },
  1692. {
  1693. "type": "string",
  1694. "description": "name of the repo",
  1695. "name": "repo",
  1696. "in": "path",
  1697. "required": true
  1698. },
  1699. {
  1700. "type": "string",
  1701. "description": "name of branch/tag/commit",
  1702. "name": "ref",
  1703. "in": "path",
  1704. "required": true
  1705. },
  1706. {
  1707. "type": "integer",
  1708. "description": "page number of results",
  1709. "name": "page",
  1710. "in": "query"
  1711. }
  1712. ],
  1713. "responses": {
  1714. "200": {
  1715. "$ref": "#/responses/Status"
  1716. }
  1717. }
  1718. }
  1719. },
  1720. "/repos/{owner}/{repo}/contents": {
  1721. "get": {
  1722. "produces": [
  1723. "application/json"
  1724. ],
  1725. "tags": [
  1726. "repository"
  1727. ],
  1728. "summary": "Gets the metadata of all the entries of the root dir",
  1729. "operationId": "repoGetContentsList",
  1730. "parameters": [
  1731. {
  1732. "type": "string",
  1733. "description": "owner of the repo",
  1734. "name": "owner",
  1735. "in": "path",
  1736. "required": true
  1737. },
  1738. {
  1739. "type": "string",
  1740. "description": "name of the repo",
  1741. "name": "repo",
  1742. "in": "path",
  1743. "required": true
  1744. },
  1745. {
  1746. "type": "string",
  1747. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  1748. "name": "ref",
  1749. "in": "query"
  1750. }
  1751. ],
  1752. "responses": {
  1753. "200": {
  1754. "$ref": "#/responses/ContentsListResponse"
  1755. }
  1756. }
  1757. }
  1758. },
  1759. "/repos/{owner}/{repo}/contents/{filepath}": {
  1760. "get": {
  1761. "produces": [
  1762. "application/json"
  1763. ],
  1764. "tags": [
  1765. "repository"
  1766. ],
  1767. "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir",
  1768. "operationId": "repoGetContents",
  1769. "parameters": [
  1770. {
  1771. "type": "string",
  1772. "description": "owner of the repo",
  1773. "name": "owner",
  1774. "in": "path",
  1775. "required": true
  1776. },
  1777. {
  1778. "type": "string",
  1779. "description": "name of the repo",
  1780. "name": "repo",
  1781. "in": "path",
  1782. "required": true
  1783. },
  1784. {
  1785. "type": "string",
  1786. "description": "path of the dir, file, symlink or submodule in the repo",
  1787. "name": "filepath",
  1788. "in": "path",
  1789. "required": true
  1790. },
  1791. {
  1792. "type": "string",
  1793. "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
  1794. "name": "ref",
  1795. "in": "query"
  1796. }
  1797. ],
  1798. "responses": {
  1799. "200": {
  1800. "$ref": "#/responses/ContentsResponse"
  1801. }
  1802. }
  1803. },
  1804. "put": {
  1805. "consumes": [
  1806. "application/json"
  1807. ],
  1808. "produces": [
  1809. "application/json"
  1810. ],
  1811. "tags": [
  1812. "repository"
  1813. ],
  1814. "summary": "Update a file in a repository",
  1815. "operationId": "repoUpdateFile",
  1816. "parameters": [
  1817. {
  1818. "type": "string",
  1819. "description": "owner of the repo",
  1820. "name": "owner",
  1821. "in": "path",
  1822. "required": true
  1823. },
  1824. {
  1825. "type": "string",
  1826. "description": "name of the repo",
  1827. "name": "repo",
  1828. "in": "path",
  1829. "required": true
  1830. },
  1831. {
  1832. "type": "string",
  1833. "description": "path of the file to update",
  1834. "name": "filepath",
  1835. "in": "path",
  1836. "required": true
  1837. },
  1838. {
  1839. "name": "body",
  1840. "in": "body",
  1841. "required": true,
  1842. "schema": {
  1843. "$ref": "#/definitions/UpdateFileOptions"
  1844. }
  1845. }
  1846. ],
  1847. "responses": {
  1848. "200": {
  1849. "$ref": "#/responses/FileResponse"
  1850. }
  1851. }
  1852. },
  1853. "post": {
  1854. "consumes": [
  1855. "application/json"
  1856. ],
  1857. "produces": [
  1858. "application/json"
  1859. ],
  1860. "tags": [
  1861. "repository"
  1862. ],
  1863. "summary": "Create a file in a repository",
  1864. "operationId": "repoCreateFile",
  1865. "parameters": [
  1866. {
  1867. "type": "string",
  1868. "description": "owner of the repo",
  1869. "name": "owner",
  1870. "in": "path",
  1871. "required": true
  1872. },
  1873. {
  1874. "type": "string",
  1875. "description": "name of the repo",
  1876. "name": "repo",
  1877. "in": "path",
  1878. "required": true
  1879. },
  1880. {
  1881. "type": "string",
  1882. "description": "path of the file to create",
  1883. "name": "filepath",
  1884. "in": "path",
  1885. "required": true
  1886. },
  1887. {
  1888. "name": "body",
  1889. "in": "body",
  1890. "required": true,
  1891. "schema": {
  1892. "$ref": "#/definitions/CreateFileOptions"
  1893. }
  1894. }
  1895. ],
  1896. "responses": {
  1897. "201": {
  1898. "$ref": "#/responses/FileResponse"
  1899. }
  1900. }
  1901. },
  1902. "delete": {
  1903. "consumes": [
  1904. "application/json"
  1905. ],
  1906. "produces": [
  1907. "application/json"
  1908. ],
  1909. "tags": [
  1910. "repository"
  1911. ],
  1912. "summary": "Delete a file in a repository",
  1913. "operationId": "repoDeleteFile",
  1914. "parameters": [
  1915. {
  1916. "type": "string",
  1917. "description": "owner of the repo",
  1918. "name": "owner",
  1919. "in": "path",
  1920. "required": true
  1921. },
  1922. {
  1923. "type": "string",
  1924. "description": "name of the repo",
  1925. "name": "repo",
  1926. "in": "path",
  1927. "required": true
  1928. },
  1929. {
  1930. "type": "string",
  1931. "description": "path of the file to delete",
  1932. "name": "filepath",
  1933. "in": "path",
  1934. "required": true
  1935. },
  1936. {
  1937. "name": "body",
  1938. "in": "body",
  1939. "required": true,
  1940. "schema": {
  1941. "$ref": "#/definitions/DeleteFileOptions"
  1942. }
  1943. }
  1944. ],
  1945. "responses": {
  1946. "200": {
  1947. "$ref": "#/responses/FileDeleteResponse"
  1948. }
  1949. }
  1950. }
  1951. },
  1952. "/repos/{owner}/{repo}/editorconfig/{filepath}": {
  1953. "get": {
  1954. "produces": [
  1955. "application/json"
  1956. ],
  1957. "tags": [
  1958. "repository"
  1959. ],
  1960. "summary": "Get the EditorConfig definitions of a file in a repository",
  1961. "operationId": "repoGetEditorConfig",
  1962. "parameters": [
  1963. {
  1964. "type": "string",
  1965. "description": "owner of the repo",
  1966. "name": "owner",
  1967. "in": "path",
  1968. "required": true
  1969. },
  1970. {
  1971. "type": "string",
  1972. "description": "name of the repo",
  1973. "name": "repo",
  1974. "in": "path",
  1975. "required": true
  1976. },
  1977. {
  1978. "type": "string",
  1979. "description": "filepath of file to get",
  1980. "name": "filepath",
  1981. "in": "path",
  1982. "required": true
  1983. }
  1984. ],
  1985. "responses": {
  1986. "200": {
  1987. "description": "success"
  1988. }
  1989. }
  1990. }
  1991. },
  1992. "/repos/{owner}/{repo}/forks": {
  1993. "get": {
  1994. "produces": [
  1995. "application/json"
  1996. ],
  1997. "tags": [
  1998. "repository"
  1999. ],
  2000. "summary": "List a repository's forks",
  2001. "operationId": "listForks",
  2002. "parameters": [
  2003. {
  2004. "type": "string",
  2005. "description": "owner of the repo",
  2006. "name": "owner",
  2007. "in": "path",
  2008. "required": true
  2009. },
  2010. {
  2011. "type": "string",
  2012. "description": "name of the repo",
  2013. "name": "repo",
  2014. "in": "path",
  2015. "required": true
  2016. }
  2017. ],
  2018. "responses": {
  2019. "200": {
  2020. "$ref": "#/responses/RepositoryList"
  2021. }
  2022. }
  2023. },
  2024. "post": {
  2025. "produces": [
  2026. "application/json"
  2027. ],
  2028. "tags": [
  2029. "repository"
  2030. ],
  2031. "summary": "Fork a repository",
  2032. "operationId": "createFork",
  2033. "parameters": [
  2034. {
  2035. "type": "string",
  2036. "description": "owner of the repo to fork",
  2037. "name": "owner",
  2038. "in": "path",
  2039. "required": true
  2040. },
  2041. {
  2042. "type": "string",
  2043. "description": "name of the repo to fork",
  2044. "name": "repo",
  2045. "in": "path",
  2046. "required": true
  2047. },
  2048. {
  2049. "name": "body",
  2050. "in": "body",
  2051. "schema": {
  2052. "$ref": "#/definitions/CreateForkOption"
  2053. }
  2054. }
  2055. ],
  2056. "responses": {
  2057. "202": {
  2058. "$ref": "#/responses/Repository"
  2059. }
  2060. }
  2061. }
  2062. },
  2063. "/repos/{owner}/{repo}/git/blobs/{sha}": {
  2064. "get": {
  2065. "produces": [
  2066. "application/json"
  2067. ],
  2068. "tags": [
  2069. "repository"
  2070. ],
  2071. "summary": "Gets the blob of a repository.",
  2072. "operationId": "GetBlob",
  2073. "parameters": [
  2074. {
  2075. "type": "string",
  2076. "description": "owner of the repo",
  2077. "name": "owner",
  2078. "in": "path",
  2079. "required": true
  2080. },
  2081. {
  2082. "type": "string",
  2083. "description": "name of the repo",
  2084. "name": "repo",
  2085. "in": "path",
  2086. "required": true
  2087. },
  2088. {
  2089. "type": "string",
  2090. "description": "sha of the commit",
  2091. "name": "sha",
  2092. "in": "path",
  2093. "required": true
  2094. }
  2095. ],
  2096. "responses": {
  2097. "200": {
  2098. "$ref": "#/responses/GitBlobResponse"
  2099. }
  2100. }
  2101. }
  2102. },
  2103. "/repos/{owner}/{repo}/git/commits/{sha}": {
  2104. "get": {
  2105. "produces": [
  2106. "application/json"
  2107. ],
  2108. "tags": [
  2109. "repository"
  2110. ],
  2111. "summary": "Get a single commit from a repository",
  2112. "operationId": "repoGetSingleCommit",
  2113. "parameters": [
  2114. {
  2115. "type": "string",
  2116. "description": "owner of the repo",
  2117. "name": "owner",
  2118. "in": "path",
  2119. "required": true
  2120. },
  2121. {
  2122. "type": "string",
  2123. "description": "name of the repo",
  2124. "name": "repo",
  2125. "in": "path",
  2126. "required": true
  2127. },
  2128. {
  2129. "type": "string",
  2130. "description": "the commit hash",
  2131. "name": "sha",
  2132. "in": "path",
  2133. "required": true
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "$ref": "#/responses/Commit"
  2139. },
  2140. "404": {
  2141. "$ref": "#/responses/notFound"
  2142. }
  2143. }
  2144. }
  2145. },
  2146. "/repos/{owner}/{repo}/git/refs": {
  2147. "get": {
  2148. "produces": [
  2149. "application/json"
  2150. ],
  2151. "tags": [
  2152. "repository"
  2153. ],
  2154. "summary": "Get specified ref or filtered repository's refs",
  2155. "operationId": "repoListAllGitRefs",
  2156. "parameters": [
  2157. {
  2158. "type": "string",
  2159. "description": "owner of the repo",
  2160. "name": "owner",
  2161. "in": "path",
  2162. "required": true
  2163. },
  2164. {
  2165. "type": "string",
  2166. "description": "name of the repo",
  2167. "name": "repo",
  2168. "in": "path",
  2169. "required": true
  2170. }
  2171. ],
  2172. "responses": {
  2173. "200": {
  2174. "$ref": "#/responses/ReferenceList"
  2175. },
  2176. "404": {
  2177. "$ref": "#/responses/notFound"
  2178. }
  2179. }
  2180. }
  2181. },
  2182. "/repos/{owner}/{repo}/git/refs/{ref}": {
  2183. "get": {
  2184. "produces": [
  2185. "application/json"
  2186. ],
  2187. "tags": [
  2188. "repository"
  2189. ],
  2190. "summary": "Get specified ref or filtered repository's refs",
  2191. "operationId": "repoListGitRefs",
  2192. "parameters": [
  2193. {
  2194. "type": "string",
  2195. "description": "owner of the repo",
  2196. "name": "owner",
  2197. "in": "path",
  2198. "required": true
  2199. },
  2200. {
  2201. "type": "string",
  2202. "description": "name of the repo",
  2203. "name": "repo",
  2204. "in": "path",
  2205. "required": true
  2206. },
  2207. {
  2208. "type": "string",
  2209. "description": "part or full name of the ref",
  2210. "name": "ref",
  2211. "in": "path",
  2212. "required": true
  2213. }
  2214. ],
  2215. "responses": {
  2216. "200": {
  2217. "$ref": "#/responses/ReferenceList"
  2218. },
  2219. "404": {
  2220. "$ref": "#/responses/notFound"
  2221. }
  2222. }
  2223. }
  2224. },
  2225. "/repos/{owner}/{repo}/git/tags/{sha}": {
  2226. "get": {
  2227. "produces": [
  2228. "application/json"
  2229. ],
  2230. "tags": [
  2231. "repository"
  2232. ],
  2233. "summary": "Gets the tag object of an annotated tag (not lightweight tags)",
  2234. "operationId": "GetTag",
  2235. "parameters": [
  2236. {
  2237. "type": "string",
  2238. "description": "owner of the repo",
  2239. "name": "owner",
  2240. "in": "path",
  2241. "required": true
  2242. },
  2243. {
  2244. "type": "string",
  2245. "description": "name of the repo",
  2246. "name": "repo",
  2247. "in": "path",
  2248. "required": true
  2249. },
  2250. {
  2251. "type": "string",
  2252. "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.",
  2253. "name": "sha",
  2254. "in": "path",
  2255. "required": true
  2256. }
  2257. ],
  2258. "responses": {
  2259. "200": {
  2260. "$ref": "#/responses/AnnotatedTag"
  2261. }
  2262. }
  2263. }
  2264. },
  2265. "/repos/{owner}/{repo}/git/trees/{sha}": {
  2266. "get": {
  2267. "produces": [
  2268. "application/json"
  2269. ],
  2270. "tags": [
  2271. "repository"
  2272. ],
  2273. "summary": "Gets the tree of a repository.",
  2274. "operationId": "GetTree",
  2275. "parameters": [
  2276. {
  2277. "type": "string",
  2278. "description": "owner of the repo",
  2279. "name": "owner",
  2280. "in": "path",
  2281. "required": true
  2282. },
  2283. {
  2284. "type": "string",
  2285. "description": "name of the repo",
  2286. "name": "repo",
  2287. "in": "path",
  2288. "required": true
  2289. },
  2290. {
  2291. "type": "string",
  2292. "description": "sha of the commit",
  2293. "name": "sha",
  2294. "in": "path",
  2295. "required": true
  2296. },
  2297. {
  2298. "type": "boolean",
  2299. "description": "show all directories and files",
  2300. "name": "recursive",
  2301. "in": "query"
  2302. },
  2303. {
  2304. "type": "integer",
  2305. "description": "page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page",
  2306. "name": "page",
  2307. "in": "query"
  2308. },
  2309. {
  2310. "type": "integer",
  2311. "description": "number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE",
  2312. "name": "per_page",
  2313. "in": "query"
  2314. }
  2315. ],
  2316. "responses": {
  2317. "200": {
  2318. "$ref": "#/responses/GitTreeResponse"
  2319. }
  2320. }
  2321. }
  2322. },
  2323. "/repos/{owner}/{repo}/hooks": {
  2324. "get": {
  2325. "produces": [
  2326. "application/json"
  2327. ],
  2328. "tags": [
  2329. "repository"
  2330. ],
  2331. "summary": "List the hooks in a repository",
  2332. "operationId": "repoListHooks",
  2333. "parameters": [
  2334. {
  2335. "type": "string",
  2336. "description": "owner of the repo",
  2337. "name": "owner",
  2338. "in": "path",
  2339. "required": true
  2340. },
  2341. {
  2342. "type": "string",
  2343. "description": "name of the repo",
  2344. "name": "repo",
  2345. "in": "path",
  2346. "required": true
  2347. }
  2348. ],
  2349. "responses": {
  2350. "200": {
  2351. "$ref": "#/responses/HookList"
  2352. }
  2353. }
  2354. },
  2355. "post": {
  2356. "consumes": [
  2357. "application/json"
  2358. ],
  2359. "produces": [
  2360. "application/json"
  2361. ],
  2362. "tags": [
  2363. "repository"
  2364. ],
  2365. "summary": "Create a hook",
  2366. "operationId": "repoCreateHook",
  2367. "parameters": [
  2368. {
  2369. "type": "string",
  2370. "description": "owner of the repo",
  2371. "name": "owner",
  2372. "in": "path",
  2373. "required": true
  2374. },
  2375. {
  2376. "type": "string",
  2377. "description": "name of the repo",
  2378. "name": "repo",
  2379. "in": "path",
  2380. "required": true
  2381. },
  2382. {
  2383. "name": "body",
  2384. "in": "body",
  2385. "schema": {
  2386. "$ref": "#/definitions/CreateHookOption"
  2387. }
  2388. }
  2389. ],
  2390. "responses": {
  2391. "201": {
  2392. "$ref": "#/responses/Hook"
  2393. }
  2394. }
  2395. }
  2396. },
  2397. "/repos/{owner}/{repo}/hooks/git": {
  2398. "get": {
  2399. "produces": [
  2400. "application/json"
  2401. ],
  2402. "tags": [
  2403. "repository"
  2404. ],
  2405. "summary": "List the Git hooks in a repository",
  2406. "operationId": "repoListGitHooks",
  2407. "parameters": [
  2408. {
  2409. "type": "string",
  2410. "description": "owner of the repo",
  2411. "name": "owner",
  2412. "in": "path",
  2413. "required": true
  2414. },
  2415. {
  2416. "type": "string",
  2417. "description": "name of the repo",
  2418. "name": "repo",
  2419. "in": "path",
  2420. "required": true
  2421. }
  2422. ],
  2423. "responses": {
  2424. "200": {
  2425. "$ref": "#/responses/GitHookList"
  2426. }
  2427. }
  2428. }
  2429. },
  2430. "/repos/{owner}/{repo}/hooks/git/{id}": {
  2431. "get": {
  2432. "produces": [
  2433. "application/json"
  2434. ],
  2435. "tags": [
  2436. "repository"
  2437. ],
  2438. "summary": "Get a Git hook",
  2439. "operationId": "repoGetGitHook",
  2440. "parameters": [
  2441. {
  2442. "type": "string",
  2443. "description": "owner of the repo",
  2444. "name": "owner",
  2445. "in": "path",
  2446. "required": true
  2447. },
  2448. {
  2449. "type": "string",
  2450. "description": "name of the repo",
  2451. "name": "repo",
  2452. "in": "path",
  2453. "required": true
  2454. },
  2455. {
  2456. "type": "string",
  2457. "description": "id of the hook to get",
  2458. "name": "id",
  2459. "in": "path",
  2460. "required": true
  2461. }
  2462. ],
  2463. "responses": {
  2464. "200": {
  2465. "$ref": "#/responses/GitHook"
  2466. },
  2467. "404": {
  2468. "$ref": "#/responses/notFound"
  2469. }
  2470. }
  2471. },
  2472. "delete": {
  2473. "produces": [
  2474. "application/json"
  2475. ],
  2476. "tags": [
  2477. "repository"
  2478. ],
  2479. "summary": "Delete a Git hook in a repository",
  2480. "operationId": "repoDeleteGitHook",
  2481. "parameters": [
  2482. {
  2483. "type": "string",
  2484. "description": "owner of the repo",
  2485. "name": "owner",
  2486. "in": "path",
  2487. "required": true
  2488. },
  2489. {
  2490. "type": "string",
  2491. "description": "name of the repo",
  2492. "name": "repo",
  2493. "in": "path",
  2494. "required": true
  2495. },
  2496. {
  2497. "type": "string",
  2498. "description": "id of the hook to get",
  2499. "name": "id",
  2500. "in": "path",
  2501. "required": true
  2502. }
  2503. ],
  2504. "responses": {
  2505. "204": {
  2506. "$ref": "#/responses/empty"
  2507. },
  2508. "404": {
  2509. "$ref": "#/responses/notFound"
  2510. }
  2511. }
  2512. },
  2513. "patch": {
  2514. "produces": [
  2515. "application/json"
  2516. ],
  2517. "tags": [
  2518. "repository"
  2519. ],
  2520. "summary": "Edit a Git hook in a repository",
  2521. "operationId": "repoEditGitHook",
  2522. "parameters": [
  2523. {
  2524. "type": "string",
  2525. "description": "owner of the repo",
  2526. "name": "owner",
  2527. "in": "path",
  2528. "required": true
  2529. },
  2530. {
  2531. "type": "string",
  2532. "description": "name of the repo",
  2533. "name": "repo",
  2534. "in": "path",
  2535. "required": true
  2536. },
  2537. {
  2538. "type": "string",
  2539. "description": "id of the hook to get",
  2540. "name": "id",
  2541. "in": "path",
  2542. "required": true
  2543. },
  2544. {
  2545. "name": "body",
  2546. "in": "body",
  2547. "schema": {
  2548. "$ref": "#/definitions/EditGitHookOption"
  2549. }
  2550. }
  2551. ],
  2552. "responses": {
  2553. "200": {
  2554. "$ref": "#/responses/GitHook"
  2555. },
  2556. "404": {
  2557. "$ref": "#/responses/notFound"
  2558. }
  2559. }
  2560. }
  2561. },
  2562. "/repos/{owner}/{repo}/hooks/{id}": {
  2563. "get": {
  2564. "produces": [
  2565. "application/json"
  2566. ],
  2567. "tags": [
  2568. "repository"
  2569. ],
  2570. "summary": "Get a hook",
  2571. "operationId": "repoGetHook",
  2572. "parameters": [
  2573. {
  2574. "type": "string",
  2575. "description": "owner of the repo",
  2576. "name": "owner",
  2577. "in": "path",
  2578. "required": true
  2579. },
  2580. {
  2581. "type": "string",
  2582. "description": "name of the repo",
  2583. "name": "repo",
  2584. "in": "path",
  2585. "required": true
  2586. },
  2587. {
  2588. "type": "integer",
  2589. "format": "int64",
  2590. "description": "id of the hook to get",
  2591. "name": "id",
  2592. "in": "path",
  2593. "required": true
  2594. }
  2595. ],
  2596. "responses": {
  2597. "200": {
  2598. "$ref": "#/responses/Hook"
  2599. }
  2600. }
  2601. },
  2602. "delete": {
  2603. "produces": [
  2604. "application/json"
  2605. ],
  2606. "tags": [
  2607. "repository"
  2608. ],
  2609. "summary": "Delete a hook in a repository",
  2610. "operationId": "repoDeleteHook",
  2611. "parameters": [
  2612. {
  2613. "type": "string",
  2614. "description": "owner of the repo",
  2615. "name": "owner",
  2616. "in": "path",
  2617. "required": true
  2618. },
  2619. {
  2620. "type": "string",
  2621. "description": "name of the repo",
  2622. "name": "repo",
  2623. "in": "path",
  2624. "required": true
  2625. },
  2626. {
  2627. "type": "integer",
  2628. "format": "int64",
  2629. "description": "id of the hook to delete",
  2630. "name": "id",
  2631. "in": "path",
  2632. "required": true
  2633. }
  2634. ],
  2635. "responses": {
  2636. "204": {
  2637. "$ref": "#/responses/empty"
  2638. },
  2639. "404": {
  2640. "$ref": "#/responses/notFound"
  2641. }
  2642. }
  2643. },
  2644. "patch": {
  2645. "produces": [
  2646. "application/json"
  2647. ],
  2648. "tags": [
  2649. "repository"
  2650. ],
  2651. "summary": "Edit a hook in a repository",
  2652. "operationId": "repoEditHook",
  2653. "parameters": [
  2654. {
  2655. "type": "string",
  2656. "description": "owner of the repo",
  2657. "name": "owner",
  2658. "in": "path",
  2659. "required": true
  2660. },
  2661. {
  2662. "type": "string",
  2663. "description": "name of the repo",
  2664. "name": "repo",
  2665. "in": "path",
  2666. "required": true
  2667. },
  2668. {
  2669. "type": "integer",
  2670. "format": "int64",
  2671. "description": "index of the hook",
  2672. "name": "id",
  2673. "in": "path",
  2674. "required": true
  2675. },
  2676. {
  2677. "name": "body",
  2678. "in": "body",
  2679. "schema": {
  2680. "$ref": "#/definitions/EditHookOption"
  2681. }
  2682. }
  2683. ],
  2684. "responses": {
  2685. "200": {
  2686. "$ref": "#/responses/Hook"
  2687. }
  2688. }
  2689. }
  2690. },
  2691. "/repos/{owner}/{repo}/hooks/{id}/tests": {
  2692. "post": {
  2693. "produces": [
  2694. "application/json"
  2695. ],
  2696. "tags": [
  2697. "repository"
  2698. ],
  2699. "summary": "Test a push webhook",
  2700. "operationId": "repoTestHook",
  2701. "parameters": [
  2702. {
  2703. "type": "string",
  2704. "description": "owner of the repo",
  2705. "name": "owner",
  2706. "in": "path",
  2707. "required": true
  2708. },
  2709. {
  2710. "type": "string",
  2711. "description": "name of the repo",
  2712. "name": "repo",
  2713. "in": "path",
  2714. "required": true
  2715. },
  2716. {
  2717. "type": "integer",
  2718. "format": "int64",
  2719. "description": "id of the hook to test",
  2720. "name": "id",
  2721. "in": "path",
  2722. "required": true
  2723. }
  2724. ],
  2725. "responses": {
  2726. "204": {
  2727. "$ref": "#/responses/empty"
  2728. }
  2729. }
  2730. }
  2731. },
  2732. "/repos/{owner}/{repo}/issues": {
  2733. "get": {
  2734. "produces": [
  2735. "application/json"
  2736. ],
  2737. "tags": [
  2738. "issue"
  2739. ],
  2740. "summary": "List a repository's issues",
  2741. "operationId": "issueListIssues",
  2742. "parameters": [
  2743. {
  2744. "type": "string",
  2745. "description": "owner of the repo",
  2746. "name": "owner",
  2747. "in": "path",
  2748. "required": true
  2749. },
  2750. {
  2751. "type": "string",
  2752. "description": "name of the repo",
  2753. "name": "repo",
  2754. "in": "path",
  2755. "required": true
  2756. },
  2757. {
  2758. "type": "string",
  2759. "description": "whether issue is open or closed",
  2760. "name": "state",
  2761. "in": "query"
  2762. },
  2763. {
  2764. "type": "string",
  2765. "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded",
  2766. "name": "labels",
  2767. "in": "query"
  2768. },
  2769. {
  2770. "type": "integer",
  2771. "description": "page number of requested issues",
  2772. "name": "page",
  2773. "in": "query"
  2774. },
  2775. {
  2776. "type": "string",
  2777. "description": "search string",
  2778. "name": "q",
  2779. "in": "query"
  2780. }
  2781. ],
  2782. "responses": {
  2783. "200": {
  2784. "$ref": "#/responses/IssueList"
  2785. }
  2786. }
  2787. },
  2788. "post": {
  2789. "consumes": [
  2790. "application/json"
  2791. ],
  2792. "produces": [
  2793. "application/json"
  2794. ],
  2795. "tags": [
  2796. "issue"
  2797. ],
  2798. "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  2799. "operationId": "issueCreateIssue",
  2800. "parameters": [
  2801. {
  2802. "type": "string",
  2803. "description": "owner of the repo",
  2804. "name": "owner",
  2805. "in": "path",
  2806. "required": true
  2807. },
  2808. {
  2809. "type": "string",
  2810. "description": "name of the repo",
  2811. "name": "repo",
  2812. "in": "path",
  2813. "required": true
  2814. },
  2815. {
  2816. "name": "body",
  2817. "in": "body",
  2818. "schema": {
  2819. "$ref": "#/definitions/CreateIssueOption"
  2820. }
  2821. }
  2822. ],
  2823. "responses": {
  2824. "201": {
  2825. "$ref": "#/responses/Issue"
  2826. }
  2827. }
  2828. }
  2829. },
  2830. "/repos/{owner}/{repo}/issues/comments": {
  2831. "get": {
  2832. "produces": [
  2833. "application/json"
  2834. ],
  2835. "tags": [
  2836. "issue"
  2837. ],
  2838. "summary": "List all comments in a repository",
  2839. "operationId": "issueGetRepoComments",
  2840. "parameters": [
  2841. {
  2842. "type": "string",
  2843. "description": "owner of the repo",
  2844. "name": "owner",
  2845. "in": "path",
  2846. "required": true
  2847. },
  2848. {
  2849. "type": "string",
  2850. "description": "name of the repo",
  2851. "name": "repo",
  2852. "in": "path",
  2853. "required": true
  2854. },
  2855. {
  2856. "type": "string",
  2857. "description": "if provided, only comments updated since the provided time are returned.",
  2858. "name": "since",
  2859. "in": "query"
  2860. }
  2861. ],
  2862. "responses": {
  2863. "200": {
  2864. "$ref": "#/responses/CommentList"
  2865. }
  2866. }
  2867. }
  2868. },
  2869. "/repos/{owner}/{repo}/issues/comments/{id}": {
  2870. "delete": {
  2871. "tags": [
  2872. "issue"
  2873. ],
  2874. "summary": "Delete a comment",
  2875. "operationId": "issueDeleteComment",
  2876. "parameters": [
  2877. {
  2878. "type": "string",
  2879. "description": "owner of the repo",
  2880. "name": "owner",
  2881. "in": "path",
  2882. "required": true
  2883. },
  2884. {
  2885. "type": "string",
  2886. "description": "name of the repo",
  2887. "name": "repo",
  2888. "in": "path",
  2889. "required": true
  2890. },
  2891. {
  2892. "type": "integer",
  2893. "format": "int64",
  2894. "description": "id of comment to delete",
  2895. "name": "id",
  2896. "in": "path",
  2897. "required": true
  2898. }
  2899. ],
  2900. "responses": {
  2901. "204": {
  2902. "$ref": "#/responses/empty"
  2903. }
  2904. }
  2905. },
  2906. "patch": {
  2907. "consumes": [
  2908. "application/json"
  2909. ],
  2910. "produces": [
  2911. "application/json"
  2912. ],
  2913. "tags": [
  2914. "issue"
  2915. ],
  2916. "summary": "Edit a comment",
  2917. "operationId": "issueEditComment",
  2918. "parameters": [
  2919. {
  2920. "type": "string",
  2921. "description": "owner of the repo",
  2922. "name": "owner",
  2923. "in": "path",
  2924. "required": true
  2925. },
  2926. {
  2927. "type": "string",
  2928. "description": "name of the repo",
  2929. "name": "repo",
  2930. "in": "path",
  2931. "required": true
  2932. },
  2933. {
  2934. "type": "integer",
  2935. "format": "int64",
  2936. "description": "id of the comment to edit",
  2937. "name": "id",
  2938. "in": "path",
  2939. "required": true
  2940. },
  2941. {
  2942. "name": "body",
  2943. "in": "body",
  2944. "schema": {
  2945. "$ref": "#/definitions/EditIssueCommentOption"
  2946. }
  2947. }
  2948. ],
  2949. "responses": {
  2950. "200": {
  2951. "$ref": "#/responses/Comment"
  2952. }
  2953. }
  2954. }
  2955. },
  2956. "/repos/{owner}/{repo}/issues/{id}/times": {
  2957. "get": {
  2958. "produces": [
  2959. "application/json"
  2960. ],
  2961. "tags": [
  2962. "issue"
  2963. ],
  2964. "summary": "List an issue's tracked times",
  2965. "operationId": "issueTrackedTimes",
  2966. "parameters": [
  2967. {
  2968. "type": "string",
  2969. "description": "owner of the repo",
  2970. "name": "owner",
  2971. "in": "path",
  2972. "required": true
  2973. },
  2974. {
  2975. "type": "string",
  2976. "description": "name of the repo",
  2977. "name": "repo",
  2978. "in": "path",
  2979. "required": true
  2980. },
  2981. {
  2982. "type": "integer",
  2983. "format": "int64",
  2984. "description": "index of the issue",
  2985. "name": "id",
  2986. "in": "path",
  2987. "required": true
  2988. }
  2989. ],
  2990. "responses": {
  2991. "200": {
  2992. "$ref": "#/responses/TrackedTimeList"
  2993. }
  2994. }
  2995. },
  2996. "post": {
  2997. "consumes": [
  2998. "application/json"
  2999. ],
  3000. "produces": [
  3001. "application/json"
  3002. ],
  3003. "tags": [
  3004. "issue"
  3005. ],
  3006. "summary": "Add a tracked time to a issue",
  3007. "operationId": "issueAddTime",
  3008. "parameters": [
  3009. {
  3010. "type": "string",
  3011. "description": "owner of the repo",
  3012. "name": "owner",
  3013. "in": "path",
  3014. "required": true
  3015. },
  3016. {
  3017. "type": "string",
  3018. "description": "name of the repo",
  3019. "name": "repo",
  3020. "in": "path",
  3021. "required": true
  3022. },
  3023. {
  3024. "type": "integer",
  3025. "format": "int64",
  3026. "description": "index of the issue to add tracked time to",
  3027. "name": "id",
  3028. "in": "path",
  3029. "required": true
  3030. },
  3031. {
  3032. "name": "body",
  3033. "in": "body",
  3034. "schema": {
  3035. "$ref": "#/definitions/AddTimeOption"
  3036. }
  3037. }
  3038. ],
  3039. "responses": {
  3040. "200": {
  3041. "$ref": "#/responses/TrackedTime"
  3042. },
  3043. "400": {
  3044. "$ref": "#/responses/error"
  3045. },
  3046. "403": {
  3047. "$ref": "#/responses/error"
  3048. }
  3049. }
  3050. }
  3051. },
  3052. "/repos/{owner}/{repo}/issues/{index}": {
  3053. "get": {
  3054. "produces": [
  3055. "application/json"
  3056. ],
  3057. "tags": [
  3058. "issue"
  3059. ],
  3060. "summary": "Get an issue",
  3061. "operationId": "issueGetIssue",
  3062. "parameters": [
  3063. {
  3064. "type": "string",
  3065. "description": "owner of the repo",
  3066. "name": "owner",
  3067. "in": "path",
  3068. "required": true
  3069. },
  3070. {
  3071. "type": "string",
  3072. "description": "name of the repo",
  3073. "name": "repo",
  3074. "in": "path",
  3075. "required": true
  3076. },
  3077. {
  3078. "type": "integer",
  3079. "format": "int64",
  3080. "description": "index of the issue to get",
  3081. "name": "index",
  3082. "in": "path",
  3083. "required": true
  3084. }
  3085. ],
  3086. "responses": {
  3087. "200": {
  3088. "$ref": "#/responses/Issue"
  3089. }
  3090. }
  3091. },
  3092. "patch": {
  3093. "consumes": [
  3094. "application/json"
  3095. ],
  3096. "produces": [
  3097. "application/json"
  3098. ],
  3099. "tags": [
  3100. "issue"
  3101. ],
  3102. "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.",
  3103. "operationId": "issueEditIssue",
  3104. "parameters": [
  3105. {
  3106. "type": "string",
  3107. "description": "owner of the repo",
  3108. "name": "owner",
  3109. "in": "path",
  3110. "required": true
  3111. },
  3112. {
  3113. "type": "string",
  3114. "description": "name of the repo",
  3115. "name": "repo",
  3116. "in": "path",
  3117. "required": true
  3118. },
  3119. {
  3120. "type": "integer",
  3121. "format": "int64",
  3122. "description": "index of the issue to edit",
  3123. "name": "index",
  3124. "in": "path",
  3125. "required": true
  3126. },
  3127. {
  3128. "name": "body",
  3129. "in": "body",
  3130. "schema": {
  3131. "$ref": "#/definitions/EditIssueOption"
  3132. }
  3133. }
  3134. ],
  3135. "responses": {
  3136. "201": {
  3137. "$ref": "#/responses/Issue"
  3138. }
  3139. }
  3140. }
  3141. },
  3142. "/repos/{owner}/{repo}/issues/{index}/comments": {
  3143. "get": {
  3144. "produces": [
  3145. "application/json"
  3146. ],
  3147. "tags": [
  3148. "issue"
  3149. ],
  3150. "summary": "List all comments on an issue",
  3151. "operationId": "issueGetComments",
  3152. "parameters": [
  3153. {
  3154. "type": "string",
  3155. "description": "owner of the repo",
  3156. "name": "owner",
  3157. "in": "path",
  3158. "required": true
  3159. },
  3160. {
  3161. "type": "string",
  3162. "description": "name of the repo",
  3163. "name": "repo",
  3164. "in": "path",
  3165. "required": true
  3166. },
  3167. {
  3168. "type": "integer",
  3169. "format": "int64",
  3170. "description": "index of the issue",
  3171. "name": "index",
  3172. "in": "path",
  3173. "required": true
  3174. },
  3175. {
  3176. "type": "string",
  3177. "description": "if provided, only comments updated since the specified time are returned.",
  3178. "name": "since",
  3179. "in": "query"
  3180. }
  3181. ],
  3182. "responses": {
  3183. "200": {
  3184. "$ref": "#/responses/CommentList"
  3185. }
  3186. }
  3187. },
  3188. "post": {
  3189. "consumes": [
  3190. "application/json"
  3191. ],
  3192. "produces": [
  3193. "application/json"
  3194. ],
  3195. "tags": [
  3196. "issue"
  3197. ],
  3198. "summary": "Add a comment to an issue",
  3199. "operationId": "issueCreateComment",
  3200. "parameters": [
  3201. {
  3202. "type": "string",
  3203. "description": "owner of the repo",
  3204. "name": "owner",
  3205. "in": "path",
  3206. "required": true
  3207. },
  3208. {
  3209. "type": "string",
  3210. "description": "name of the repo",
  3211. "name": "repo",
  3212. "in": "path",
  3213. "required": true
  3214. },
  3215. {
  3216. "type": "integer",
  3217. "format": "int64",
  3218. "description": "index of the issue",
  3219. "name": "index",
  3220. "in": "path",
  3221. "required": true
  3222. },
  3223. {
  3224. "name": "body",
  3225. "in": "body",
  3226. "schema": {
  3227. "$ref": "#/definitions/CreateIssueCommentOption"
  3228. }
  3229. }
  3230. ],
  3231. "responses": {
  3232. "201": {
  3233. "$ref": "#/responses/Comment"
  3234. }
  3235. }
  3236. }
  3237. },
  3238. "/repos/{owner}/{repo}/issues/{index}/comments/{id}": {
  3239. "delete": {
  3240. "tags": [
  3241. "issue"
  3242. ],
  3243. "summary": "Delete a comment",
  3244. "operationId": "issueDeleteCommentDeprecated",
  3245. "deprecated": true,
  3246. "parameters": [
  3247. {
  3248. "type": "string",
  3249. "description": "owner of the repo",
  3250. "name": "owner",
  3251. "in": "path",
  3252. "required": true
  3253. },
  3254. {
  3255. "type": "string",
  3256. "description": "name of the repo",
  3257. "name": "repo",
  3258. "in": "path",
  3259. "required": true
  3260. },
  3261. {
  3262. "type": "integer",
  3263. "description": "this parameter is ignored",
  3264. "name": "index",
  3265. "in": "path",
  3266. "required": true
  3267. },
  3268. {
  3269. "type": "integer",
  3270. "format": "int64",
  3271. "description": "id of comment to delete",
  3272. "name": "id",
  3273. "in": "path",
  3274. "required": true
  3275. }
  3276. ],
  3277. "responses": {
  3278. "204": {
  3279. "$ref": "#/responses/empty"
  3280. }
  3281. }
  3282. },
  3283. "patch": {
  3284. "consumes": [
  3285. "application/json"
  3286. ],
  3287. "produces": [
  3288. "application/json"
  3289. ],
  3290. "tags": [
  3291. "issue"
  3292. ],
  3293. "summary": "Edit a comment",
  3294. "operationId": "issueEditCommentDeprecated",
  3295. "deprecated": true,
  3296. "parameters": [
  3297. {
  3298. "type": "string",
  3299. "description": "owner of the repo",
  3300. "name": "owner",
  3301. "in": "path",
  3302. "required": true
  3303. },
  3304. {
  3305. "type": "string",
  3306. "description": "name of the repo",
  3307. "name": "repo",
  3308. "in": "path",
  3309. "required": true
  3310. },
  3311. {
  3312. "type": "integer",
  3313. "description": "this parameter is ignored",
  3314. "name": "index",
  3315. "in": "path",
  3316. "required": true
  3317. },
  3318. {
  3319. "type": "integer",
  3320. "format": "int64",
  3321. "description": "id of the comment to edit",
  3322. "name": "id",
  3323. "in": "path",
  3324. "required": true
  3325. },
  3326. {
  3327. "name": "body",
  3328. "in": "body",
  3329. "schema": {
  3330. "$ref": "#/definitions/EditIssueCommentOption"
  3331. }
  3332. }
  3333. ],
  3334. "responses": {
  3335. "200": {
  3336. "$ref": "#/responses/Comment"
  3337. }
  3338. }
  3339. }
  3340. },
  3341. "/repos/{owner}/{repo}/issues/{index}/deadline": {
  3342. "post": {
  3343. "consumes": [
  3344. "application/json"
  3345. ],
  3346. "produces": [
  3347. "application/json"
  3348. ],
  3349. "tags": [
  3350. "issue"
  3351. ],
  3352. "summary": "Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.",
  3353. "operationId": "issueEditIssueDeadline",
  3354. "parameters": [
  3355. {
  3356. "type": "string",
  3357. "description": "owner of the repo",
  3358. "name": "owner",
  3359. "in": "path",
  3360. "required": true
  3361. },
  3362. {
  3363. "type": "string",
  3364. "description": "name of the repo",
  3365. "name": "repo",
  3366. "in": "path",
  3367. "required": true
  3368. },
  3369. {
  3370. "type": "integer",
  3371. "format": "int64",
  3372. "description": "index of the issue to create or update a deadline on",
  3373. "name": "index",
  3374. "in": "path",
  3375. "required": true
  3376. },
  3377. {
  3378. "name": "body",
  3379. "in": "body",
  3380. "schema": {
  3381. "$ref": "#/definitions/EditDeadlineOption"
  3382. }
  3383. }
  3384. ],
  3385. "responses": {
  3386. "201": {
  3387. "$ref": "#/responses/IssueDeadline"
  3388. },
  3389. "403": {
  3390. "description": "Not repo writer"
  3391. },
  3392. "404": {
  3393. "description": "Issue not found"
  3394. }
  3395. }
  3396. }
  3397. },
  3398. "/repos/{owner}/{repo}/issues/{index}/labels": {
  3399. "get": {
  3400. "produces": [
  3401. "application/json"
  3402. ],
  3403. "tags": [
  3404. "issue"
  3405. ],
  3406. "summary": "Get an issue's labels",
  3407. "operationId": "issueGetLabels",
  3408. "parameters": [
  3409. {
  3410. "type": "string",
  3411. "description": "owner of the repo",
  3412. "name": "owner",
  3413. "in": "path",
  3414. "required": true
  3415. },
  3416. {
  3417. "type": "string",
  3418. "description": "name of the repo",
  3419. "name": "repo",
  3420. "in": "path",
  3421. "required": true
  3422. },
  3423. {
  3424. "type": "integer",
  3425. "format": "int64",
  3426. "description": "index of the issue",
  3427. "name": "index",
  3428. "in": "path",
  3429. "required": true
  3430. }
  3431. ],
  3432. "responses": {
  3433. "200": {
  3434. "$ref": "#/responses/LabelList"
  3435. },
  3436. "404": {
  3437. "$ref": "#/responses/notFound"
  3438. }
  3439. }
  3440. },
  3441. "put": {
  3442. "consumes": [
  3443. "application/json"
  3444. ],
  3445. "produces": [
  3446. "application/json"
  3447. ],
  3448. "tags": [
  3449. "issue"
  3450. ],
  3451. "summary": "Replace an issue's labels",
  3452. "operationId": "issueReplaceLabels",
  3453. "parameters": [
  3454. {
  3455. "type": "string",
  3456. "description": "owner of the repo",
  3457. "name": "owner",
  3458. "in": "path",
  3459. "required": true
  3460. },
  3461. {
  3462. "type": "string",
  3463. "description": "name of the repo",
  3464. "name": "repo",
  3465. "in": "path",
  3466. "required": true
  3467. },
  3468. {
  3469. "type": "integer",
  3470. "format": "int64",
  3471. "description": "index of the issue",
  3472. "name": "index",
  3473. "in": "path",
  3474. "required": true
  3475. },
  3476. {
  3477. "name": "body",
  3478. "in": "body",
  3479. "schema": {
  3480. "$ref": "#/definitions/IssueLabelsOption"
  3481. }
  3482. }
  3483. ],
  3484. "responses": {
  3485. "200": {
  3486. "$ref": "#/responses/LabelList"
  3487. }
  3488. }
  3489. },
  3490. "post": {
  3491. "consumes": [
  3492. "application/json"
  3493. ],
  3494. "produces": [
  3495. "application/json"
  3496. ],
  3497. "tags": [
  3498. "issue"
  3499. ],
  3500. "summary": "Add a label to an issue",
  3501. "operationId": "issueAddLabel",
  3502. "parameters": [
  3503. {
  3504. "type": "string",
  3505. "description": "owner of the repo",
  3506. "name": "owner",
  3507. "in": "path",
  3508. "required": true
  3509. },
  3510. {
  3511. "type": "string",
  3512. "description": "name of the repo",
  3513. "name": "repo",
  3514. "in": "path",
  3515. "required": true
  3516. },
  3517. {
  3518. "type": "integer",
  3519. "format": "int64",
  3520. "description": "index of the issue",
  3521. "name": "index",
  3522. "in": "path",
  3523. "required": true
  3524. },
  3525. {
  3526. "name": "body",
  3527. "in": "body",
  3528. "schema": {
  3529. "$ref": "#/definitions/IssueLabelsOption"
  3530. }
  3531. }
  3532. ],
  3533. "responses": {
  3534. "200": {
  3535. "$ref": "#/responses/LabelList"
  3536. }
  3537. }
  3538. },
  3539. "delete": {
  3540. "produces": [
  3541. "application/json"
  3542. ],
  3543. "tags": [
  3544. "issue"
  3545. ],
  3546. "summary": "Remove all labels from an issue",
  3547. "operationId": "issueClearLabels",
  3548. "parameters": [
  3549. {
  3550. "type": "string",
  3551. "description": "owner of the repo",
  3552. "name": "owner",
  3553. "in": "path",
  3554. "required": true
  3555. },
  3556. {
  3557. "type": "string",
  3558. "description": "name of the repo",
  3559. "name": "repo",
  3560. "in": "path",
  3561. "required": true
  3562. },
  3563. {
  3564. "type": "integer",
  3565. "format": "int64",
  3566. "description": "index of the issue",
  3567. "name": "index",
  3568. "in": "path",
  3569. "required": true
  3570. }
  3571. ],
  3572. "responses": {
  3573. "204": {
  3574. "$ref": "#/responses/empty"
  3575. }
  3576. }
  3577. }
  3578. },
  3579. "/repos/{owner}/{repo}/issues/{index}/labels/{id}": {
  3580. "delete": {
  3581. "produces": [
  3582. "application/json"
  3583. ],
  3584. "tags": [
  3585. "issue"
  3586. ],
  3587. "summary": "Remove a label from an issue",
  3588. "operationId": "issueRemoveLabel",
  3589. "parameters": [
  3590. {
  3591. "type": "string",
  3592. "description": "owner of the repo",
  3593. "name": "owner",
  3594. "in": "path",
  3595. "required": true
  3596. },
  3597. {
  3598. "type": "string",
  3599. "description": "name of the repo",
  3600. "name": "repo",
  3601. "in": "path",
  3602. "required": true
  3603. },
  3604. {
  3605. "type": "integer",
  3606. "format": "int64",
  3607. "description": "index of the issue",
  3608. "name": "index",
  3609. "in": "path",
  3610. "required": true
  3611. },
  3612. {
  3613. "type": "integer",
  3614. "format": "int64",
  3615. "description": "id of the label to remove",
  3616. "name": "id",
  3617. "in": "path",
  3618. "required": true
  3619. }
  3620. ],
  3621. "responses": {
  3622. "204": {
  3623. "$ref": "#/responses/empty"
  3624. }
  3625. }
  3626. }
  3627. },
  3628. "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": {
  3629. "post": {
  3630. "consumes": [
  3631. "application/json"
  3632. ],
  3633. "produces": [
  3634. "application/json"
  3635. ],
  3636. "tags": [
  3637. "issue"
  3638. ],
  3639. "summary": "Start stopwatch on an issue.",
  3640. "operationId": "issueStartStopWatch",
  3641. "parameters": [
  3642. {
  3643. "type": "string",
  3644. "description": "owner of the repo",
  3645. "name": "owner",
  3646. "in": "path",
  3647. "required": true
  3648. },
  3649. {
  3650. "type": "string",
  3651. "description": "name of the repo",
  3652. "name": "repo",
  3653. "in": "path",
  3654. "required": true
  3655. },
  3656. {
  3657. "type": "integer",
  3658. "format": "int64",
  3659. "description": "index of the issue to create the stopwatch on",
  3660. "name": "index",
  3661. "in": "path",
  3662. "required": true
  3663. }
  3664. ],
  3665. "responses": {
  3666. "201": {
  3667. "$ref": "#/responses/empty"
  3668. },
  3669. "403": {
  3670. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  3671. },
  3672. "404": {
  3673. "description": "Issue not found"
  3674. },
  3675. "409": {
  3676. "description": "Cannot start a stopwatch again if it already exists"
  3677. }
  3678. }
  3679. }
  3680. },
  3681. "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": {
  3682. "post": {
  3683. "consumes": [
  3684. "application/json"
  3685. ],
  3686. "produces": [
  3687. "application/json"
  3688. ],
  3689. "tags": [
  3690. "issue"
  3691. ],
  3692. "summary": "Stop an issue's existing stopwatch.",
  3693. "operationId": "issueStopWatch",
  3694. "parameters": [
  3695. {
  3696. "type": "string",
  3697. "description": "owner of the repo",
  3698. "name": "owner",
  3699. "in": "path",
  3700. "required": true
  3701. },
  3702. {
  3703. "type": "string",
  3704. "description": "name of the repo",
  3705. "name": "repo",
  3706. "in": "path",
  3707. "required": true
  3708. },
  3709. {
  3710. "type": "integer",
  3711. "format": "int64",
  3712. "description": "index of the issue to stop the stopwatch on",
  3713. "name": "index",
  3714. "in": "path",
  3715. "required": true
  3716. }
  3717. ],
  3718. "responses": {
  3719. "201": {
  3720. "$ref": "#/responses/empty"
  3721. },
  3722. "403": {
  3723. "description": "Not repo writer, user does not have rights to toggle stopwatch"
  3724. },
  3725. "404": {
  3726. "description": "Issue not found"
  3727. },
  3728. "409": {
  3729. "description": "Cannot stop a non existent stopwatch"
  3730. }
  3731. }
  3732. }
  3733. },
  3734. "/repos/{owner}/{repo}/keys": {
  3735. "get": {
  3736. "produces": [
  3737. "application/json"
  3738. ],
  3739. "tags": [
  3740. "repository"
  3741. ],
  3742. "summary": "List a repository's keys",
  3743. "operationId": "repoListKeys",
  3744. "parameters": [
  3745. {
  3746. "type": "string",
  3747. "description": "owner of the repo",
  3748. "name": "owner",
  3749. "in": "path",
  3750. "required": true
  3751. },
  3752. {
  3753. "type": "string",
  3754. "description": "name of the repo",
  3755. "name": "repo",
  3756. "in": "path",
  3757. "required": true
  3758. },
  3759. {
  3760. "type": "integer",
  3761. "description": "the key_id to search for",
  3762. "name": "key_id",
  3763. "in": "query"
  3764. },
  3765. {
  3766. "type": "string",
  3767. "description": "fingerprint of the key",
  3768. "name": "fingerprint",
  3769. "in": "query"
  3770. }
  3771. ],
  3772. "responses": {
  3773. "200": {
  3774. "$ref": "#/responses/DeployKeyList"
  3775. }
  3776. }
  3777. },
  3778. "post": {
  3779. "consumes": [
  3780. "application/json"
  3781. ],
  3782. "produces": [
  3783. "application/json"
  3784. ],
  3785. "tags": [
  3786. "repository"
  3787. ],
  3788. "summary": "Add a key to a repository",
  3789. "operationId": "repoCreateKey",
  3790. "parameters": [
  3791. {
  3792. "type": "string",
  3793. "description": "owner of the repo",
  3794. "name": "owner",
  3795. "in": "path",
  3796. "required": true
  3797. },
  3798. {
  3799. "type": "string",
  3800. "description": "name of the repo",
  3801. "name": "repo",
  3802. "in": "path",
  3803. "required": true
  3804. },
  3805. {
  3806. "name": "body",
  3807. "in": "body",
  3808. "schema": {
  3809. "$ref": "#/definitions/CreateKeyOption"
  3810. }
  3811. }
  3812. ],
  3813. "responses": {
  3814. "201": {
  3815. "$ref": "#/responses/DeployKey"
  3816. }
  3817. }
  3818. }
  3819. },
  3820. "/repos/{owner}/{repo}/keys/{id}": {
  3821. "get": {
  3822. "produces": [
  3823. "application/json"
  3824. ],
  3825. "tags": [
  3826. "repository"
  3827. ],
  3828. "summary": "Get a repository's key by id",
  3829. "operationId": "repoGetKey",
  3830. "parameters": [
  3831. {
  3832. "type": "string",
  3833. "description": "owner of the repo",
  3834. "name": "owner",
  3835. "in": "path",
  3836. "required": true
  3837. },
  3838. {
  3839. "type": "string",
  3840. "description": "name of the repo",
  3841. "name": "repo",
  3842. "in": "path",
  3843. "required": true
  3844. },
  3845. {
  3846. "type": "integer",
  3847. "format": "int64",
  3848. "description": "id of the key to get",
  3849. "name": "id",
  3850. "in": "path",
  3851. "required": true
  3852. }
  3853. ],
  3854. "responses": {
  3855. "200": {
  3856. "$ref": "#/responses/DeployKey"
  3857. }
  3858. }
  3859. },
  3860. "delete": {
  3861. "tags": [
  3862. "repository"
  3863. ],
  3864. "summary": "Delete a key from a repository",
  3865. "operationId": "repoDeleteKey",
  3866. "parameters": [
  3867. {
  3868. "type": "string",
  3869. "description": "owner of the repo",
  3870. "name": "owner",
  3871. "in": "path",
  3872. "required": true
  3873. },
  3874. {
  3875. "type": "string",
  3876. "description": "name of the repo",
  3877. "name": "repo",
  3878. "in": "path",
  3879. "required": true
  3880. },
  3881. {
  3882. "type": "integer",
  3883. "format": "int64",
  3884. "description": "id of the key to delete",
  3885. "name": "id",
  3886. "in": "path",
  3887. "required": true
  3888. }
  3889. ],
  3890. "responses": {
  3891. "204": {
  3892. "$ref": "#/responses/empty"
  3893. }
  3894. }
  3895. }
  3896. },
  3897. "/repos/{owner}/{repo}/labels": {
  3898. "get": {
  3899. "produces": [
  3900. "application/json"
  3901. ],
  3902. "tags": [
  3903. "issue"
  3904. ],
  3905. "summary": "Get all of a repository's labels",
  3906. "operationId": "issueListLabels",
  3907. "parameters": [
  3908. {
  3909. "type": "string",
  3910. "description": "owner of the repo",
  3911. "name": "owner",
  3912. "in": "path",
  3913. "required": true
  3914. },
  3915. {
  3916. "type": "string",
  3917. "description": "name of the repo",
  3918. "name": "repo",
  3919. "in": "path",
  3920. "required": true
  3921. }
  3922. ],
  3923. "responses": {
  3924. "200": {
  3925. "$ref": "#/responses/LabelList"
  3926. }
  3927. }
  3928. },
  3929. "post": {
  3930. "consumes": [
  3931. "application/json"
  3932. ],
  3933. "produces": [
  3934. "application/json"
  3935. ],
  3936. "tags": [
  3937. "issue"
  3938. ],
  3939. "summary": "Create a label",
  3940. "operationId": "issueCreateLabel",
  3941. "parameters": [
  3942. {
  3943. "type": "string",
  3944. "description": "owner of the repo",
  3945. "name": "owner",
  3946. "in": "path",
  3947. "required": true
  3948. },
  3949. {
  3950. "type": "string",
  3951. "description": "name of the repo",
  3952. "name": "repo",
  3953. "in": "path",
  3954. "required": true
  3955. },
  3956. {
  3957. "name": "body",
  3958. "in": "body",
  3959. "schema": {
  3960. "$ref": "#/definitions/CreateLabelOption"
  3961. }
  3962. }
  3963. ],
  3964. "responses": {
  3965. "201": {
  3966. "$ref": "#/responses/Label"
  3967. }
  3968. }
  3969. }
  3970. },
  3971. "/repos/{owner}/{repo}/labels/{id}": {
  3972. "get": {
  3973. "produces": [
  3974. "application/json"
  3975. ],
  3976. "tags": [
  3977. "issue"
  3978. ],
  3979. "summary": "Get a single label",
  3980. "operationId": "issueGetLabel",
  3981. "parameters": [
  3982. {
  3983. "type": "string",
  3984. "description": "owner of the repo",
  3985. "name": "owner",
  3986. "in": "path",
  3987. "required": true
  3988. },
  3989. {
  3990. "type": "string",
  3991. "description": "name of the repo",
  3992. "name": "repo",
  3993. "in": "path",
  3994. "required": true
  3995. },
  3996. {
  3997. "type": "integer",
  3998. "format": "int64",
  3999. "description": "id of the label to get",
  4000. "name": "id",
  4001. "in": "path",
  4002. "required": true
  4003. }
  4004. ],
  4005. "responses": {
  4006. "200": {
  4007. "$ref": "#/responses/Label"
  4008. }
  4009. }
  4010. },
  4011. "delete": {
  4012. "tags": [
  4013. "issue"
  4014. ],
  4015. "summary": "Delete a label",
  4016. "operationId": "issueDeleteLabel",
  4017. "parameters": [
  4018. {
  4019. "type": "string",
  4020. "description": "owner of the repo",
  4021. "name": "owner",
  4022. "in": "path",
  4023. "required": true
  4024. },
  4025. {
  4026. "type": "string",
  4027. "description": "name of the repo",
  4028. "name": "repo",
  4029. "in": "path",
  4030. "required": true
  4031. },
  4032. {
  4033. "type": "integer",
  4034. "format": "int64",
  4035. "description": "id of the label to delete",
  4036. "name": "id",
  4037. "in": "path",
  4038. "required": true
  4039. }
  4040. ],
  4041. "responses": {
  4042. "204": {
  4043. "$ref": "#/responses/empty"
  4044. }
  4045. }
  4046. },
  4047. "patch": {
  4048. "consumes": [
  4049. "application/json"
  4050. ],
  4051. "produces": [
  4052. "application/json"
  4053. ],
  4054. "tags": [
  4055. "issue"
  4056. ],
  4057. "summary": "Update a label",
  4058. "operationId": "issueEditLabel",
  4059. "parameters": [
  4060. {
  4061. "type": "string",
  4062. "description": "owner of the repo",
  4063. "name": "owner",
  4064. "in": "path",
  4065. "required": true
  4066. },
  4067. {
  4068. "type": "string",
  4069. "description": "name of the repo",
  4070. "name": "repo",
  4071. "in": "path",
  4072. "required": true
  4073. },
  4074. {
  4075. "type": "integer",
  4076. "format": "int64",
  4077. "description": "id of the label to edit",
  4078. "name": "id",
  4079. "in": "path",
  4080. "required": true
  4081. },
  4082. {
  4083. "name": "body",
  4084. "in": "body",
  4085. "schema": {
  4086. "$ref": "#/definitions/EditLabelOption"
  4087. }
  4088. }
  4089. ],
  4090. "responses": {
  4091. "200": {
  4092. "$ref": "#/responses/Label"
  4093. }
  4094. }
  4095. }
  4096. },
  4097. "/repos/{owner}/{repo}/milestones": {
  4098. "get": {
  4099. "produces": [
  4100. "application/json"
  4101. ],
  4102. "tags": [
  4103. "issue"
  4104. ],
  4105. "summary": "Get all of a repository's opened milestones",
  4106. "operationId": "issueGetMilestonesList",
  4107. "parameters": [
  4108. {
  4109. "type": "string",
  4110. "description": "owner of the repo",
  4111. "name": "owner",
  4112. "in": "path",
  4113. "required": true
  4114. },
  4115. {
  4116. "type": "string",
  4117. "description": "name of the repo",
  4118. "name": "repo",
  4119. "in": "path",
  4120. "required": true
  4121. },
  4122. {
  4123. "type": "string",
  4124. "description": "Milestone state, Recognised values are open, closed and all. Defaults to \"open\"",
  4125. "name": "state",
  4126. "in": "query"
  4127. }
  4128. ],
  4129. "responses": {
  4130. "200": {
  4131. "$ref": "#/responses/MilestoneList"
  4132. }
  4133. }
  4134. },
  4135. "post": {
  4136. "consumes": [
  4137. "application/json"
  4138. ],
  4139. "produces": [
  4140. "application/json"
  4141. ],
  4142. "tags": [
  4143. "issue"
  4144. ],
  4145. "summary": "Create a milestone",
  4146. "operationId": "issueCreateMilestone",
  4147. "parameters": [
  4148. {
  4149. "type": "string",
  4150. "description": "owner of the repo",
  4151. "name": "owner",
  4152. "in": "path",
  4153. "required": true
  4154. },
  4155. {
  4156. "type": "string",
  4157. "description": "name of the repo",
  4158. "name": "repo",
  4159. "in": "path",
  4160. "required": true
  4161. },
  4162. {
  4163. "name": "body",
  4164. "in": "body",
  4165. "schema": {
  4166. "$ref": "#/definitions/CreateMilestoneOption"
  4167. }
  4168. }
  4169. ],
  4170. "responses": {
  4171. "201": {
  4172. "$ref": "#/responses/Milestone"
  4173. }
  4174. }
  4175. }
  4176. },
  4177. "/repos/{owner}/{repo}/milestones/{id}": {
  4178. "get": {
  4179. "produces": [
  4180. "application/json"
  4181. ],
  4182. "tags": [
  4183. "issue"
  4184. ],
  4185. "summary": "Get a milestone",
  4186. "operationId": "issueGetMilestone",
  4187. "parameters": [
  4188. {
  4189. "type": "string",
  4190. "description": "owner of the repo",
  4191. "name": "owner",
  4192. "in": "path",
  4193. "required": true
  4194. },
  4195. {
  4196. "type": "string",
  4197. "description": "name of the repo",
  4198. "name": "repo",
  4199. "in": "path",
  4200. "required": true
  4201. },
  4202. {
  4203. "type": "integer",
  4204. "format": "int64",
  4205. "description": "id of the milestone",
  4206. "name": "id",
  4207. "in": "path",
  4208. "required": true
  4209. }
  4210. ],
  4211. "responses": {
  4212. "200": {
  4213. "$ref": "#/responses/Milestone"
  4214. }
  4215. }
  4216. },
  4217. "delete": {
  4218. "tags": [
  4219. "issue"
  4220. ],
  4221. "summary": "Delete a milestone",
  4222. "operationId": "issueDeleteMilestone",
  4223. "parameters": [
  4224. {
  4225. "type": "string",
  4226. "description": "owner of the repo",
  4227. "name": "owner",
  4228. "in": "path",
  4229. "required": true
  4230. },
  4231. {
  4232. "type": "string",
  4233. "description": "name of the repo",
  4234. "name": "repo",
  4235. "in": "path",
  4236. "required": true
  4237. },
  4238. {
  4239. "type": "integer",
  4240. "format": "int64",
  4241. "description": "id of the milestone to delete",
  4242. "name": "id",
  4243. "in": "path",
  4244. "required": true
  4245. }
  4246. ],
  4247. "responses": {
  4248. "204": {
  4249. "$ref": "#/responses/empty"
  4250. }
  4251. }
  4252. },
  4253. "patch": {
  4254. "consumes": [
  4255. "application/json"
  4256. ],
  4257. "produces": [
  4258. "application/json"
  4259. ],
  4260. "tags": [
  4261. "issue"
  4262. ],
  4263. "summary": "Update a milestone",
  4264. "operationId": "issueEditMilestone",
  4265. "parameters": [
  4266. {
  4267. "type": "string",
  4268. "description": "owner of the repo",
  4269. "name": "owner",
  4270. "in": "path",
  4271. "required": true
  4272. },
  4273. {
  4274. "type": "string",
  4275. "description": "name of the repo",
  4276. "name": "repo",
  4277. "in": "path",
  4278. "required": true
  4279. },
  4280. {
  4281. "type": "integer",
  4282. "format": "int64",
  4283. "description": "id of the milestone",
  4284. "name": "id",
  4285. "in": "path",
  4286. "required": true
  4287. },
  4288. {
  4289. "name": "body",
  4290. "in": "body",
  4291. "schema": {
  4292. "$ref": "#/definitions/EditMilestoneOption"
  4293. }
  4294. }
  4295. ],
  4296. "responses": {
  4297. "200": {
  4298. "$ref": "#/responses/Milestone"
  4299. }
  4300. }
  4301. }
  4302. },
  4303. "/repos/{owner}/{repo}/mirror-sync": {
  4304. "post": {
  4305. "produces": [
  4306. "application/json"
  4307. ],
  4308. "tags": [
  4309. "repository"
  4310. ],
  4311. "summary": "Sync a mirrored repository",
  4312. "operationId": "repoMirrorSync",
  4313. "parameters": [
  4314. {
  4315. "type": "string",
  4316. "description": "owner of the repo to sync",
  4317. "name": "owner",
  4318. "in": "path",
  4319. "required": true
  4320. },
  4321. {
  4322. "type": "string",
  4323. "description": "name of the repo to sync",
  4324. "name": "repo",
  4325. "in": "path",
  4326. "required": true
  4327. }
  4328. ],
  4329. "responses": {
  4330. "200": {
  4331. "$ref": "#/responses/empty"
  4332. }
  4333. }
  4334. }
  4335. },
  4336. "/repos/{owner}/{repo}/pulls": {
  4337. "get": {
  4338. "produces": [
  4339. "application/json"
  4340. ],
  4341. "tags": [
  4342. "repository"
  4343. ],
  4344. "summary": "List a repo's pull requests",
  4345. "operationId": "repoListPullRequests",
  4346. "parameters": [
  4347. {
  4348. "type": "string",
  4349. "description": "owner of the repo",
  4350. "name": "owner",
  4351. "in": "path",
  4352. "required": true
  4353. },
  4354. {
  4355. "type": "string",
  4356. "description": "name of the repo",
  4357. "name": "repo",
  4358. "in": "path",
  4359. "required": true
  4360. },
  4361. {
  4362. "type": "integer",
  4363. "description": "Page number",
  4364. "name": "page",
  4365. "in": "query"
  4366. },
  4367. {
  4368. "enum": [
  4369. "closed",
  4370. "open",
  4371. "all"
  4372. ],
  4373. "type": "string",
  4374. "description": "State of pull request: open or closed (optional)",
  4375. "name": "state",
  4376. "in": "query"
  4377. },
  4378. {
  4379. "enum": [
  4380. "oldest",
  4381. "recentupdate",
  4382. "leastupdate",
  4383. "mostcomment",
  4384. "leastcomment",
  4385. "priority"
  4386. ],
  4387. "type": "string",
  4388. "description": "Type of sort",
  4389. "name": "sort",
  4390. "in": "query"
  4391. },
  4392. {
  4393. "type": "integer",
  4394. "format": "int64",
  4395. "description": "ID of the milestone",
  4396. "name": "milestone",
  4397. "in": "query"
  4398. },
  4399. {
  4400. "type": "array",
  4401. "items": {
  4402. "type": "integer",
  4403. "format": "int64"
  4404. },
  4405. "collectionFormat": "multi",
  4406. "description": "Label IDs",
  4407. "name": "labels",
  4408. "in": "query"
  4409. }
  4410. ],
  4411. "responses": {
  4412. "200": {
  4413. "$ref": "#/responses/PullRequestList"
  4414. }
  4415. }
  4416. },
  4417. "post": {
  4418. "consumes": [
  4419. "application/json"
  4420. ],
  4421. "produces": [
  4422. "application/json"
  4423. ],
  4424. "tags": [
  4425. "repository"
  4426. ],
  4427. "summary": "Create a pull request",
  4428. "operationId": "repoCreatePullRequest",
  4429. "parameters": [
  4430. {
  4431. "type": "string",
  4432. "description": "owner of the repo",
  4433. "name": "owner",
  4434. "in": "path",
  4435. "required": true
  4436. },
  4437. {
  4438. "type": "string",
  4439. "description": "name of the repo",
  4440. "name": "repo",
  4441. "in": "path",
  4442. "required": true
  4443. },
  4444. {
  4445. "name": "body",
  4446. "in": "body",
  4447. "schema": {
  4448. "$ref": "#/definitions/CreatePullRequestOption"
  4449. }
  4450. }
  4451. ],
  4452. "responses": {
  4453. "201": {
  4454. "$ref": "#/responses/PullRequest"
  4455. }
  4456. }
  4457. }
  4458. },
  4459. "/repos/{owner}/{repo}/pulls/{index}": {
  4460. "get": {
  4461. "produces": [
  4462. "application/json"
  4463. ],
  4464. "tags": [
  4465. "repository"
  4466. ],
  4467. "summary": "Get a pull request",
  4468. "operationId": "repoGetPullRequest",
  4469. "parameters": [
  4470. {
  4471. "type": "string",
  4472. "description": "owner of the repo",
  4473. "name": "owner",
  4474. "in": "path",
  4475. "required": true
  4476. },
  4477. {
  4478. "type": "string",
  4479. "description": "name of the repo",
  4480. "name": "repo",
  4481. "in": "path",
  4482. "required": true
  4483. },
  4484. {
  4485. "type": "integer",
  4486. "format": "int64",
  4487. "description": "index of the pull request to get",
  4488. "name": "index",
  4489. "in": "path",
  4490. "required": true
  4491. }
  4492. ],
  4493. "responses": {
  4494. "200": {
  4495. "$ref": "#/responses/PullRequest"
  4496. }
  4497. }
  4498. },
  4499. "patch": {
  4500. "consumes": [
  4501. "application/json"
  4502. ],
  4503. "produces": [
  4504. "application/json"
  4505. ],
  4506. "tags": [
  4507. "repository"
  4508. ],
  4509. "summary": "Update a pull request",
  4510. "operationId": "repoEditPullRequest",
  4511. "parameters": [
  4512. {
  4513. "type": "string",
  4514. "description": "owner of the repo",
  4515. "name": "owner",
  4516. "in": "path",
  4517. "required": true
  4518. },
  4519. {
  4520. "type": "string",
  4521. "description": "name of the repo",
  4522. "name": "repo",
  4523. "in": "path",
  4524. "required": true
  4525. },
  4526. {
  4527. "type": "integer",
  4528. "format": "int64",
  4529. "description": "index of the pull request to edit",
  4530. "name": "index",
  4531. "in": "path",
  4532. "required": true
  4533. },
  4534. {
  4535. "name": "body",
  4536. "in": "body",
  4537. "schema": {
  4538. "$ref": "#/definitions/EditPullRequestOption"
  4539. }
  4540. }
  4541. ],
  4542. "responses": {
  4543. "201": {
  4544. "$ref": "#/responses/PullRequest"
  4545. }
  4546. }
  4547. }
  4548. },
  4549. "/repos/{owner}/{repo}/pulls/{index}/merge": {
  4550. "get": {
  4551. "produces": [
  4552. "application/json"
  4553. ],
  4554. "tags": [
  4555. "repository"
  4556. ],
  4557. "summary": "Check if a pull request has been merged",
  4558. "operationId": "repoPullRequestIsMerged",
  4559. "parameters": [
  4560. {
  4561. "type": "string",
  4562. "description": "owner of the repo",
  4563. "name": "owner",
  4564. "in": "path",
  4565. "required": true
  4566. },
  4567. {
  4568. "type": "string",
  4569. "description": "name of the repo",
  4570. "name": "repo",
  4571. "in": "path",
  4572. "required": true
  4573. },
  4574. {
  4575. "type": "integer",
  4576. "format": "int64",
  4577. "description": "index of the pull request",
  4578. "name": "index",
  4579. "in": "path",
  4580. "required": true
  4581. }
  4582. ],
  4583. "responses": {
  4584. "204": {
  4585. "description": "pull request has been merged"
  4586. },
  4587. "404": {
  4588. "description": "pull request has not been merged"
  4589. }
  4590. }
  4591. },
  4592. "post": {
  4593. "produces": [
  4594. "application/json"
  4595. ],
  4596. "tags": [
  4597. "repository"
  4598. ],
  4599. "summary": "Merge a pull request",
  4600. "operationId": "repoMergePullRequest",
  4601. "parameters": [
  4602. {
  4603. "type": "string",
  4604. "description": "owner of the repo",
  4605. "name": "owner",
  4606. "in": "path",
  4607. "required": true
  4608. },
  4609. {
  4610. "type": "string",
  4611. "description": "name of the repo",
  4612. "name": "repo",
  4613. "in": "path",
  4614. "required": true
  4615. },
  4616. {
  4617. "type": "integer",
  4618. "format": "int64",
  4619. "description": "index of the pull request to merge",
  4620. "name": "index",
  4621. "in": "path",
  4622. "required": true
  4623. },
  4624. {
  4625. "name": "body",
  4626. "in": "body",
  4627. "schema": {
  4628. "$ref": "#/definitions/MergePullRequestOption"
  4629. }
  4630. }
  4631. ],
  4632. "responses": {
  4633. "200": {
  4634. "$ref": "#/responses/empty"
  4635. },
  4636. "405": {
  4637. "$ref": "#/responses/empty"
  4638. }
  4639. }
  4640. }
  4641. },
  4642. "/repos/{owner}/{repo}/raw/{filepath}": {
  4643. "get": {
  4644. "produces": [
  4645. "application/json"
  4646. ],
  4647. "tags": [
  4648. "repository"
  4649. ],
  4650. "summary": "Get a file from a repository",
  4651. "operationId": "repoGetRawFile",
  4652. "parameters": [
  4653. {
  4654. "type": "string",
  4655. "description": "owner of the repo",
  4656. "name": "owner",
  4657. "in": "path",
  4658. "required": true
  4659. },
  4660. {
  4661. "type": "string",
  4662. "description": "name of the repo",
  4663. "name": "repo",
  4664. "in": "path",
  4665. "required": true
  4666. },
  4667. {
  4668. "type": "string",
  4669. "description": "filepath of the file to get",
  4670. "name": "filepath",
  4671. "in": "path",
  4672. "required": true
  4673. }
  4674. ],
  4675. "responses": {
  4676. "200": {
  4677. "description": "success"
  4678. }
  4679. }
  4680. }
  4681. },
  4682. "/repos/{owner}/{repo}/releases": {
  4683. "get": {
  4684. "produces": [
  4685. "application/json"
  4686. ],
  4687. "tags": [
  4688. "repository"
  4689. ],
  4690. "summary": "List a repo's releases",
  4691. "operationId": "repoListReleases",
  4692. "parameters": [
  4693. {
  4694. "type": "string",
  4695. "description": "owner of the repo",
  4696. "name": "owner",
  4697. "in": "path",
  4698. "required": true
  4699. },
  4700. {
  4701. "type": "string",
  4702. "description": "name of the repo",
  4703. "name": "repo",
  4704. "in": "path",
  4705. "required": true
  4706. },
  4707. {
  4708. "type": "integer",
  4709. "description": "page wants to load",
  4710. "name": "page",
  4711. "in": "query"
  4712. },
  4713. {
  4714. "type": "integer",
  4715. "description": "items count every page wants to load",
  4716. "name": "per_page",
  4717. "in": "query"
  4718. }
  4719. ],
  4720. "responses": {
  4721. "200": {
  4722. "$ref": "#/responses/ReleaseList"
  4723. }
  4724. }
  4725. },
  4726. "post": {
  4727. "consumes": [
  4728. "application/json"
  4729. ],
  4730. "produces": [
  4731. "application/json"
  4732. ],
  4733. "tags": [
  4734. "repository"
  4735. ],
  4736. "summary": "Create a release",
  4737. "operationId": "repoCreateRelease",
  4738. "parameters": [
  4739. {
  4740. "type": "string",
  4741. "description": "owner of the repo",
  4742. "name": "owner",
  4743. "in": "path",
  4744. "required": true
  4745. },
  4746. {
  4747. "type": "string",
  4748. "description": "name of the repo",
  4749. "name": "repo",
  4750. "in": "path",
  4751. "required": true
  4752. },
  4753. {
  4754. "name": "body",
  4755. "in": "body",
  4756. "schema": {
  4757. "$ref": "#/definitions/CreateReleaseOption"
  4758. }
  4759. }
  4760. ],
  4761. "responses": {
  4762. "201": {
  4763. "$ref": "#/responses/Release"
  4764. }
  4765. }
  4766. }
  4767. },
  4768. "/repos/{owner}/{repo}/releases/{id}": {
  4769. "get": {
  4770. "produces": [
  4771. "application/json"
  4772. ],
  4773. "tags": [
  4774. "repository"
  4775. ],
  4776. "summary": "Get a release",
  4777. "operationId": "repoGetRelease",
  4778. "parameters": [
  4779. {
  4780. "type": "string",
  4781. "description": "owner of the repo",
  4782. "name": "owner",
  4783. "in": "path",
  4784. "required": true
  4785. },
  4786. {
  4787. "type": "string",
  4788. "description": "name of the repo",
  4789. "name": "repo",
  4790. "in": "path",
  4791. "required": true
  4792. },
  4793. {
  4794. "type": "integer",
  4795. "format": "int64",
  4796. "description": "id of the release to get",
  4797. "name": "id",
  4798. "in": "path",
  4799. "required": true
  4800. }
  4801. ],
  4802. "responses": {
  4803. "200": {
  4804. "$ref": "#/responses/Release"
  4805. }
  4806. }
  4807. },
  4808. "delete": {
  4809. "tags": [
  4810. "repository"
  4811. ],
  4812. "summary": "Delete a release",
  4813. "operationId": "repoDeleteRelease",
  4814. "parameters": [
  4815. {
  4816. "type": "string",
  4817. "description": "owner of the repo",
  4818. "name": "owner",
  4819. "in": "path",
  4820. "required": true
  4821. },
  4822. {
  4823. "type": "string",
  4824. "description": "name of the repo",
  4825. "name": "repo",
  4826. "in": "path",
  4827. "required": true
  4828. },
  4829. {
  4830. "type": "integer",
  4831. "format": "int64",
  4832. "description": "id of the release to delete",
  4833. "name": "id",
  4834. "in": "path",
  4835. "required": true
  4836. }
  4837. ],
  4838. "responses": {
  4839. "204": {
  4840. "$ref": "#/responses/empty"
  4841. }
  4842. }
  4843. },
  4844. "patch": {
  4845. "consumes": [
  4846. "application/json"
  4847. ],
  4848. "produces": [
  4849. "application/json"
  4850. ],
  4851. "tags": [
  4852. "repository"
  4853. ],
  4854. "summary": "Update a release",
  4855. "operationId": "repoEditRelease",
  4856. "parameters": [
  4857. {
  4858. "type": "string",
  4859. "description": "owner of the repo",
  4860. "name": "owner",
  4861. "in": "path",
  4862. "required": true
  4863. },
  4864. {
  4865. "type": "string",
  4866. "description": "name of the repo",
  4867. "name": "repo",
  4868. "in": "path",
  4869. "required": true
  4870. },
  4871. {
  4872. "type": "integer",
  4873. "format": "int64",
  4874. "description": "id of the release to edit",
  4875. "name": "id",
  4876. "in": "path",
  4877. "required": true
  4878. },
  4879. {
  4880. "name": "body",
  4881. "in": "body",
  4882. "schema": {
  4883. "$ref": "#/definitions/EditReleaseOption"
  4884. }
  4885. }
  4886. ],
  4887. "responses": {
  4888. "200": {
  4889. "$ref": "#/responses/Release"
  4890. }
  4891. }
  4892. }
  4893. },
  4894. "/repos/{owner}/{repo}/releases/{id}/assets": {
  4895. "get": {
  4896. "produces": [
  4897. "application/json"
  4898. ],
  4899. "tags": [
  4900. "repository"
  4901. ],
  4902. "summary": "List release's attachments",
  4903. "operationId": "repoListReleaseAttachments",
  4904. "parameters": [
  4905. {
  4906. "type": "string",
  4907. "description": "owner of the repo",
  4908. "name": "owner",
  4909. "in": "path",
  4910. "required": true
  4911. },
  4912. {
  4913. "type": "string",
  4914. "description": "name of the repo",
  4915. "name": "repo",
  4916. "in": "path",
  4917. "required": true
  4918. },
  4919. {
  4920. "type": "integer",
  4921. "format": "int64",
  4922. "description": "id of the release",
  4923. "name": "id",
  4924. "in": "path",
  4925. "required": true
  4926. }
  4927. ],
  4928. "responses": {
  4929. "200": {
  4930. "$ref": "#/responses/AttachmentList"
  4931. }
  4932. }
  4933. },
  4934. "post": {
  4935. "consumes": [
  4936. "multipart/form-data"
  4937. ],
  4938. "produces": [
  4939. "application/json"
  4940. ],
  4941. "tags": [
  4942. "repository"
  4943. ],
  4944. "summary": "Create a release attachment",
  4945. "operationId": "repoCreateReleaseAttachment",
  4946. "parameters": [
  4947. {
  4948. "type": "string",
  4949. "description": "owner of the repo",
  4950. "name": "owner",
  4951. "in": "path",
  4952. "required": true
  4953. },
  4954. {
  4955. "type": "string",
  4956. "description": "name of the repo",
  4957. "name": "repo",
  4958. "in": "path",
  4959. "required": true
  4960. },
  4961. {
  4962. "type": "integer",
  4963. "format": "int64",
  4964. "description": "id of the release",
  4965. "name": "id",
  4966. "in": "path",
  4967. "required": true
  4968. },
  4969. {
  4970. "type": "string",
  4971. "description": "name of the attachment",
  4972. "name": "name",
  4973. "in": "query"
  4974. },
  4975. {
  4976. "type": "file",
  4977. "description": "attachment to upload",
  4978. "name": "attachment",
  4979. "in": "formData",
  4980. "required": true
  4981. }
  4982. ],
  4983. "responses": {
  4984. "201": {
  4985. "$ref": "#/responses/Attachment"
  4986. }
  4987. }
  4988. }
  4989. },
  4990. "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}": {
  4991. "get": {
  4992. "produces": [
  4993. "application/json"
  4994. ],
  4995. "tags": [
  4996. "repository"
  4997. ],
  4998. "summary": "Get a release attachment",
  4999. "operationId": "repoGetReleaseAttachment",
  5000. "parameters": [
  5001. {
  5002. "type": "string",
  5003. "description": "owner of the repo",
  5004. "name": "owner",
  5005. "in": "path",
  5006. "required": true
  5007. },
  5008. {
  5009. "type": "string",
  5010. "description": "name of the repo",
  5011. "name": "repo",
  5012. "in": "path",
  5013. "required": true
  5014. },
  5015. {
  5016. "type": "integer",
  5017. "format": "int64",
  5018. "description": "id of the release",
  5019. "name": "id",
  5020. "in": "path",
  5021. "required": true
  5022. },
  5023. {
  5024. "type": "integer",
  5025. "format": "int64",
  5026. "description": "id of the attachment to get",
  5027. "name": "attachment_id",
  5028. "in": "path",
  5029. "required": true
  5030. }
  5031. ],
  5032. "responses": {
  5033. "200": {
  5034. "$ref": "#/responses/Attachment"
  5035. }
  5036. }
  5037. },
  5038. "delete": {
  5039. "produces": [
  5040. "application/json"
  5041. ],
  5042. "tags": [
  5043. "repository"
  5044. ],
  5045. "summary": "Delete a release attachment",
  5046. "operationId": "repoDeleteReleaseAttachment",
  5047. "parameters": [
  5048. {
  5049. "type": "string",
  5050. "description": "owner of the repo",
  5051. "name": "owner",
  5052. "in": "path",
  5053. "required": true
  5054. },
  5055. {
  5056. "type": "string",
  5057. "description": "name of the repo",
  5058. "name": "repo",
  5059. "in": "path",
  5060. "required": true
  5061. },
  5062. {
  5063. "type": "integer",
  5064. "format": "int64",
  5065. "description": "id of the release",
  5066. "name": "id",
  5067. "in": "path",
  5068. "required": true
  5069. },
  5070. {
  5071. "type": "integer",
  5072. "format": "int64",
  5073. "description": "id of the attachment to delete",
  5074. "name": "attachment_id",
  5075. "in": "path",
  5076. "required": true
  5077. }
  5078. ],
  5079. "responses": {
  5080. "204": {
  5081. "$ref": "#/responses/empty"
  5082. }
  5083. }
  5084. },
  5085. "patch": {
  5086. "consumes": [
  5087. "application/json"
  5088. ],
  5089. "produces": [
  5090. "application/json"
  5091. ],
  5092. "tags": [
  5093. "repository"
  5094. ],
  5095. "summary": "Edit a release attachment",
  5096. "operationId": "repoEditReleaseAttachment",
  5097. "parameters": [
  5098. {
  5099. "type": "string",
  5100. "description": "owner of the repo",
  5101. "name": "owner",
  5102. "in": "path",
  5103. "required": true
  5104. },
  5105. {
  5106. "type": "string",
  5107. "description": "name of the repo",
  5108. "name": "repo",
  5109. "in": "path",
  5110. "required": true
  5111. },
  5112. {
  5113. "type": "integer",
  5114. "format": "int64",
  5115. "description": "id of the release",
  5116. "name": "id",
  5117. "in": "path",
  5118. "required": true
  5119. },
  5120. {
  5121. "type": "integer",
  5122. "format": "int64",
  5123. "description": "id of the attachment to edit",
  5124. "name": "attachment_id",
  5125. "in": "path",
  5126. "required": true
  5127. },
  5128. {
  5129. "name": "body",
  5130. "in": "body",
  5131. "schema": {
  5132. "$ref": "#/definitions/EditAttachmentOptions"
  5133. }
  5134. }
  5135. ],
  5136. "responses": {
  5137. "201": {
  5138. "$ref": "#/responses/Attachment"
  5139. }
  5140. }
  5141. }
  5142. },
  5143. "/repos/{owner}/{repo}/signing-key.gpg": {
  5144. "get": {
  5145. "produces": [
  5146. "text/plain"
  5147. ],
  5148. "tags": [
  5149. "repository"
  5150. ],
  5151. "summary": "Get signing-key.gpg for given repository",
  5152. "operationId": "repoSigningKey",
  5153. "parameters": [
  5154. {
  5155. "type": "string",
  5156. "description": "owner of the repo",
  5157. "name": "owner",
  5158. "in": "path",
  5159. "required": true
  5160. },
  5161. {
  5162. "type": "string",
  5163. "description": "name of the repo",
  5164. "name": "repo",
  5165. "in": "path",
  5166. "required": true
  5167. }
  5168. ],
  5169. "responses": {
  5170. "200": {
  5171. "description": "GPG armored public key",
  5172. "schema": {
  5173. "type": "string"
  5174. }
  5175. }
  5176. }
  5177. }
  5178. },
  5179. "/repos/{owner}/{repo}/stargazers": {
  5180. "get": {
  5181. "produces": [
  5182. "application/json"
  5183. ],
  5184. "tags": [
  5185. "repository"
  5186. ],
  5187. "summary": "List a repo's stargazers",
  5188. "operationId": "repoListStargazers",
  5189. "parameters": [
  5190. {
  5191. "type": "string",
  5192. "description": "owner of the repo",
  5193. "name": "owner",
  5194. "in": "path",
  5195. "required": true
  5196. },
  5197. {
  5198. "type": "string",
  5199. "description": "name of the repo",
  5200. "name": "repo",
  5201. "in": "path",
  5202. "required": true
  5203. }
  5204. ],
  5205. "responses": {
  5206. "200": {
  5207. "$ref": "#/responses/UserList"
  5208. }
  5209. }
  5210. }
  5211. },
  5212. "/repos/{owner}/{repo}/statuses/{sha}": {
  5213. "get": {
  5214. "produces": [
  5215. "application/json"
  5216. ],
  5217. "tags": [
  5218. "repository"
  5219. ],
  5220. "summary": "Get a commit's statuses",
  5221. "operationId": "repoListStatuses",
  5222. "parameters": [
  5223. {
  5224. "type": "string",
  5225. "description": "owner of the repo",
  5226. "name": "owner",
  5227. "in": "path",
  5228. "required": true
  5229. },
  5230. {
  5231. "type": "string",
  5232. "description": "name of the repo",
  5233. "name": "repo",
  5234. "in": "path",
  5235. "required": true
  5236. },
  5237. {
  5238. "type": "string",
  5239. "description": "sha of the commit",
  5240. "name": "sha",
  5241. "in": "path",
  5242. "required": true
  5243. },
  5244. {
  5245. "type": "integer",
  5246. "description": "page number of results",
  5247. "name": "page",
  5248. "in": "query"
  5249. },
  5250. {
  5251. "enum": [
  5252. "oldest",
  5253. "recentupdate",
  5254. "leastupdate",
  5255. "leastindex",
  5256. "highestindex"
  5257. ],
  5258. "type": "string",
  5259. "description": "type of sort",
  5260. "name": "sort",
  5261. "in": "query"
  5262. },
  5263. {
  5264. "enum": [
  5265. "pending",
  5266. "success",
  5267. "error",
  5268. "failure",
  5269. "warning"
  5270. ],
  5271. "type": "string",
  5272. "description": "type of state",
  5273. "name": "state",
  5274. "in": "query"
  5275. }
  5276. ],
  5277. "responses": {
  5278. "200": {
  5279. "$ref": "#/responses/StatusList"
  5280. }
  5281. }
  5282. },
  5283. "post": {
  5284. "produces": [
  5285. "application/json"
  5286. ],
  5287. "tags": [
  5288. "repository"
  5289. ],
  5290. "summary": "Create a commit status",
  5291. "operationId": "repoCreateStatus",
  5292. "parameters": [
  5293. {
  5294. "type": "string",
  5295. "description": "owner of the repo",
  5296. "name": "owner",
  5297. "in": "path",
  5298. "required": true
  5299. },
  5300. {
  5301. "type": "string",
  5302. "description": "name of the repo",
  5303. "name": "repo",
  5304. "in": "path",
  5305. "required": true
  5306. },
  5307. {
  5308. "type": "string",
  5309. "description": "sha of the commit",
  5310. "name": "sha",
  5311. "in": "path",
  5312. "required": true
  5313. },
  5314. {
  5315. "name": "body",
  5316. "in": "body",
  5317. "schema": {
  5318. "$ref": "#/definitions/CreateStatusOption"
  5319. }
  5320. }
  5321. ],
  5322. "responses": {
  5323. "200": {
  5324. "$ref": "#/responses/StatusList"
  5325. }
  5326. }
  5327. }
  5328. },
  5329. "/repos/{owner}/{repo}/subscribers": {
  5330. "get": {
  5331. "produces": [
  5332. "application/json"
  5333. ],
  5334. "tags": [
  5335. "repository"
  5336. ],
  5337. "summary": "List a repo's watchers",
  5338. "operationId": "repoListSubscribers",
  5339. "parameters": [
  5340. {
  5341. "type": "string",
  5342. "description": "owner of the repo",
  5343. "name": "owner",
  5344. "in": "path",
  5345. "required": true
  5346. },
  5347. {
  5348. "type": "string",
  5349. "description": "name of the repo",
  5350. "name": "repo",
  5351. "in": "path",
  5352. "required": true
  5353. }
  5354. ],
  5355. "responses": {
  5356. "200": {
  5357. "$ref": "#/responses/UserList"
  5358. }
  5359. }
  5360. }
  5361. },
  5362. "/repos/{owner}/{repo}/subscription": {
  5363. "get": {
  5364. "tags": [
  5365. "repository"
  5366. ],
  5367. "summary": "Check if the current user is watching a repo",
  5368. "operationId": "userCurrentCheckSubscription",
  5369. "parameters": [
  5370. {
  5371. "type": "string",
  5372. "description": "owner of the repo",
  5373. "name": "owner",
  5374. "in": "path",
  5375. "required": true
  5376. },
  5377. {
  5378. "type": "string",
  5379. "description": "name of the repo",
  5380. "name": "repo",
  5381. "in": "path",
  5382. "required": true
  5383. }
  5384. ],
  5385. "responses": {
  5386. "200": {
  5387. "$ref": "#/responses/WatchInfo"
  5388. }
  5389. }
  5390. },
  5391. "put": {
  5392. "tags": [
  5393. "repository"
  5394. ],
  5395. "summary": "Watch a repo",
  5396. "operationId": "userCurrentPutSubscription",
  5397. "parameters": [
  5398. {
  5399. "type": "string",
  5400. "description": "owner of the repo",
  5401. "name": "owner",
  5402. "in": "path",
  5403. "required": true
  5404. },
  5405. {
  5406. "type": "string",
  5407. "description": "name of the repo",
  5408. "name": "repo",
  5409. "in": "path",
  5410. "required": true
  5411. }
  5412. ],
  5413. "responses": {
  5414. "200": {
  5415. "$ref": "#/responses/WatchInfo"
  5416. }
  5417. }
  5418. },
  5419. "delete": {
  5420. "tags": [
  5421. "repository"
  5422. ],
  5423. "summary": "Unwatch a repo",
  5424. "operationId": "userCurrentDeleteSubscription",
  5425. "parameters": [
  5426. {
  5427. "type": "string",
  5428. "description": "owner of the repo",
  5429. "name": "owner",
  5430. "in": "path",
  5431. "required": true
  5432. },
  5433. {
  5434. "type": "string",
  5435. "description": "name of the repo",
  5436. "name": "repo",
  5437. "in": "path",
  5438. "required": true
  5439. }
  5440. ],
  5441. "responses": {
  5442. "204": {
  5443. "$ref": "#/responses/empty"
  5444. }
  5445. }
  5446. }
  5447. },
  5448. "/repos/{owner}/{repo}/tags": {
  5449. "get": {
  5450. "produces": [
  5451. "application/json"
  5452. ],
  5453. "tags": [
  5454. "repository"
  5455. ],
  5456. "summary": "List a repository's tags",
  5457. "operationId": "repoListTags",
  5458. "parameters": [
  5459. {
  5460. "type": "string",
  5461. "description": "owner of the repo",
  5462. "name": "owner",
  5463. "in": "path",
  5464. "required": true
  5465. },
  5466. {
  5467. "type": "string",
  5468. "description": "name of the repo",
  5469. "name": "repo",
  5470. "in": "path",
  5471. "required": true
  5472. }
  5473. ],
  5474. "responses": {
  5475. "200": {
  5476. "$ref": "#/responses/TagList"
  5477. }
  5478. }
  5479. }
  5480. },
  5481. "/repos/{owner}/{repo}/times": {
  5482. "get": {
  5483. "produces": [
  5484. "application/json"
  5485. ],
  5486. "tags": [
  5487. "repository"
  5488. ],
  5489. "summary": "List a repo's tracked times",
  5490. "operationId": "repoTrackedTimes",
  5491. "parameters": [
  5492. {
  5493. "type": "string",
  5494. "description": "owner of the repo",
  5495. "name": "owner",
  5496. "in": "path",
  5497. "required": true
  5498. },
  5499. {
  5500. "type": "string",
  5501. "description": "name of the repo",
  5502. "name": "repo",
  5503. "in": "path",
  5504. "required": true
  5505. }
  5506. ],
  5507. "responses": {
  5508. "200": {
  5509. "$ref": "#/responses/TrackedTimeList"
  5510. }
  5511. }
  5512. }
  5513. },
  5514. "/repos/{owner}/{repo}/times/{user}": {
  5515. "get": {
  5516. "produces": [
  5517. "application/json"
  5518. ],
  5519. "tags": [
  5520. "user"
  5521. ],
  5522. "summary": "List a user's tracked times in a repo",
  5523. "operationId": "userTrackedTimes",
  5524. "parameters": [
  5525. {
  5526. "type": "string",
  5527. "description": "owner of the repo",
  5528. "name": "owner",
  5529. "in": "path",
  5530. "required": true
  5531. },
  5532. {
  5533. "type": "string",
  5534. "description": "name of the repo",
  5535. "name": "repo",
  5536. "in": "path",
  5537. "required": true
  5538. },
  5539. {
  5540. "type": "string",
  5541. "description": "username of user",
  5542. "name": "user",
  5543. "in": "path",
  5544. "required": true
  5545. }
  5546. ],
  5547. "responses": {
  5548. "200": {
  5549. "$ref": "#/responses/TrackedTimeList"
  5550. }
  5551. }
  5552. }
  5553. },
  5554. "/repos/{owner}/{repo}/topics": {
  5555. "get": {
  5556. "produces": [
  5557. "application/json"
  5558. ],
  5559. "tags": [
  5560. "repository"
  5561. ],
  5562. "summary": "Get list of topics that a repository has",
  5563. "operationId": "repoListTopics",
  5564. "parameters": [
  5565. {
  5566. "type": "string",
  5567. "description": "owner of the repo",
  5568. "name": "owner",
  5569. "in": "path",
  5570. "required": true
  5571. },
  5572. {
  5573. "type": "string",
  5574. "description": "name of the repo",
  5575. "name": "repo",
  5576. "in": "path",
  5577. "required": true
  5578. }
  5579. ],
  5580. "responses": {
  5581. "200": {
  5582. "$ref": "#/responses/TopicNames"
  5583. }
  5584. }
  5585. },
  5586. "put": {
  5587. "produces": [
  5588. "application/json"
  5589. ],
  5590. "tags": [
  5591. "repository"
  5592. ],
  5593. "summary": "Replace list of topics for a repository",
  5594. "operationId": "repoUpdateTopics",
  5595. "parameters": [
  5596. {
  5597. "type": "string",
  5598. "description": "owner of the repo",
  5599. "name": "owner",
  5600. "in": "path",
  5601. "required": true
  5602. },
  5603. {
  5604. "type": "string",
  5605. "description": "name of the repo",
  5606. "name": "repo",
  5607. "in": "path",
  5608. "required": true
  5609. },
  5610. {
  5611. "name": "body",
  5612. "in": "body",
  5613. "schema": {
  5614. "$ref": "#/definitions/RepoTopicOptions"
  5615. }
  5616. }
  5617. ],
  5618. "responses": {
  5619. "204": {
  5620. "$ref": "#/responses/empty"
  5621. }
  5622. }
  5623. }
  5624. },
  5625. "/repos/{owner}/{repo}/topics/{topic}": {
  5626. "put": {
  5627. "produces": [
  5628. "application/json"
  5629. ],
  5630. "tags": [
  5631. "repository"
  5632. ],
  5633. "summary": "Add a topic to a repository",
  5634. "operationId": "repoAddTopíc",
  5635. "parameters": [
  5636. {
  5637. "type": "string",
  5638. "description": "owner of the repo",
  5639. "name": "owner",
  5640. "in": "path",
  5641. "required": true
  5642. },
  5643. {
  5644. "type": "string",
  5645. "description": "name of the repo",
  5646. "name": "repo",
  5647. "in": "path",
  5648. "required": true
  5649. },
  5650. {
  5651. "type": "string",
  5652. "description": "name of the topic to add",
  5653. "name": "topic",
  5654. "in": "path",
  5655. "required": true
  5656. }
  5657. ],
  5658. "responses": {
  5659. "204": {
  5660. "$ref": "#/responses/empty"
  5661. }
  5662. }
  5663. },
  5664. "delete": {
  5665. "produces": [
  5666. "application/json"
  5667. ],
  5668. "tags": [
  5669. "repository"
  5670. ],
  5671. "summary": "Delete a topic from a repository",
  5672. "operationId": "repoDeleteTopic",
  5673. "parameters": [
  5674. {
  5675. "type": "string",
  5676. "description": "owner of the repo",
  5677. "name": "owner",
  5678. "in": "path",
  5679. "required": true
  5680. },
  5681. {
  5682. "type": "string",
  5683. "description": "name of the repo",
  5684. "name": "repo",
  5685. "in": "path",
  5686. "required": true
  5687. },
  5688. {
  5689. "type": "string",
  5690. "description": "name of the topic to delete",
  5691. "name": "topic",
  5692. "in": "path",
  5693. "required": true
  5694. }
  5695. ],
  5696. "responses": {
  5697. "204": {
  5698. "$ref": "#/responses/empty"
  5699. }
  5700. }
  5701. }
  5702. },
  5703. "/repositories/{id}": {
  5704. "get": {
  5705. "produces": [
  5706. "application/json"
  5707. ],
  5708. "tags": [
  5709. "repository"
  5710. ],
  5711. "summary": "Get a repository by id",
  5712. "operationId": "repoGetByID",
  5713. "parameters": [
  5714. {
  5715. "type": "integer",
  5716. "format": "int64",
  5717. "description": "id of the repo to get",
  5718. "name": "id",
  5719. "in": "path",
  5720. "required": true
  5721. }
  5722. ],
  5723. "responses": {
  5724. "200": {
  5725. "$ref": "#/responses/Repository"
  5726. }
  5727. }
  5728. }
  5729. },
  5730. "/signing-key.gpg": {
  5731. "get": {
  5732. "produces": [
  5733. "text/plain"
  5734. ],
  5735. "tags": [
  5736. "miscellaneous"
  5737. ],
  5738. "summary": "Get default signing-key.gpg",
  5739. "operationId": "getSigningKey",
  5740. "responses": {
  5741. "200": {
  5742. "description": "GPG armored public key",
  5743. "schema": {
  5744. "type": "string"
  5745. }
  5746. }
  5747. }
  5748. }
  5749. },
  5750. "/teams/{id}": {
  5751. "get": {
  5752. "produces": [
  5753. "application/json"
  5754. ],
  5755. "tags": [
  5756. "organization"
  5757. ],
  5758. "summary": "Get a team",
  5759. "operationId": "orgGetTeam",
  5760. "parameters": [
  5761. {
  5762. "type": "integer",
  5763. "format": "int64",
  5764. "description": "id of the team to get",
  5765. "name": "id",
  5766. "in": "path",
  5767. "required": true
  5768. }
  5769. ],
  5770. "responses": {
  5771. "200": {
  5772. "$ref": "#/responses/Team"
  5773. }
  5774. }
  5775. },
  5776. "delete": {
  5777. "tags": [
  5778. "organization"
  5779. ],
  5780. "summary": "Delete a team",
  5781. "operationId": "orgDeleteTeam",
  5782. "parameters": [
  5783. {
  5784. "type": "integer",
  5785. "format": "int64",
  5786. "description": "id of the team to delete",
  5787. "name": "id",
  5788. "in": "path",
  5789. "required": true
  5790. }
  5791. ],
  5792. "responses": {
  5793. "204": {
  5794. "description": "team deleted"
  5795. }
  5796. }
  5797. },
  5798. "patch": {
  5799. "consumes": [
  5800. "application/json"
  5801. ],
  5802. "produces": [
  5803. "application/json"
  5804. ],
  5805. "tags": [
  5806. "organization"
  5807. ],
  5808. "summary": "Edit a team",
  5809. "operationId": "orgEditTeam",
  5810. "parameters": [
  5811. {
  5812. "type": "integer",
  5813. "description": "id of the team to edit",
  5814. "name": "id",
  5815. "in": "path",
  5816. "required": true
  5817. },
  5818. {
  5819. "name": "body",
  5820. "in": "body",
  5821. "schema": {
  5822. "$ref": "#/definitions/EditTeamOption"
  5823. }
  5824. }
  5825. ],
  5826. "responses": {
  5827. "200": {
  5828. "$ref": "#/responses/Team"
  5829. }
  5830. }
  5831. }
  5832. },
  5833. "/teams/{id}/members": {
  5834. "get": {
  5835. "produces": [
  5836. "application/json"
  5837. ],
  5838. "tags": [
  5839. "organization"
  5840. ],
  5841. "summary": "List a team's members",
  5842. "operationId": "orgListTeamMembers",
  5843. "parameters": [
  5844. {
  5845. "type": "integer",
  5846. "format": "int64",
  5847. "description": "id of the team",
  5848. "name": "id",
  5849. "in": "path",
  5850. "required": true
  5851. }
  5852. ],
  5853. "responses": {
  5854. "200": {
  5855. "$ref": "#/responses/UserList"
  5856. }
  5857. }
  5858. }
  5859. },
  5860. "/teams/{id}/members/{username}": {
  5861. "get": {
  5862. "produces": [
  5863. "application/json"
  5864. ],
  5865. "tags": [
  5866. "organization"
  5867. ],
  5868. "summary": "List a particular member of team",
  5869. "operationId": "orgListTeamMember",
  5870. "parameters": [
  5871. {
  5872. "type": "integer",
  5873. "format": "int64",
  5874. "description": "id of the team",
  5875. "name": "id",
  5876. "in": "path",
  5877. "required": true
  5878. },
  5879. {
  5880. "type": "string",
  5881. "description": "username of the member to list",
  5882. "name": "username",
  5883. "in": "path",
  5884. "required": true
  5885. }
  5886. ],
  5887. "responses": {
  5888. "200": {
  5889. "$ref": "#/responses/User"
  5890. }
  5891. }
  5892. },
  5893. "put": {
  5894. "produces": [
  5895. "application/json"
  5896. ],
  5897. "tags": [
  5898. "organization"
  5899. ],
  5900. "summary": "Add a team member",
  5901. "operationId": "orgAddTeamMember",
  5902. "parameters": [
  5903. {
  5904. "type": "integer",
  5905. "format": "int64",
  5906. "description": "id of the team",
  5907. "name": "id",
  5908. "in": "path",
  5909. "required": true
  5910. },
  5911. {
  5912. "type": "string",
  5913. "description": "username of the user to add",
  5914. "name": "username",
  5915. "in": "path",
  5916. "required": true
  5917. }
  5918. ],
  5919. "responses": {
  5920. "204": {
  5921. "$ref": "#/responses/empty"
  5922. }
  5923. }
  5924. },
  5925. "delete": {
  5926. "produces": [
  5927. "application/json"
  5928. ],
  5929. "tags": [
  5930. "organization"
  5931. ],
  5932. "summary": "Remove a team member",
  5933. "operationId": "orgRemoveTeamMember",
  5934. "parameters": [
  5935. {
  5936. "type": "integer",
  5937. "format": "int64",
  5938. "description": "id of the team",
  5939. "name": "id",
  5940. "in": "path",
  5941. "required": true
  5942. },
  5943. {
  5944. "type": "string",
  5945. "description": "username of the user to remove",
  5946. "name": "username",
  5947. "in": "path",
  5948. "required": true
  5949. }
  5950. ],
  5951. "responses": {
  5952. "204": {
  5953. "$ref": "#/responses/empty"
  5954. }
  5955. }
  5956. }
  5957. },
  5958. "/teams/{id}/repos": {
  5959. "get": {
  5960. "produces": [
  5961. "application/json"
  5962. ],
  5963. "tags": [
  5964. "organization"
  5965. ],
  5966. "summary": "List a team's repos",
  5967. "operationId": "orgListTeamRepos",
  5968. "parameters": [
  5969. {
  5970. "type": "integer",
  5971. "format": "int64",
  5972. "description": "id of the team",
  5973. "name": "id",
  5974. "in": "path",
  5975. "required": true
  5976. }
  5977. ],
  5978. "responses": {
  5979. "200": {
  5980. "$ref": "#/responses/RepositoryList"
  5981. }
  5982. }
  5983. }
  5984. },
  5985. "/teams/{id}/repos/{org}/{repo}": {
  5986. "put": {
  5987. "produces": [
  5988. "application/json"
  5989. ],
  5990. "tags": [
  5991. "organization"
  5992. ],
  5993. "summary": "Add a repository to a team",
  5994. "operationId": "orgAddTeamRepository",
  5995. "parameters": [
  5996. {
  5997. "type": "integer",
  5998. "format": "int64",
  5999. "description": "id of the team",
  6000. "name": "id",
  6001. "in": "path",
  6002. "required": true
  6003. },
  6004. {
  6005. "type": "string",
  6006. "description": "organization that owns the repo to add",
  6007. "name": "org",
  6008. "in": "path",
  6009. "required": true
  6010. },
  6011. {
  6012. "type": "string",
  6013. "description": "name of the repo to add",
  6014. "name": "repo",
  6015. "in": "path",
  6016. "required": true
  6017. }
  6018. ],
  6019. "responses": {
  6020. "204": {
  6021. "$ref": "#/responses/empty"
  6022. }
  6023. }
  6024. },
  6025. "delete": {
  6026. "description": "This does not delete the repository, it only removes the repository from the team.",
  6027. "produces": [
  6028. "application/json"
  6029. ],
  6030. "tags": [
  6031. "organization"
  6032. ],
  6033. "summary": "Remove a repository from a team",
  6034. "operationId": "orgRemoveTeamRepository",
  6035. "parameters": [
  6036. {
  6037. "type": "integer",
  6038. "format": "int64",
  6039. "description": "id of the team",
  6040. "name": "id",
  6041. "in": "path",
  6042. "required": true
  6043. },
  6044. {
  6045. "type": "string",
  6046. "description": "organization that owns the repo to remove",
  6047. "name": "org",
  6048. "in": "path",
  6049. "required": true
  6050. },
  6051. {
  6052. "type": "string",
  6053. "description": "name of the repo to remove",
  6054. "name": "repo",
  6055. "in": "path",
  6056. "required": true
  6057. }
  6058. ],
  6059. "responses": {
  6060. "204": {
  6061. "$ref": "#/responses/empty"
  6062. }
  6063. }
  6064. }
  6065. },
  6066. "/topics/search": {
  6067. "get": {
  6068. "produces": [
  6069. "application/json"
  6070. ],
  6071. "tags": [
  6072. "repository"
  6073. ],
  6074. "summary": "search topics via keyword",
  6075. "operationId": "topicSearch",
  6076. "parameters": [
  6077. {
  6078. "type": "string",
  6079. "description": "keywords to search",
  6080. "name": "q",
  6081. "in": "query",
  6082. "required": true
  6083. }
  6084. ],
  6085. "responses": {
  6086. "200": {
  6087. "$ref": "#/responses/TopicListResponse"
  6088. }
  6089. }
  6090. }
  6091. },
  6092. "/user": {
  6093. "get": {
  6094. "produces": [
  6095. "application/json"
  6096. ],
  6097. "tags": [
  6098. "user"
  6099. ],
  6100. "summary": "Get the authenticated user",
  6101. "operationId": "userGetCurrent",
  6102. "responses": {
  6103. "200": {
  6104. "$ref": "#/responses/User"
  6105. }
  6106. }
  6107. }
  6108. },
  6109. "/user/emails": {
  6110. "get": {
  6111. "produces": [
  6112. "application/json"
  6113. ],
  6114. "tags": [
  6115. "user"
  6116. ],
  6117. "summary": "List the authenticated user's email addresses",
  6118. "operationId": "userListEmails",
  6119. "responses": {
  6120. "200": {
  6121. "$ref": "#/responses/EmailList"
  6122. }
  6123. }
  6124. },
  6125. "post": {
  6126. "produces": [
  6127. "application/json"
  6128. ],
  6129. "tags": [
  6130. "user"
  6131. ],
  6132. "summary": "Add email addresses",
  6133. "operationId": "userAddEmail",
  6134. "parameters": [
  6135. {
  6136. "name": "body",
  6137. "in": "body",
  6138. "schema": {
  6139. "$ref": "#/definitions/CreateEmailOption"
  6140. }
  6141. }
  6142. ],
  6143. "responses": {
  6144. "201": {
  6145. "$ref": "#/responses/EmailList"
  6146. }
  6147. }
  6148. },
  6149. "delete": {
  6150. "produces": [
  6151. "application/json"
  6152. ],
  6153. "tags": [
  6154. "user"
  6155. ],
  6156. "summary": "Delete email addresses",
  6157. "operationId": "userDeleteEmail",
  6158. "parameters": [
  6159. {
  6160. "name": "body",
  6161. "in": "body",
  6162. "schema": {
  6163. "$ref": "#/definitions/DeleteEmailOption"
  6164. }
  6165. }
  6166. ],
  6167. "responses": {
  6168. "204": {
  6169. "$ref": "#/responses/empty"
  6170. }
  6171. }
  6172. }
  6173. },
  6174. "/user/followers": {
  6175. "get": {
  6176. "produces": [
  6177. "application/json"
  6178. ],
  6179. "tags": [
  6180. "user"
  6181. ],
  6182. "summary": "List the authenticated user's followers",
  6183. "operationId": "userCurrentListFollowers",
  6184. "responses": {
  6185. "200": {
  6186. "$ref": "#/responses/UserList"
  6187. }
  6188. }
  6189. }
  6190. },
  6191. "/user/following": {
  6192. "get": {
  6193. "produces": [
  6194. "application/json"
  6195. ],
  6196. "tags": [
  6197. "user"
  6198. ],
  6199. "summary": "List the users that the authenticated user is following",
  6200. "operationId": "userCurrentListFollowing",
  6201. "responses": {
  6202. "200": {
  6203. "$ref": "#/responses/UserList"
  6204. }
  6205. }
  6206. }
  6207. },
  6208. "/user/following/{username}": {
  6209. "get": {
  6210. "tags": [
  6211. "user"
  6212. ],
  6213. "summary": "Check whether a user is followed by the authenticated user",
  6214. "operationId": "userCurrentCheckFollowing",
  6215. "parameters": [
  6216. {
  6217. "type": "string",
  6218. "description": "username of followed user",
  6219. "name": "username",
  6220. "in": "path",
  6221. "required": true
  6222. }
  6223. ],
  6224. "responses": {
  6225. "204": {
  6226. "$ref": "#/responses/empty"
  6227. },
  6228. "404": {
  6229. "$ref": "#/responses/notFound"
  6230. }
  6231. }
  6232. },
  6233. "put": {
  6234. "tags": [
  6235. "user"
  6236. ],
  6237. "summary": "Follow a user",
  6238. "operationId": "userCurrentPutFollow",
  6239. "parameters": [
  6240. {
  6241. "type": "string",
  6242. "description": "username of user to follow",
  6243. "name": "username",
  6244. "in": "path",
  6245. "required": true
  6246. }
  6247. ],
  6248. "responses": {
  6249. "204": {
  6250. "$ref": "#/responses/empty"
  6251. }
  6252. }
  6253. },
  6254. "delete": {
  6255. "tags": [
  6256. "user"
  6257. ],
  6258. "summary": "Unfollow a user",
  6259. "operationId": "userCurrentDeleteFollow",
  6260. "parameters": [
  6261. {
  6262. "type": "string",
  6263. "description": "username of user to unfollow",
  6264. "name": "username",
  6265. "in": "path",
  6266. "required": true
  6267. }
  6268. ],
  6269. "responses": {
  6270. "204": {
  6271. "$ref": "#/responses/empty"
  6272. }
  6273. }
  6274. }
  6275. },
  6276. "/user/gpg_keys": {
  6277. "get": {
  6278. "produces": [
  6279. "application/json"
  6280. ],
  6281. "tags": [
  6282. "user"
  6283. ],
  6284. "summary": "List the authenticated user's GPG keys",
  6285. "operationId": "userCurrentListGPGKeys",
  6286. "responses": {
  6287. "200": {
  6288. "$ref": "#/responses/GPGKeyList"
  6289. }
  6290. }
  6291. },
  6292. "post": {
  6293. "consumes": [
  6294. "application/json"
  6295. ],
  6296. "produces": [
  6297. "application/json"
  6298. ],
  6299. "tags": [
  6300. "user"
  6301. ],
  6302. "summary": "Create a GPG key",
  6303. "operationId": "userCurrentPostGPGKey",
  6304. "parameters": [
  6305. {
  6306. "name": "Form",
  6307. "in": "body",
  6308. "schema": {
  6309. "$ref": "#/definitions/CreateGPGKeyOption"
  6310. }
  6311. }
  6312. ],
  6313. "responses": {
  6314. "201": {
  6315. "$ref": "#/responses/GPGKey"
  6316. },
  6317. "422": {
  6318. "$ref": "#/responses/validationError"
  6319. }
  6320. }
  6321. }
  6322. },
  6323. "/user/gpg_keys/{id}": {
  6324. "get": {
  6325. "produces": [
  6326. "application/json"
  6327. ],
  6328. "tags": [
  6329. "user"
  6330. ],
  6331. "summary": "Get a GPG key",
  6332. "operationId": "userCurrentGetGPGKey",
  6333. "parameters": [
  6334. {
  6335. "type": "integer",
  6336. "format": "int64",
  6337. "description": "id of key to get",
  6338. "name": "id",
  6339. "in": "path",
  6340. "required": true
  6341. }
  6342. ],
  6343. "responses": {
  6344. "200": {
  6345. "$ref": "#/responses/GPGKey"
  6346. },
  6347. "404": {
  6348. "$ref": "#/responses/notFound"
  6349. }
  6350. }
  6351. },
  6352. "delete": {
  6353. "produces": [
  6354. "application/json"
  6355. ],
  6356. "tags": [
  6357. "user"
  6358. ],
  6359. "summary": "Remove a GPG key",
  6360. "operationId": "userCurrentDeleteGPGKey",
  6361. "parameters": [
  6362. {
  6363. "type": "integer",
  6364. "format": "int64",
  6365. "description": "id of key to delete",
  6366. "name": "id",
  6367. "in": "path",
  6368. "required": true
  6369. }
  6370. ],
  6371. "responses": {
  6372. "204": {
  6373. "$ref": "#/responses/empty"
  6374. },
  6375. "403": {
  6376. "$ref": "#/responses/forbidden"
  6377. }
  6378. }
  6379. }
  6380. },
  6381. "/user/keys": {
  6382. "get": {
  6383. "produces": [
  6384. "application/json"
  6385. ],
  6386. "tags": [
  6387. "user"
  6388. ],
  6389. "summary": "List the authenticated user's public keys",
  6390. "operationId": "userCurrentListKeys",
  6391. "parameters": [
  6392. {
  6393. "type": "string",
  6394. "description": "fingerprint of the key",
  6395. "name": "fingerprint",
  6396. "in": "query"
  6397. }
  6398. ],
  6399. "responses": {
  6400. "200": {
  6401. "$ref": "#/responses/PublicKeyList"
  6402. }
  6403. }
  6404. },
  6405. "post": {
  6406. "consumes": [
  6407. "application/json"
  6408. ],
  6409. "produces": [
  6410. "application/json"
  6411. ],
  6412. "tags": [
  6413. "user"
  6414. ],
  6415. "summary": "Create a public key",
  6416. "operationId": "userCurrentPostKey",
  6417. "parameters": [
  6418. {
  6419. "name": "body",
  6420. "in": "body",
  6421. "schema": {
  6422. "$ref": "#/definitions/CreateKeyOption"
  6423. }
  6424. }
  6425. ],
  6426. "responses": {
  6427. "201": {
  6428. "$ref": "#/responses/PublicKey"
  6429. },
  6430. "422": {
  6431. "$ref": "#/responses/validationError"
  6432. }
  6433. }
  6434. }
  6435. },
  6436. "/user/keys/{id}": {
  6437. "get": {
  6438. "produces": [
  6439. "application/json"
  6440. ],
  6441. "tags": [
  6442. "user"
  6443. ],
  6444. "summary": "Get a public key",
  6445. "operationId": "userCurrentGetKey",
  6446. "parameters": [
  6447. {
  6448. "type": "integer",
  6449. "format": "int64",
  6450. "description": "id of key to get",
  6451. "name": "id",
  6452. "in": "path",
  6453. "required": true
  6454. }
  6455. ],
  6456. "responses": {
  6457. "200": {
  6458. "$ref": "#/responses/PublicKey"
  6459. },
  6460. "404": {
  6461. "$ref": "#/responses/notFound"
  6462. }
  6463. }
  6464. },
  6465. "delete": {
  6466. "produces": [
  6467. "application/json"
  6468. ],
  6469. "tags": [
  6470. "user"
  6471. ],
  6472. "summary": "Delete a public key",
  6473. "operationId": "userCurrentDeleteKey",
  6474. "parameters": [
  6475. {
  6476. "type": "integer",
  6477. "format": "int64",
  6478. "description": "id of key to delete",
  6479. "name": "id",
  6480. "in": "path",
  6481. "required": true
  6482. }
  6483. ],
  6484. "responses": {
  6485. "204": {
  6486. "$ref": "#/responses/empty"
  6487. },
  6488. "403": {
  6489. "$ref": "#/responses/forbidden"
  6490. },
  6491. "404": {
  6492. "$ref": "#/responses/notFound"
  6493. }
  6494. }
  6495. }
  6496. },
  6497. "/user/orgs": {
  6498. "get": {
  6499. "produces": [
  6500. "application/json"
  6501. ],
  6502. "tags": [
  6503. "organization"
  6504. ],
  6505. "summary": "List the current user's organizations",
  6506. "operationId": "orgListCurrentUserOrgs",
  6507. "responses": {
  6508. "200": {
  6509. "$ref": "#/responses/OrganizationList"
  6510. }
  6511. }
  6512. }
  6513. },
  6514. "/user/repos": {
  6515. "get": {
  6516. "produces": [
  6517. "application/json"
  6518. ],
  6519. "tags": [
  6520. "user"
  6521. ],
  6522. "summary": "List the repos that the authenticated user owns or has access to",
  6523. "operationId": "userCurrentListRepos",
  6524. "responses": {
  6525. "200": {
  6526. "$ref": "#/responses/RepositoryList"
  6527. }
  6528. }
  6529. },
  6530. "post": {
  6531. "consumes": [
  6532. "application/json"
  6533. ],
  6534. "produces": [
  6535. "application/json"
  6536. ],
  6537. "tags": [
  6538. "repository",
  6539. "user"
  6540. ],
  6541. "summary": "Create a repository",
  6542. "operationId": "createCurrentUserRepo",
  6543. "parameters": [
  6544. {
  6545. "name": "body",
  6546. "in": "body",
  6547. "schema": {
  6548. "$ref": "#/definitions/CreateRepoOption"
  6549. }
  6550. }
  6551. ],
  6552. "responses": {
  6553. "201": {
  6554. "$ref": "#/responses/Repository"
  6555. },
  6556. "409": {
  6557. "description": "The repository with the same name already exists."
  6558. },
  6559. "422": {
  6560. "$ref": "#/responses/validationError"
  6561. }
  6562. }
  6563. }
  6564. },
  6565. "/user/starred": {
  6566. "get": {
  6567. "produces": [
  6568. "application/json"
  6569. ],
  6570. "tags": [
  6571. "user"
  6572. ],
  6573. "summary": "The repos that the authenticated user has starred",
  6574. "operationId": "userCurrentListStarred",
  6575. "responses": {
  6576. "200": {
  6577. "$ref": "#/responses/RepositoryList"
  6578. }
  6579. }
  6580. }
  6581. },
  6582. "/user/starred/{owner}/{repo}": {
  6583. "get": {
  6584. "tags": [
  6585. "user"
  6586. ],
  6587. "summary": "Whether the authenticated is starring the repo",
  6588. "operationId": "userCurrentCheckStarring",
  6589. "parameters": [
  6590. {
  6591. "type": "string",
  6592. "description": "owner of the repo",
  6593. "name": "owner",
  6594. "in": "path",
  6595. "required": true
  6596. },
  6597. {
  6598. "type": "string",
  6599. "description": "name of the repo",
  6600. "name": "repo",
  6601. "in": "path",
  6602. "required": true
  6603. }
  6604. ],
  6605. "responses": {
  6606. "204": {
  6607. "$ref": "#/responses/empty"
  6608. },
  6609. "404": {
  6610. "$ref": "#/responses/notFound"
  6611. }
  6612. }
  6613. },
  6614. "put": {
  6615. "tags": [
  6616. "user"
  6617. ],
  6618. "summary": "Star the given repo",
  6619. "operationId": "userCurrentPutStar",
  6620. "parameters": [
  6621. {
  6622. "type": "string",
  6623. "description": "owner of the repo to star",
  6624. "name": "owner",
  6625. "in": "path",
  6626. "required": true
  6627. },
  6628. {
  6629. "type": "string",
  6630. "description": "name of the repo to star",
  6631. "name": "repo",
  6632. "in": "path",
  6633. "required": true
  6634. }
  6635. ],
  6636. "responses": {
  6637. "204": {
  6638. "$ref": "#/responses/empty"
  6639. }
  6640. }
  6641. },
  6642. "delete": {
  6643. "tags": [
  6644. "user"
  6645. ],
  6646. "summary": "Unstar the given repo",
  6647. "operationId": "userCurrentDeleteStar",
  6648. "parameters": [
  6649. {
  6650. "type": "string",
  6651. "description": "owner of the repo to unstar",
  6652. "name": "owner",
  6653. "in": "path",
  6654. "required": true
  6655. },
  6656. {
  6657. "type": "string",
  6658. "description": "name of the repo to unstar",
  6659. "name": "repo",
  6660. "in": "path",
  6661. "required": true
  6662. }
  6663. ],
  6664. "responses": {
  6665. "204": {
  6666. "$ref": "#/responses/empty"
  6667. }
  6668. }
  6669. }
  6670. },
  6671. "/user/subscriptions": {
  6672. "get": {
  6673. "produces": [
  6674. "application/json"
  6675. ],
  6676. "tags": [
  6677. "user"
  6678. ],
  6679. "summary": "List repositories watched by the authenticated user",
  6680. "operationId": "userCurrentListSubscriptions",
  6681. "responses": {
  6682. "200": {
  6683. "$ref": "#/responses/RepositoryList"
  6684. }
  6685. }
  6686. }
  6687. },
  6688. "/user/teams": {
  6689. "get": {
  6690. "produces": [
  6691. "application/json"
  6692. ],
  6693. "tags": [
  6694. "user"
  6695. ],
  6696. "summary": "List all the teams a user belongs to",
  6697. "operationId": "userListTeams",
  6698. "responses": {
  6699. "200": {
  6700. "$ref": "#/responses/TeamList"
  6701. }
  6702. }
  6703. }
  6704. },
  6705. "/user/times": {
  6706. "get": {
  6707. "produces": [
  6708. "application/json"
  6709. ],
  6710. "tags": [
  6711. "user"
  6712. ],
  6713. "summary": "List the current user's tracked times",
  6714. "operationId": "userCurrentTrackedTimes",
  6715. "responses": {
  6716. "200": {
  6717. "$ref": "#/responses/TrackedTimeList"
  6718. }
  6719. }
  6720. }
  6721. },
  6722. "/users/search": {
  6723. "get": {
  6724. "produces": [
  6725. "application/json"
  6726. ],
  6727. "tags": [
  6728. "user"
  6729. ],
  6730. "summary": "Search for users",
  6731. "operationId": "userSearch",
  6732. "parameters": [
  6733. {
  6734. "type": "string",
  6735. "description": "keyword",
  6736. "name": "q",
  6737. "in": "query"
  6738. },
  6739. {
  6740. "type": "integer",
  6741. "format": "int64",
  6742. "description": "ID of the user to search for",
  6743. "name": "uid",
  6744. "in": "query"
  6745. },
  6746. {
  6747. "type": "integer",
  6748. "description": "maximum number of users to return",
  6749. "name": "limit",
  6750. "in": "query"
  6751. }
  6752. ],
  6753. "responses": {
  6754. "200": {
  6755. "description": "SearchResults of a successful search",
  6756. "schema": {
  6757. "type": "object",
  6758. "properties": {
  6759. "data": {
  6760. "type": "array",
  6761. "items": {
  6762. "$ref": "#/definitions/User"
  6763. }
  6764. },
  6765. "ok": {
  6766. "type": "boolean"
  6767. }
  6768. }
  6769. }
  6770. }
  6771. }
  6772. }
  6773. },
  6774. "/users/{follower}/following/{followee}": {
  6775. "get": {
  6776. "tags": [
  6777. "user"
  6778. ],
  6779. "summary": "Check if one user is following another user",
  6780. "operationId": "userCheckFollowing",
  6781. "parameters": [
  6782. {
  6783. "type": "string",
  6784. "description": "username of following user",
  6785. "name": "follower",
  6786. "in": "path",
  6787. "required": true
  6788. },
  6789. {
  6790. "type": "string",
  6791. "description": "username of followed user",
  6792. "name": "followee",
  6793. "in": "path",
  6794. "required": true
  6795. }
  6796. ],
  6797. "responses": {
  6798. "204": {
  6799. "$ref": "#/responses/empty"
  6800. },
  6801. "404": {
  6802. "$ref": "#/responses/notFound"
  6803. }
  6804. }
  6805. }
  6806. },
  6807. "/users/{username}": {
  6808. "get": {
  6809. "produces": [
  6810. "application/json"
  6811. ],
  6812. "tags": [
  6813. "user"
  6814. ],
  6815. "summary": "Get a user",
  6816. "operationId": "userGet",
  6817. "parameters": [
  6818. {
  6819. "type": "string",
  6820. "description": "username of user to get",
  6821. "name": "username",
  6822. "in": "path",
  6823. "required": true
  6824. }
  6825. ],
  6826. "responses": {
  6827. "200": {
  6828. "$ref": "#/responses/User"
  6829. },
  6830. "404": {
  6831. "$ref": "#/responses/notFound"
  6832. }
  6833. }
  6834. }
  6835. },
  6836. "/users/{username}/followers": {
  6837. "get": {
  6838. "produces": [
  6839. "application/json"
  6840. ],
  6841. "tags": [
  6842. "user"
  6843. ],
  6844. "summary": "List the given user's followers",
  6845. "operationId": "userListFollowers",
  6846. "parameters": [
  6847. {
  6848. "type": "string",
  6849. "description": "username of user",
  6850. "name": "username",
  6851. "in": "path",
  6852. "required": true
  6853. }
  6854. ],
  6855. "responses": {
  6856. "200": {
  6857. "$ref": "#/responses/UserList"
  6858. }
  6859. }
  6860. }
  6861. },
  6862. "/users/{username}/following": {
  6863. "get": {
  6864. "produces": [
  6865. "application/json"
  6866. ],
  6867. "tags": [
  6868. "user"
  6869. ],
  6870. "summary": "List the users that the given user is following",
  6871. "operationId": "userListFollowing",
  6872. "parameters": [
  6873. {
  6874. "type": "string",
  6875. "description": "username of user",
  6876. "name": "username",
  6877. "in": "path",
  6878. "required": true
  6879. }
  6880. ],
  6881. "responses": {
  6882. "200": {
  6883. "$ref": "#/responses/UserList"
  6884. }
  6885. }
  6886. }
  6887. },
  6888. "/users/{username}/gpg_keys": {
  6889. "get": {
  6890. "produces": [
  6891. "application/json"
  6892. ],
  6893. "tags": [
  6894. "user"
  6895. ],
  6896. "summary": "List the given user's GPG keys",
  6897. "operationId": "userListGPGKeys",
  6898. "parameters": [
  6899. {
  6900. "type": "string",
  6901. "description": "username of user",
  6902. "name": "username",
  6903. "in": "path",
  6904. "required": true
  6905. }
  6906. ],
  6907. "responses": {
  6908. "200": {
  6909. "$ref": "#/responses/GPGKeyList"
  6910. }
  6911. }
  6912. }
  6913. },
  6914. "/users/{username}/heatmap": {
  6915. "get": {
  6916. "produces": [
  6917. "application/json"
  6918. ],
  6919. "tags": [
  6920. "user"
  6921. ],
  6922. "summary": "Get a user's heatmap",
  6923. "operationId": "userGetHeatmapData",
  6924. "parameters": [
  6925. {
  6926. "type": "string",
  6927. "description": "username of user to get",
  6928. "name": "username",
  6929. "in": "path",
  6930. "required": true
  6931. }
  6932. ],
  6933. "responses": {
  6934. "200": {
  6935. "$ref": "#/responses/UserHeatmapData"
  6936. },
  6937. "404": {
  6938. "$ref": "#/responses/notFound"
  6939. }
  6940. }
  6941. }
  6942. },
  6943. "/users/{username}/keys": {
  6944. "get": {
  6945. "produces": [
  6946. "application/json"
  6947. ],
  6948. "tags": [
  6949. "user"
  6950. ],
  6951. "summary": "List the given user's public keys",
  6952. "operationId": "userListKeys",
  6953. "parameters": [
  6954. {
  6955. "type": "string",
  6956. "description": "username of user",
  6957. "name": "username",
  6958. "in": "path",
  6959. "required": true
  6960. },
  6961. {
  6962. "type": "string",
  6963. "description": "fingerprint of the key",
  6964. "name": "fingerprint",
  6965. "in": "query"
  6966. }
  6967. ],
  6968. "responses": {
  6969. "200": {
  6970. "$ref": "#/responses/PublicKeyList"
  6971. }
  6972. }
  6973. }
  6974. },
  6975. "/users/{username}/orgs": {
  6976. "get": {
  6977. "produces": [
  6978. "application/json"
  6979. ],
  6980. "tags": [
  6981. "organization"
  6982. ],
  6983. "summary": "List a user's organizations",
  6984. "operationId": "orgListUserOrgs",
  6985. "parameters": [
  6986. {
  6987. "type": "string",
  6988. "description": "username of user",
  6989. "name": "username",
  6990. "in": "path",
  6991. "required": true
  6992. }
  6993. ],
  6994. "responses": {
  6995. "200": {
  6996. "$ref": "#/responses/OrganizationList"
  6997. }
  6998. }
  6999. }
  7000. },
  7001. "/users/{username}/repos": {
  7002. "get": {
  7003. "produces": [
  7004. "application/json"
  7005. ],
  7006. "tags": [
  7007. "user"
  7008. ],
  7009. "summary": "List the repos owned by the given user",
  7010. "operationId": "userListRepos",
  7011. "parameters": [
  7012. {
  7013. "type": "string",
  7014. "description": "username of user",
  7015. "name": "username",
  7016. "in": "path",
  7017. "required": true
  7018. }
  7019. ],
  7020. "responses": {
  7021. "200": {
  7022. "$ref": "#/responses/RepositoryList"
  7023. }
  7024. }
  7025. }
  7026. },
  7027. "/users/{username}/starred": {
  7028. "get": {
  7029. "produces": [
  7030. "application/json"
  7031. ],
  7032. "tags": [
  7033. "user"
  7034. ],
  7035. "summary": "The repos that the given user has starred",
  7036. "operationId": "userListStarred",
  7037. "parameters": [
  7038. {
  7039. "type": "string",
  7040. "description": "username of user",
  7041. "name": "username",
  7042. "in": "path",
  7043. "required": true
  7044. }
  7045. ],
  7046. "responses": {
  7047. "200": {
  7048. "$ref": "#/responses/RepositoryList"
  7049. }
  7050. }
  7051. }
  7052. },
  7053. "/users/{username}/subscriptions": {
  7054. "get": {
  7055. "produces": [
  7056. "application/json"
  7057. ],
  7058. "tags": [
  7059. "user"
  7060. ],
  7061. "summary": "List the repositories watched by a user",
  7062. "operationId": "userListSubscriptions",
  7063. "parameters": [
  7064. {
  7065. "type": "string",
  7066. "description": "username of the user",
  7067. "name": "username",
  7068. "in": "path",
  7069. "required": true
  7070. }
  7071. ],
  7072. "responses": {
  7073. "200": {
  7074. "$ref": "#/responses/RepositoryList"
  7075. }
  7076. }
  7077. }
  7078. },
  7079. "/users/{username}/tokens": {
  7080. "get": {
  7081. "produces": [
  7082. "application/json"
  7083. ],
  7084. "tags": [
  7085. "user"
  7086. ],
  7087. "summary": "List the authenticated user's access tokens",
  7088. "operationId": "userGetTokens",
  7089. "parameters": [
  7090. {
  7091. "type": "string",
  7092. "description": "username of user",
  7093. "name": "username",
  7094. "in": "path",
  7095. "required": true
  7096. }
  7097. ],
  7098. "responses": {
  7099. "200": {
  7100. "$ref": "#/responses/AccessTokenList"
  7101. }
  7102. }
  7103. },
  7104. "post": {
  7105. "consumes": [
  7106. "application/json"
  7107. ],
  7108. "produces": [
  7109. "application/json"
  7110. ],
  7111. "tags": [
  7112. "user"
  7113. ],
  7114. "summary": "Create an access token",
  7115. "operationId": "userCreateToken",
  7116. "parameters": [
  7117. {
  7118. "type": "string",
  7119. "x-go-name": "Name",
  7120. "description": "username of user",
  7121. "name": "username",
  7122. "in": "path",
  7123. "required": true
  7124. },
  7125. {
  7126. "name": "accessToken",
  7127. "in": "body",
  7128. "schema": {
  7129. "type": "object",
  7130. "required": [
  7131. "name"
  7132. ],
  7133. "properties": {
  7134. "name": {
  7135. "type": "string"
  7136. }
  7137. }
  7138. }
  7139. }
  7140. ],
  7141. "responses": {
  7142. "200": {
  7143. "$ref": "#/responses/AccessToken"
  7144. }
  7145. }
  7146. }
  7147. },
  7148. "/users/{username}/tokens/{token}": {
  7149. "delete": {
  7150. "produces": [
  7151. "application/json"
  7152. ],
  7153. "tags": [
  7154. "user"
  7155. ],
  7156. "summary": "delete an access token",
  7157. "operationId": "userDeleteAccessToken",
  7158. "parameters": [
  7159. {
  7160. "type": "string",
  7161. "description": "username of user",
  7162. "name": "username",
  7163. "in": "path",
  7164. "required": true
  7165. },
  7166. {
  7167. "type": "integer",
  7168. "format": "int64",
  7169. "description": "token to be deleted",
  7170. "name": "token",
  7171. "in": "path",
  7172. "required": true
  7173. }
  7174. ],
  7175. "responses": {
  7176. "204": {
  7177. "$ref": "#/responses/empty"
  7178. }
  7179. }
  7180. }
  7181. },
  7182. "/version": {
  7183. "get": {
  7184. "produces": [
  7185. "application/json"
  7186. ],
  7187. "tags": [
  7188. "miscellaneous"
  7189. ],
  7190. "summary": "Returns the version of the Gitea application",
  7191. "operationId": "getVersion",
  7192. "responses": {
  7193. "200": {
  7194. "$ref": "#/responses/ServerVersion"
  7195. }
  7196. }
  7197. }
  7198. }
  7199. },
  7200. "definitions": {
  7201. "APIError": {
  7202. "description": "APIError is an api error with a message",
  7203. "type": "object",
  7204. "properties": {
  7205. "message": {
  7206. "type": "string",
  7207. "x-go-name": "Message"
  7208. },
  7209. "url": {
  7210. "type": "string",
  7211. "x-go-name": "URL"
  7212. }
  7213. },
  7214. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7215. },
  7216. "AccessToken": {
  7217. "type": "object",
  7218. "title": "AccessToken represents an API access token.",
  7219. "properties": {
  7220. "id": {
  7221. "type": "integer",
  7222. "format": "int64",
  7223. "x-go-name": "ID"
  7224. },
  7225. "name": {
  7226. "type": "string",
  7227. "x-go-name": "Name"
  7228. },
  7229. "sha1": {
  7230. "type": "string",
  7231. "x-go-name": "Token"
  7232. },
  7233. "token_last_eight": {
  7234. "type": "string",
  7235. "x-go-name": "TokenLastEight"
  7236. }
  7237. },
  7238. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7239. },
  7240. "AddCollaboratorOption": {
  7241. "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository",
  7242. "type": "object",
  7243. "properties": {
  7244. "permission": {
  7245. "type": "string",
  7246. "x-go-name": "Permission"
  7247. }
  7248. },
  7249. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7250. },
  7251. "AddTimeOption": {
  7252. "description": "AddTimeOption options for adding time to an issue",
  7253. "type": "object",
  7254. "required": [
  7255. "time"
  7256. ],
  7257. "properties": {
  7258. "time": {
  7259. "description": "time in seconds",
  7260. "type": "integer",
  7261. "format": "int64",
  7262. "x-go-name": "Time"
  7263. }
  7264. },
  7265. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7266. },
  7267. "AnnotatedTag": {
  7268. "description": "AnnotatedTag represents an annotated tag",
  7269. "type": "object",
  7270. "properties": {
  7271. "message": {
  7272. "type": "string",
  7273. "x-go-name": "Message"
  7274. },
  7275. "object": {
  7276. "$ref": "#/definitions/AnnotatedTagObject"
  7277. },
  7278. "sha": {
  7279. "type": "string",
  7280. "x-go-name": "SHA"
  7281. },
  7282. "tag": {
  7283. "type": "string",
  7284. "x-go-name": "Tag"
  7285. },
  7286. "tagger": {
  7287. "$ref": "#/definitions/CommitUser"
  7288. },
  7289. "url": {
  7290. "type": "string",
  7291. "x-go-name": "URL"
  7292. },
  7293. "verification": {
  7294. "$ref": "#/definitions/PayloadCommitVerification"
  7295. }
  7296. },
  7297. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7298. },
  7299. "AnnotatedTagObject": {
  7300. "description": "AnnotatedTagObject contains meta information of the tag object",
  7301. "type": "object",
  7302. "properties": {
  7303. "sha": {
  7304. "type": "string",
  7305. "x-go-name": "SHA"
  7306. },
  7307. "type": {
  7308. "type": "string",
  7309. "x-go-name": "Type"
  7310. },
  7311. "url": {
  7312. "type": "string",
  7313. "x-go-name": "URL"
  7314. }
  7315. },
  7316. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7317. },
  7318. "Attachment": {
  7319. "description": "Attachment a generic attachment",
  7320. "type": "object",
  7321. "properties": {
  7322. "browser_download_url": {
  7323. "type": "string",
  7324. "x-go-name": "DownloadURL"
  7325. },
  7326. "created_at": {
  7327. "type": "string",
  7328. "format": "date-time",
  7329. "x-go-name": "Created"
  7330. },
  7331. "download_count": {
  7332. "type": "integer",
  7333. "format": "int64",
  7334. "x-go-name": "DownloadCount"
  7335. },
  7336. "id": {
  7337. "type": "integer",
  7338. "format": "int64",
  7339. "x-go-name": "ID"
  7340. },
  7341. "name": {
  7342. "type": "string",
  7343. "x-go-name": "Name"
  7344. },
  7345. "size": {
  7346. "type": "integer",
  7347. "format": "int64",
  7348. "x-go-name": "Size"
  7349. },
  7350. "uuid": {
  7351. "type": "string",
  7352. "x-go-name": "UUID"
  7353. }
  7354. },
  7355. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7356. },
  7357. "Branch": {
  7358. "description": "Branch represents a repository branch",
  7359. "type": "object",
  7360. "properties": {
  7361. "commit": {
  7362. "$ref": "#/definitions/PayloadCommit"
  7363. },
  7364. "name": {
  7365. "type": "string",
  7366. "x-go-name": "Name"
  7367. }
  7368. },
  7369. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7370. },
  7371. "Comment": {
  7372. "description": "Comment represents a comment on a commit or issue",
  7373. "type": "object",
  7374. "properties": {
  7375. "body": {
  7376. "type": "string",
  7377. "x-go-name": "Body"
  7378. },
  7379. "created_at": {
  7380. "type": "string",
  7381. "format": "date-time",
  7382. "x-go-name": "Created"
  7383. },
  7384. "html_url": {
  7385. "type": "string",
  7386. "x-go-name": "HTMLURL"
  7387. },
  7388. "id": {
  7389. "type": "integer",
  7390. "format": "int64",
  7391. "x-go-name": "ID"
  7392. },
  7393. "issue_url": {
  7394. "type": "string",
  7395. "x-go-name": "IssueURL"
  7396. },
  7397. "original_author": {
  7398. "type": "string",
  7399. "x-go-name": "OriginalAuthor"
  7400. },
  7401. "original_author_id": {
  7402. "type": "integer",
  7403. "format": "int64",
  7404. "x-go-name": "OriginalAuthorID"
  7405. },
  7406. "pull_request_url": {
  7407. "type": "string",
  7408. "x-go-name": "PRURL"
  7409. },
  7410. "updated_at": {
  7411. "type": "string",
  7412. "format": "date-time",
  7413. "x-go-name": "Updated"
  7414. },
  7415. "user": {
  7416. "$ref": "#/definitions/User"
  7417. }
  7418. },
  7419. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7420. },
  7421. "Commit": {
  7422. "type": "object",
  7423. "title": "Commit contains information generated from a Git commit.",
  7424. "properties": {
  7425. "author": {
  7426. "$ref": "#/definitions/User"
  7427. },
  7428. "commit": {
  7429. "$ref": "#/definitions/RepoCommit"
  7430. },
  7431. "committer": {
  7432. "$ref": "#/definitions/User"
  7433. },
  7434. "html_url": {
  7435. "type": "string",
  7436. "x-go-name": "HTMLURL"
  7437. },
  7438. "parents": {
  7439. "type": "array",
  7440. "items": {
  7441. "$ref": "#/definitions/CommitMeta"
  7442. },
  7443. "x-go-name": "Parents"
  7444. },
  7445. "sha": {
  7446. "type": "string",
  7447. "x-go-name": "SHA"
  7448. },
  7449. "url": {
  7450. "type": "string",
  7451. "x-go-name": "URL"
  7452. }
  7453. },
  7454. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7455. },
  7456. "CommitMeta": {
  7457. "type": "object",
  7458. "title": "CommitMeta contains meta information of a commit in terms of API.",
  7459. "properties": {
  7460. "sha": {
  7461. "type": "string",
  7462. "x-go-name": "SHA"
  7463. },
  7464. "url": {
  7465. "type": "string",
  7466. "x-go-name": "URL"
  7467. }
  7468. },
  7469. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7470. },
  7471. "CommitUser": {
  7472. "type": "object",
  7473. "title": "CommitUser contains information of a user in the context of a commit.",
  7474. "properties": {
  7475. "date": {
  7476. "type": "string",
  7477. "x-go-name": "Date"
  7478. },
  7479. "email": {
  7480. "type": "string",
  7481. "format": "email",
  7482. "x-go-name": "Email"
  7483. },
  7484. "name": {
  7485. "type": "string",
  7486. "x-go-name": "Name"
  7487. }
  7488. },
  7489. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7490. },
  7491. "ContentsResponse": {
  7492. "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content",
  7493. "type": "object",
  7494. "properties": {
  7495. "_links": {
  7496. "$ref": "#/definitions/FileLinksResponse"
  7497. },
  7498. "content": {
  7499. "description": "`content` is populated when `type` is `file`, otherwise null",
  7500. "type": "string",
  7501. "x-go-name": "Content"
  7502. },
  7503. "download_url": {
  7504. "type": "string",
  7505. "x-go-name": "DownloadURL"
  7506. },
  7507. "encoding": {
  7508. "description": "`encoding` is populated when `type` is `file`, otherwise null",
  7509. "type": "string",
  7510. "x-go-name": "Encoding"
  7511. },
  7512. "git_url": {
  7513. "type": "string",
  7514. "x-go-name": "GitURL"
  7515. },
  7516. "html_url": {
  7517. "type": "string",
  7518. "x-go-name": "HTMLURL"
  7519. },
  7520. "name": {
  7521. "type": "string",
  7522. "x-go-name": "Name"
  7523. },
  7524. "path": {
  7525. "type": "string",
  7526. "x-go-name": "Path"
  7527. },
  7528. "sha": {
  7529. "type": "string",
  7530. "x-go-name": "SHA"
  7531. },
  7532. "size": {
  7533. "type": "integer",
  7534. "format": "int64",
  7535. "x-go-name": "Size"
  7536. },
  7537. "submodule_git_url": {
  7538. "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null",
  7539. "type": "string",
  7540. "x-go-name": "SubmoduleGitURL"
  7541. },
  7542. "target": {
  7543. "description": "`target` is populated when `type` is `symlink`, otherwise null",
  7544. "type": "string",
  7545. "x-go-name": "Target"
  7546. },
  7547. "type": {
  7548. "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`",
  7549. "type": "string",
  7550. "x-go-name": "Type"
  7551. },
  7552. "url": {
  7553. "type": "string",
  7554. "x-go-name": "URL"
  7555. }
  7556. },
  7557. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7558. },
  7559. "CreateEmailOption": {
  7560. "description": "CreateEmailOption options when creating email addresses",
  7561. "type": "object",
  7562. "properties": {
  7563. "emails": {
  7564. "description": "email addresses to add",
  7565. "type": "array",
  7566. "items": {
  7567. "type": "string"
  7568. },
  7569. "x-go-name": "Emails"
  7570. }
  7571. },
  7572. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7573. },
  7574. "CreateFileOptions": {
  7575. "description": "CreateFileOptions options for creating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)",
  7576. "type": "object",
  7577. "required": [
  7578. "content"
  7579. ],
  7580. "properties": {
  7581. "author": {
  7582. "$ref": "#/definitions/Identity"
  7583. },
  7584. "branch": {
  7585. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  7586. "type": "string",
  7587. "x-go-name": "BranchName"
  7588. },
  7589. "committer": {
  7590. "$ref": "#/definitions/Identity"
  7591. },
  7592. "content": {
  7593. "description": "content must be base64 encoded",
  7594. "type": "string",
  7595. "x-go-name": "Content"
  7596. },
  7597. "message": {
  7598. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  7599. "type": "string",
  7600. "x-go-name": "Message"
  7601. },
  7602. "new_branch": {
  7603. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  7604. "type": "string",
  7605. "x-go-name": "NewBranchName"
  7606. }
  7607. },
  7608. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7609. },
  7610. "CreateForkOption": {
  7611. "description": "CreateForkOption options for creating a fork",
  7612. "type": "object",
  7613. "properties": {
  7614. "organization": {
  7615. "description": "organization name, if forking into an organization",
  7616. "type": "string",
  7617. "x-go-name": "Organization"
  7618. }
  7619. },
  7620. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7621. },
  7622. "CreateGPGKeyOption": {
  7623. "description": "CreateGPGKeyOption options create user GPG key",
  7624. "type": "object",
  7625. "required": [
  7626. "armored_public_key"
  7627. ],
  7628. "properties": {
  7629. "armored_public_key": {
  7630. "description": "An armored GPG key to add",
  7631. "type": "string",
  7632. "uniqueItems": true,
  7633. "x-go-name": "ArmoredKey"
  7634. }
  7635. },
  7636. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7637. },
  7638. "CreateHookOption": {
  7639. "description": "CreateHookOption options when create a hook",
  7640. "type": "object",
  7641. "required": [
  7642. "type",
  7643. "config"
  7644. ],
  7645. "properties": {
  7646. "active": {
  7647. "type": "boolean",
  7648. "default": false,
  7649. "x-go-name": "Active"
  7650. },
  7651. "branch_filter": {
  7652. "type": "string",
  7653. "x-go-name": "BranchFilter"
  7654. },
  7655. "config": {
  7656. "type": "object",
  7657. "additionalProperties": {
  7658. "type": "string"
  7659. },
  7660. "x-go-name": "Config"
  7661. },
  7662. "events": {
  7663. "type": "array",
  7664. "items": {
  7665. "type": "string"
  7666. },
  7667. "x-go-name": "Events"
  7668. },
  7669. "type": {
  7670. "type": "string",
  7671. "enum": [
  7672. "gitea",
  7673. "gogs",
  7674. "slack",
  7675. "discord"
  7676. ],
  7677. "x-go-name": "Type"
  7678. }
  7679. },
  7680. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7681. },
  7682. "CreateIssueCommentOption": {
  7683. "description": "CreateIssueCommentOption options for creating a comment on an issue",
  7684. "type": "object",
  7685. "required": [
  7686. "body"
  7687. ],
  7688. "properties": {
  7689. "body": {
  7690. "type": "string",
  7691. "x-go-name": "Body"
  7692. }
  7693. },
  7694. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7695. },
  7696. "CreateIssueOption": {
  7697. "description": "CreateIssueOption options to create one issue",
  7698. "type": "object",
  7699. "required": [
  7700. "title"
  7701. ],
  7702. "properties": {
  7703. "assignee": {
  7704. "description": "username of assignee",
  7705. "type": "string",
  7706. "x-go-name": "Assignee"
  7707. },
  7708. "assignees": {
  7709. "type": "array",
  7710. "items": {
  7711. "type": "string"
  7712. },
  7713. "x-go-name": "Assignees"
  7714. },
  7715. "body": {
  7716. "type": "string",
  7717. "x-go-name": "Body"
  7718. },
  7719. "closed": {
  7720. "type": "boolean",
  7721. "x-go-name": "Closed"
  7722. },
  7723. "due_date": {
  7724. "type": "string",
  7725. "format": "date-time",
  7726. "x-go-name": "Deadline"
  7727. },
  7728. "labels": {
  7729. "description": "list of label ids",
  7730. "type": "array",
  7731. "items": {
  7732. "type": "integer",
  7733. "format": "int64"
  7734. },
  7735. "x-go-name": "Labels"
  7736. },
  7737. "milestone": {
  7738. "description": "milestone id",
  7739. "type": "integer",
  7740. "format": "int64",
  7741. "x-go-name": "Milestone"
  7742. },
  7743. "title": {
  7744. "type": "string",
  7745. "x-go-name": "Title"
  7746. }
  7747. },
  7748. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7749. },
  7750. "CreateKeyOption": {
  7751. "description": "CreateKeyOption options when creating a key",
  7752. "type": "object",
  7753. "required": [
  7754. "title",
  7755. "key"
  7756. ],
  7757. "properties": {
  7758. "key": {
  7759. "description": "An armored SSH key to add",
  7760. "type": "string",
  7761. "uniqueItems": true,
  7762. "x-go-name": "Key"
  7763. },
  7764. "read_only": {
  7765. "description": "Describe if the key has only read access or read/write",
  7766. "type": "boolean",
  7767. "x-go-name": "ReadOnly"
  7768. },
  7769. "title": {
  7770. "description": "Title of the key to add",
  7771. "type": "string",
  7772. "uniqueItems": true,
  7773. "x-go-name": "Title"
  7774. }
  7775. },
  7776. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7777. },
  7778. "CreateLabelOption": {
  7779. "description": "CreateLabelOption options for creating a label",
  7780. "type": "object",
  7781. "required": [
  7782. "name",
  7783. "color"
  7784. ],
  7785. "properties": {
  7786. "color": {
  7787. "type": "string",
  7788. "x-go-name": "Color",
  7789. "example": "#00aabb"
  7790. },
  7791. "description": {
  7792. "type": "string",
  7793. "x-go-name": "Description"
  7794. },
  7795. "name": {
  7796. "type": "string",
  7797. "x-go-name": "Name"
  7798. }
  7799. },
  7800. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7801. },
  7802. "CreateMilestoneOption": {
  7803. "description": "CreateMilestoneOption options for creating a milestone",
  7804. "type": "object",
  7805. "properties": {
  7806. "description": {
  7807. "type": "string",
  7808. "x-go-name": "Description"
  7809. },
  7810. "due_on": {
  7811. "type": "string",
  7812. "format": "date-time",
  7813. "x-go-name": "Deadline"
  7814. },
  7815. "title": {
  7816. "type": "string",
  7817. "x-go-name": "Title"
  7818. }
  7819. },
  7820. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7821. },
  7822. "CreateOrgOption": {
  7823. "description": "CreateOrgOption options for creating an organization",
  7824. "type": "object",
  7825. "required": [
  7826. "username"
  7827. ],
  7828. "properties": {
  7829. "description": {
  7830. "type": "string",
  7831. "x-go-name": "Description"
  7832. },
  7833. "full_name": {
  7834. "type": "string",
  7835. "x-go-name": "FullName"
  7836. },
  7837. "location": {
  7838. "type": "string",
  7839. "x-go-name": "Location"
  7840. },
  7841. "repo_admin_change_team_access": {
  7842. "type": "boolean",
  7843. "x-go-name": "RepoAdminChangeTeamAccess"
  7844. },
  7845. "username": {
  7846. "type": "string",
  7847. "x-go-name": "UserName"
  7848. },
  7849. "visibility": {
  7850. "description": "possible values are `public` (default), `limited` or `private`",
  7851. "type": "string",
  7852. "enum": [
  7853. "public",
  7854. "limited",
  7855. "private"
  7856. ],
  7857. "x-go-name": "Visibility"
  7858. },
  7859. "website": {
  7860. "type": "string",
  7861. "x-go-name": "Website"
  7862. }
  7863. },
  7864. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7865. },
  7866. "CreatePullRequestOption": {
  7867. "description": "CreatePullRequestOption options when creating a pull request",
  7868. "type": "object",
  7869. "properties": {
  7870. "assignee": {
  7871. "type": "string",
  7872. "x-go-name": "Assignee"
  7873. },
  7874. "assignees": {
  7875. "type": "array",
  7876. "items": {
  7877. "type": "string"
  7878. },
  7879. "x-go-name": "Assignees"
  7880. },
  7881. "base": {
  7882. "type": "string",
  7883. "x-go-name": "Base"
  7884. },
  7885. "body": {
  7886. "type": "string",
  7887. "x-go-name": "Body"
  7888. },
  7889. "due_date": {
  7890. "type": "string",
  7891. "format": "date-time",
  7892. "x-go-name": "Deadline"
  7893. },
  7894. "head": {
  7895. "type": "string",
  7896. "x-go-name": "Head"
  7897. },
  7898. "labels": {
  7899. "type": "array",
  7900. "items": {
  7901. "type": "integer",
  7902. "format": "int64"
  7903. },
  7904. "x-go-name": "Labels"
  7905. },
  7906. "milestone": {
  7907. "type": "integer",
  7908. "format": "int64",
  7909. "x-go-name": "Milestone"
  7910. },
  7911. "title": {
  7912. "type": "string",
  7913. "x-go-name": "Title"
  7914. }
  7915. },
  7916. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7917. },
  7918. "CreateReleaseOption": {
  7919. "description": "CreateReleaseOption options when creating a release",
  7920. "type": "object",
  7921. "required": [
  7922. "tag_name"
  7923. ],
  7924. "properties": {
  7925. "body": {
  7926. "type": "string",
  7927. "x-go-name": "Note"
  7928. },
  7929. "draft": {
  7930. "type": "boolean",
  7931. "x-go-name": "IsDraft"
  7932. },
  7933. "name": {
  7934. "type": "string",
  7935. "x-go-name": "Title"
  7936. },
  7937. "prerelease": {
  7938. "type": "boolean",
  7939. "x-go-name": "IsPrerelease"
  7940. },
  7941. "tag_name": {
  7942. "type": "string",
  7943. "x-go-name": "TagName"
  7944. },
  7945. "target_commitish": {
  7946. "type": "string",
  7947. "x-go-name": "Target"
  7948. }
  7949. },
  7950. "x-go-package": "code.gitea.io/gitea/modules/structs"
  7951. },
  7952. "CreateRepoOption": {
  7953. "description": "CreateRepoOption options when creating repository",
  7954. "type": "object",
  7955. "required": [
  7956. "name"
  7957. ],
  7958. "properties": {
  7959. "auto_init": {
  7960. "description": "Whether the repository should be auto-intialized?",
  7961. "type": "boolean",
  7962. "x-go-name": "AutoInit"
  7963. },
  7964. "description": {
  7965. "description": "Description of the repository to create",
  7966. "type": "string",
  7967. "x-go-name": "Description"
  7968. },
  7969. "gitignores": {
  7970. "description": "Gitignores to use",
  7971. "type": "string",
  7972. "x-go-name": "Gitignores"
  7973. },
  7974. "issue_labels": {
  7975. "description": "Issue Label set to use",
  7976. "type": "string",
  7977. "x-go-name": "IssueLabels"
  7978. },
  7979. "license": {
  7980. "description": "License to use",
  7981. "type": "string",
  7982. "x-go-name": "License"
  7983. },
  7984. "name": {
  7985. "description": "Name of the repository to create",
  7986. "type": "string",
  7987. "uniqueItems": true,
  7988. "x-go-name": "Name"
  7989. },
  7990. "private": {
  7991. "description": "Whether the repository is private",
  7992. "type": "boolean",
  7993. "x-go-name": "Private"
  7994. },
  7995. "readme": {
  7996. "description": "Readme of the repository to create",
  7997. "type": "string",
  7998. "x-go-name": "Readme"
  7999. }
  8000. },
  8001. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8002. },
  8003. "CreateStatusOption": {
  8004. "description": "CreateStatusOption holds the information needed to create a new Status for a Commit",
  8005. "type": "object",
  8006. "properties": {
  8007. "context": {
  8008. "type": "string",
  8009. "x-go-name": "Context"
  8010. },
  8011. "description": {
  8012. "type": "string",
  8013. "x-go-name": "Description"
  8014. },
  8015. "state": {
  8016. "$ref": "#/definitions/StatusState"
  8017. },
  8018. "target_url": {
  8019. "type": "string",
  8020. "x-go-name": "TargetURL"
  8021. }
  8022. },
  8023. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8024. },
  8025. "CreateTeamOption": {
  8026. "description": "CreateTeamOption options for creating a team",
  8027. "type": "object",
  8028. "required": [
  8029. "name"
  8030. ],
  8031. "properties": {
  8032. "description": {
  8033. "type": "string",
  8034. "x-go-name": "Description"
  8035. },
  8036. "name": {
  8037. "type": "string",
  8038. "x-go-name": "Name"
  8039. },
  8040. "permission": {
  8041. "type": "string",
  8042. "enum": [
  8043. "read",
  8044. "write",
  8045. "admin"
  8046. ],
  8047. "x-go-name": "Permission"
  8048. },
  8049. "units": {
  8050. "type": "array",
  8051. "items": {
  8052. "type": "string"
  8053. },
  8054. "x-go-name": "Units",
  8055. "example": [
  8056. "repo.code",
  8057. "repo.issues",
  8058. "repo.ext_issues",
  8059. "repo.wiki",
  8060. "repo.pulls",
  8061. "repo.releases",
  8062. "repo.ext_wiki"
  8063. ]
  8064. }
  8065. },
  8066. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8067. },
  8068. "CreateUserOption": {
  8069. "description": "CreateUserOption create user options",
  8070. "type": "object",
  8071. "required": [
  8072. "username",
  8073. "email",
  8074. "password"
  8075. ],
  8076. "properties": {
  8077. "email": {
  8078. "type": "string",
  8079. "format": "email",
  8080. "x-go-name": "Email"
  8081. },
  8082. "full_name": {
  8083. "type": "string",
  8084. "x-go-name": "FullName"
  8085. },
  8086. "login_name": {
  8087. "type": "string",
  8088. "x-go-name": "LoginName"
  8089. },
  8090. "must_change_password": {
  8091. "type": "boolean",
  8092. "x-go-name": "MustChangePassword"
  8093. },
  8094. "password": {
  8095. "type": "string",
  8096. "x-go-name": "Password"
  8097. },
  8098. "send_notify": {
  8099. "type": "boolean",
  8100. "x-go-name": "SendNotify"
  8101. },
  8102. "source_id": {
  8103. "type": "integer",
  8104. "format": "int64",
  8105. "x-go-name": "SourceID"
  8106. },
  8107. "username": {
  8108. "type": "string",
  8109. "x-go-name": "Username"
  8110. }
  8111. },
  8112. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8113. },
  8114. "DeleteEmailOption": {
  8115. "description": "DeleteEmailOption options when deleting email addresses",
  8116. "type": "object",
  8117. "properties": {
  8118. "emails": {
  8119. "description": "email addresses to delete",
  8120. "type": "array",
  8121. "items": {
  8122. "type": "string"
  8123. },
  8124. "x-go-name": "Emails"
  8125. }
  8126. },
  8127. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8128. },
  8129. "DeleteFileOptions": {
  8130. "description": "DeleteFileOptions options for deleting files (used for other File structs below)\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)",
  8131. "type": "object",
  8132. "required": [
  8133. "sha"
  8134. ],
  8135. "properties": {
  8136. "author": {
  8137. "$ref": "#/definitions/Identity"
  8138. },
  8139. "branch": {
  8140. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  8141. "type": "string",
  8142. "x-go-name": "BranchName"
  8143. },
  8144. "committer": {
  8145. "$ref": "#/definitions/Identity"
  8146. },
  8147. "message": {
  8148. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  8149. "type": "string",
  8150. "x-go-name": "Message"
  8151. },
  8152. "new_branch": {
  8153. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  8154. "type": "string",
  8155. "x-go-name": "NewBranchName"
  8156. },
  8157. "sha": {
  8158. "description": "sha is the SHA for the file that already exists",
  8159. "type": "string",
  8160. "x-go-name": "SHA"
  8161. }
  8162. },
  8163. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8164. },
  8165. "DeployKey": {
  8166. "description": "DeployKey a deploy key",
  8167. "type": "object",
  8168. "properties": {
  8169. "created_at": {
  8170. "type": "string",
  8171. "format": "date-time",
  8172. "x-go-name": "Created"
  8173. },
  8174. "fingerprint": {
  8175. "type": "string",
  8176. "x-go-name": "Fingerprint"
  8177. },
  8178. "id": {
  8179. "type": "integer",
  8180. "format": "int64",
  8181. "x-go-name": "ID"
  8182. },
  8183. "key": {
  8184. "type": "string",
  8185. "x-go-name": "Key"
  8186. },
  8187. "key_id": {
  8188. "type": "integer",
  8189. "format": "int64",
  8190. "x-go-name": "KeyID"
  8191. },
  8192. "read_only": {
  8193. "type": "boolean",
  8194. "x-go-name": "ReadOnly"
  8195. },
  8196. "repository": {
  8197. "$ref": "#/definitions/Repository"
  8198. },
  8199. "title": {
  8200. "type": "string",
  8201. "x-go-name": "Title"
  8202. },
  8203. "url": {
  8204. "type": "string",
  8205. "x-go-name": "URL"
  8206. }
  8207. },
  8208. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8209. },
  8210. "EditAttachmentOptions": {
  8211. "description": "EditAttachmentOptions options for editing attachments",
  8212. "type": "object",
  8213. "properties": {
  8214. "name": {
  8215. "type": "string",
  8216. "x-go-name": "Name"
  8217. }
  8218. },
  8219. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8220. },
  8221. "EditDeadlineOption": {
  8222. "description": "EditDeadlineOption options for creating a deadline",
  8223. "type": "object",
  8224. "required": [
  8225. "due_date"
  8226. ],
  8227. "properties": {
  8228. "due_date": {
  8229. "type": "string",
  8230. "format": "date-time",
  8231. "x-go-name": "Deadline"
  8232. }
  8233. },
  8234. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8235. },
  8236. "EditGitHookOption": {
  8237. "description": "EditGitHookOption options when modifying one Git hook",
  8238. "type": "object",
  8239. "properties": {
  8240. "content": {
  8241. "type": "string",
  8242. "x-go-name": "Content"
  8243. }
  8244. },
  8245. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8246. },
  8247. "EditHookOption": {
  8248. "description": "EditHookOption options when modify one hook",
  8249. "type": "object",
  8250. "properties": {
  8251. "active": {
  8252. "type": "boolean",
  8253. "x-go-name": "Active"
  8254. },
  8255. "branch_filter": {
  8256. "type": "string",
  8257. "x-go-name": "BranchFilter"
  8258. },
  8259. "config": {
  8260. "type": "object",
  8261. "additionalProperties": {
  8262. "type": "string"
  8263. },
  8264. "x-go-name": "Config"
  8265. },
  8266. "events": {
  8267. "type": "array",
  8268. "items": {
  8269. "type": "string"
  8270. },
  8271. "x-go-name": "Events"
  8272. }
  8273. },
  8274. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8275. },
  8276. "EditIssueCommentOption": {
  8277. "description": "EditIssueCommentOption options for editing a comment",
  8278. "type": "object",
  8279. "required": [
  8280. "body"
  8281. ],
  8282. "properties": {
  8283. "body": {
  8284. "type": "string",
  8285. "x-go-name": "Body"
  8286. }
  8287. },
  8288. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8289. },
  8290. "EditIssueOption": {
  8291. "description": "EditIssueOption options for editing an issue",
  8292. "type": "object",
  8293. "properties": {
  8294. "assignee": {
  8295. "type": "string",
  8296. "x-go-name": "Assignee"
  8297. },
  8298. "assignees": {
  8299. "type": "array",
  8300. "items": {
  8301. "type": "string"
  8302. },
  8303. "x-go-name": "Assignees"
  8304. },
  8305. "body": {
  8306. "type": "string",
  8307. "x-go-name": "Body"
  8308. },
  8309. "due_date": {
  8310. "type": "string",
  8311. "format": "date-time",
  8312. "x-go-name": "Deadline"
  8313. },
  8314. "milestone": {
  8315. "type": "integer",
  8316. "format": "int64",
  8317. "x-go-name": "Milestone"
  8318. },
  8319. "state": {
  8320. "type": "string",
  8321. "x-go-name": "State"
  8322. },
  8323. "title": {
  8324. "type": "string",
  8325. "x-go-name": "Title"
  8326. }
  8327. },
  8328. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8329. },
  8330. "EditLabelOption": {
  8331. "description": "EditLabelOption options for editing a label",
  8332. "type": "object",
  8333. "properties": {
  8334. "color": {
  8335. "type": "string",
  8336. "x-go-name": "Color"
  8337. },
  8338. "description": {
  8339. "type": "string",
  8340. "x-go-name": "Description"
  8341. },
  8342. "name": {
  8343. "type": "string",
  8344. "x-go-name": "Name"
  8345. }
  8346. },
  8347. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8348. },
  8349. "EditMilestoneOption": {
  8350. "description": "EditMilestoneOption options for editing a milestone",
  8351. "type": "object",
  8352. "properties": {
  8353. "description": {
  8354. "type": "string",
  8355. "x-go-name": "Description"
  8356. },
  8357. "due_on": {
  8358. "type": "string",
  8359. "format": "date-time",
  8360. "x-go-name": "Deadline"
  8361. },
  8362. "state": {
  8363. "type": "string",
  8364. "x-go-name": "State"
  8365. },
  8366. "title": {
  8367. "type": "string",
  8368. "x-go-name": "Title"
  8369. }
  8370. },
  8371. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8372. },
  8373. "EditOrgOption": {
  8374. "description": "EditOrgOption options for editing an organization",
  8375. "type": "object",
  8376. "properties": {
  8377. "description": {
  8378. "type": "string",
  8379. "x-go-name": "Description"
  8380. },
  8381. "full_name": {
  8382. "type": "string",
  8383. "x-go-name": "FullName"
  8384. },
  8385. "location": {
  8386. "type": "string",
  8387. "x-go-name": "Location"
  8388. },
  8389. "repo_admin_change_team_access": {
  8390. "type": "boolean",
  8391. "x-go-name": "RepoAdminChangeTeamAccess"
  8392. },
  8393. "visibility": {
  8394. "description": "possible values are `public`, `limited` or `private`",
  8395. "type": "string",
  8396. "enum": [
  8397. "public",
  8398. "limited",
  8399. "private"
  8400. ],
  8401. "x-go-name": "Visibility"
  8402. },
  8403. "website": {
  8404. "type": "string",
  8405. "x-go-name": "Website"
  8406. }
  8407. },
  8408. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8409. },
  8410. "EditPullRequestOption": {
  8411. "description": "EditPullRequestOption options when modify pull request",
  8412. "type": "object",
  8413. "properties": {
  8414. "assignee": {
  8415. "type": "string",
  8416. "x-go-name": "Assignee"
  8417. },
  8418. "assignees": {
  8419. "type": "array",
  8420. "items": {
  8421. "type": "string"
  8422. },
  8423. "x-go-name": "Assignees"
  8424. },
  8425. "body": {
  8426. "type": "string",
  8427. "x-go-name": "Body"
  8428. },
  8429. "due_date": {
  8430. "type": "string",
  8431. "format": "date-time",
  8432. "x-go-name": "Deadline"
  8433. },
  8434. "labels": {
  8435. "type": "array",
  8436. "items": {
  8437. "type": "integer",
  8438. "format": "int64"
  8439. },
  8440. "x-go-name": "Labels"
  8441. },
  8442. "milestone": {
  8443. "type": "integer",
  8444. "format": "int64",
  8445. "x-go-name": "Milestone"
  8446. },
  8447. "state": {
  8448. "type": "string",
  8449. "x-go-name": "State"
  8450. },
  8451. "title": {
  8452. "type": "string",
  8453. "x-go-name": "Title"
  8454. }
  8455. },
  8456. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8457. },
  8458. "EditReleaseOption": {
  8459. "description": "EditReleaseOption options when editing a release",
  8460. "type": "object",
  8461. "properties": {
  8462. "body": {
  8463. "type": "string",
  8464. "x-go-name": "Note"
  8465. },
  8466. "draft": {
  8467. "type": "boolean",
  8468. "x-go-name": "IsDraft"
  8469. },
  8470. "name": {
  8471. "type": "string",
  8472. "x-go-name": "Title"
  8473. },
  8474. "prerelease": {
  8475. "type": "boolean",
  8476. "x-go-name": "IsPrerelease"
  8477. },
  8478. "tag_name": {
  8479. "type": "string",
  8480. "x-go-name": "TagName"
  8481. },
  8482. "target_commitish": {
  8483. "type": "string",
  8484. "x-go-name": "Target"
  8485. }
  8486. },
  8487. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8488. },
  8489. "EditRepoOption": {
  8490. "description": "EditRepoOption options when editing a repository's properties",
  8491. "type": "object",
  8492. "properties": {
  8493. "allow_merge_commits": {
  8494. "description": "either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`.",
  8495. "type": "boolean",
  8496. "x-go-name": "AllowMerge"
  8497. },
  8498. "allow_rebase": {
  8499. "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.",
  8500. "type": "boolean",
  8501. "x-go-name": "AllowRebase"
  8502. },
  8503. "allow_rebase_explicit": {
  8504. "description": "either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. `has_pull_requests` must be `true`.",
  8505. "type": "boolean",
  8506. "x-go-name": "AllowRebaseMerge"
  8507. },
  8508. "allow_squash_merge": {
  8509. "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.",
  8510. "type": "boolean",
  8511. "x-go-name": "AllowSquash"
  8512. },
  8513. "archived": {
  8514. "description": "set to `true` to archive this repository.",
  8515. "type": "boolean",
  8516. "x-go-name": "Archived"
  8517. },
  8518. "default_branch": {
  8519. "description": "sets the default branch for this repository.",
  8520. "type": "string",
  8521. "x-go-name": "DefaultBranch"
  8522. },
  8523. "description": {
  8524. "description": "a short description of the repository.",
  8525. "type": "string",
  8526. "x-go-name": "Description"
  8527. },
  8528. "external_tracker": {
  8529. "$ref": "#/definitions/ExternalTracker"
  8530. },
  8531. "external_wiki": {
  8532. "$ref": "#/definitions/ExternalWiki"
  8533. },
  8534. "has_issues": {
  8535. "description": "either `true` to enable issues for this repository or `false` to disable them.",
  8536. "type": "boolean",
  8537. "x-go-name": "HasIssues"
  8538. },
  8539. "has_pull_requests": {
  8540. "description": "either `true` to allow pull requests, or `false` to prevent pull request.",
  8541. "type": "boolean",
  8542. "x-go-name": "HasPullRequests"
  8543. },
  8544. "has_wiki": {
  8545. "description": "either `true` to enable the wiki for this repository or `false` to disable it.",
  8546. "type": "boolean",
  8547. "x-go-name": "HasWiki"
  8548. },
  8549. "ignore_whitespace_conflicts": {
  8550. "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.",
  8551. "type": "boolean",
  8552. "x-go-name": "IgnoreWhitespaceConflicts"
  8553. },
  8554. "internal_tracker": {
  8555. "$ref": "#/definitions/InternalTracker"
  8556. },
  8557. "name": {
  8558. "description": "name of the repository",
  8559. "type": "string",
  8560. "uniqueItems": true,
  8561. "x-go-name": "Name"
  8562. },
  8563. "private": {
  8564. "description": "either `true` to make the repository private or `false` to make it public.\nNote: you will get a 422 error if the organization restricts changing repository visibility to organization\nowners and a non-owner tries to change the value of private.",
  8565. "type": "boolean",
  8566. "x-go-name": "Private"
  8567. },
  8568. "website": {
  8569. "description": "a URL with more information about the repository.",
  8570. "type": "string",
  8571. "x-go-name": "Website"
  8572. }
  8573. },
  8574. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8575. },
  8576. "EditTeamOption": {
  8577. "description": "EditTeamOption options for editing a team",
  8578. "type": "object",
  8579. "required": [
  8580. "name"
  8581. ],
  8582. "properties": {
  8583. "description": {
  8584. "type": "string",
  8585. "x-go-name": "Description"
  8586. },
  8587. "name": {
  8588. "type": "string",
  8589. "x-go-name": "Name"
  8590. },
  8591. "permission": {
  8592. "type": "string",
  8593. "enum": [
  8594. "read",
  8595. "write",
  8596. "admin"
  8597. ],
  8598. "x-go-name": "Permission"
  8599. },
  8600. "units": {
  8601. "type": "array",
  8602. "items": {
  8603. "type": "string"
  8604. },
  8605. "x-go-name": "Units",
  8606. "example": [
  8607. "repo.code",
  8608. "repo.issues",
  8609. "repo.ext_issues",
  8610. "repo.wiki",
  8611. "repo.pulls",
  8612. "repo.releases",
  8613. "repo.ext_wiki"
  8614. ]
  8615. }
  8616. },
  8617. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8618. },
  8619. "EditUserOption": {
  8620. "description": "EditUserOption edit user options",
  8621. "type": "object",
  8622. "required": [
  8623. "email"
  8624. ],
  8625. "properties": {
  8626. "active": {
  8627. "type": "boolean",
  8628. "x-go-name": "Active"
  8629. },
  8630. "admin": {
  8631. "type": "boolean",
  8632. "x-go-name": "Admin"
  8633. },
  8634. "allow_create_organization": {
  8635. "type": "boolean",
  8636. "x-go-name": "AllowCreateOrganization"
  8637. },
  8638. "allow_git_hook": {
  8639. "type": "boolean",
  8640. "x-go-name": "AllowGitHook"
  8641. },
  8642. "allow_import_local": {
  8643. "type": "boolean",
  8644. "x-go-name": "AllowImportLocal"
  8645. },
  8646. "email": {
  8647. "type": "string",
  8648. "format": "email",
  8649. "x-go-name": "Email"
  8650. },
  8651. "full_name": {
  8652. "type": "string",
  8653. "x-go-name": "FullName"
  8654. },
  8655. "location": {
  8656. "type": "string",
  8657. "x-go-name": "Location"
  8658. },
  8659. "login_name": {
  8660. "type": "string",
  8661. "x-go-name": "LoginName"
  8662. },
  8663. "max_repo_creation": {
  8664. "type": "integer",
  8665. "format": "int64",
  8666. "x-go-name": "MaxRepoCreation"
  8667. },
  8668. "must_change_password": {
  8669. "type": "boolean",
  8670. "x-go-name": "MustChangePassword"
  8671. },
  8672. "password": {
  8673. "type": "string",
  8674. "x-go-name": "Password"
  8675. },
  8676. "prohibit_login": {
  8677. "type": "boolean",
  8678. "x-go-name": "ProhibitLogin"
  8679. },
  8680. "source_id": {
  8681. "type": "integer",
  8682. "format": "int64",
  8683. "x-go-name": "SourceID"
  8684. },
  8685. "website": {
  8686. "type": "string",
  8687. "x-go-name": "Website"
  8688. }
  8689. },
  8690. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8691. },
  8692. "Email": {
  8693. "description": "Email an email address belonging to a user",
  8694. "type": "object",
  8695. "properties": {
  8696. "email": {
  8697. "type": "string",
  8698. "format": "email",
  8699. "x-go-name": "Email"
  8700. },
  8701. "primary": {
  8702. "type": "boolean",
  8703. "x-go-name": "Primary"
  8704. },
  8705. "verified": {
  8706. "type": "boolean",
  8707. "x-go-name": "Verified"
  8708. }
  8709. },
  8710. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8711. },
  8712. "ExternalTracker": {
  8713. "description": "ExternalTracker represents settings for external tracker",
  8714. "type": "object",
  8715. "properties": {
  8716. "external_tracker_format": {
  8717. "description": "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.",
  8718. "type": "string",
  8719. "x-go-name": "ExternalTrackerFormat"
  8720. },
  8721. "external_tracker_style": {
  8722. "description": "External Issue Tracker Number Format, either `numeric` or `alphanumeric`",
  8723. "type": "string",
  8724. "x-go-name": "ExternalTrackerStyle"
  8725. },
  8726. "external_tracker_url": {
  8727. "description": "URL of external issue tracker.",
  8728. "type": "string",
  8729. "x-go-name": "ExternalTrackerURL"
  8730. }
  8731. },
  8732. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8733. },
  8734. "ExternalWiki": {
  8735. "description": "ExternalWiki represents setting for external wiki",
  8736. "type": "object",
  8737. "properties": {
  8738. "external_wiki_url": {
  8739. "description": "URL of external wiki.",
  8740. "type": "string",
  8741. "x-go-name": "ExternalWikiURL"
  8742. }
  8743. },
  8744. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8745. },
  8746. "FileCommitResponse": {
  8747. "type": "object",
  8748. "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.",
  8749. "properties": {
  8750. "author": {
  8751. "$ref": "#/definitions/CommitUser"
  8752. },
  8753. "committer": {
  8754. "$ref": "#/definitions/CommitUser"
  8755. },
  8756. "html_url": {
  8757. "type": "string",
  8758. "x-go-name": "HTMLURL"
  8759. },
  8760. "message": {
  8761. "type": "string",
  8762. "x-go-name": "Message"
  8763. },
  8764. "parents": {
  8765. "type": "array",
  8766. "items": {
  8767. "$ref": "#/definitions/CommitMeta"
  8768. },
  8769. "x-go-name": "Parents"
  8770. },
  8771. "sha": {
  8772. "type": "string",
  8773. "x-go-name": "SHA"
  8774. },
  8775. "tree": {
  8776. "$ref": "#/definitions/CommitMeta"
  8777. },
  8778. "url": {
  8779. "type": "string",
  8780. "x-go-name": "URL"
  8781. }
  8782. },
  8783. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8784. },
  8785. "FileDeleteResponse": {
  8786. "description": "FileDeleteResponse contains information about a repo's file that was deleted",
  8787. "type": "object",
  8788. "properties": {
  8789. "commit": {
  8790. "$ref": "#/definitions/FileCommitResponse"
  8791. },
  8792. "content": {
  8793. "type": "object",
  8794. "x-go-name": "Content"
  8795. },
  8796. "verification": {
  8797. "$ref": "#/definitions/PayloadCommitVerification"
  8798. }
  8799. },
  8800. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8801. },
  8802. "FileLinksResponse": {
  8803. "description": "FileLinksResponse contains the links for a repo's file",
  8804. "type": "object",
  8805. "properties": {
  8806. "git": {
  8807. "type": "string",
  8808. "x-go-name": "GitURL"
  8809. },
  8810. "html": {
  8811. "type": "string",
  8812. "x-go-name": "HTMLURL"
  8813. },
  8814. "self": {
  8815. "type": "string",
  8816. "x-go-name": "Self"
  8817. }
  8818. },
  8819. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8820. },
  8821. "FileResponse": {
  8822. "description": "FileResponse contains information about a repo's file",
  8823. "type": "object",
  8824. "properties": {
  8825. "commit": {
  8826. "$ref": "#/definitions/FileCommitResponse"
  8827. },
  8828. "content": {
  8829. "$ref": "#/definitions/ContentsResponse"
  8830. },
  8831. "verification": {
  8832. "$ref": "#/definitions/PayloadCommitVerification"
  8833. }
  8834. },
  8835. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8836. },
  8837. "GPGKey": {
  8838. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  8839. "type": "object",
  8840. "properties": {
  8841. "can_certify": {
  8842. "type": "boolean",
  8843. "x-go-name": "CanCertify"
  8844. },
  8845. "can_encrypt_comms": {
  8846. "type": "boolean",
  8847. "x-go-name": "CanEncryptComms"
  8848. },
  8849. "can_encrypt_storage": {
  8850. "type": "boolean",
  8851. "x-go-name": "CanEncryptStorage"
  8852. },
  8853. "can_sign": {
  8854. "type": "boolean",
  8855. "x-go-name": "CanSign"
  8856. },
  8857. "created_at": {
  8858. "type": "string",
  8859. "format": "date-time",
  8860. "x-go-name": "Created"
  8861. },
  8862. "emails": {
  8863. "type": "array",
  8864. "items": {
  8865. "$ref": "#/definitions/GPGKeyEmail"
  8866. },
  8867. "x-go-name": "Emails"
  8868. },
  8869. "expires_at": {
  8870. "type": "string",
  8871. "format": "date-time",
  8872. "x-go-name": "Expires"
  8873. },
  8874. "id": {
  8875. "type": "integer",
  8876. "format": "int64",
  8877. "x-go-name": "ID"
  8878. },
  8879. "key_id": {
  8880. "type": "string",
  8881. "x-go-name": "KeyID"
  8882. },
  8883. "primary_key_id": {
  8884. "type": "string",
  8885. "x-go-name": "PrimaryKeyID"
  8886. },
  8887. "public_key": {
  8888. "type": "string",
  8889. "x-go-name": "PublicKey"
  8890. },
  8891. "subkeys": {
  8892. "type": "array",
  8893. "items": {
  8894. "$ref": "#/definitions/GPGKey"
  8895. },
  8896. "x-go-name": "SubsKey"
  8897. }
  8898. },
  8899. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8900. },
  8901. "GPGKeyEmail": {
  8902. "description": "GPGKeyEmail an email attached to a GPGKey",
  8903. "type": "object",
  8904. "properties": {
  8905. "email": {
  8906. "type": "string",
  8907. "x-go-name": "Email"
  8908. },
  8909. "verified": {
  8910. "type": "boolean",
  8911. "x-go-name": "Verified"
  8912. }
  8913. },
  8914. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8915. },
  8916. "GitBlobResponse": {
  8917. "description": "GitBlobResponse represents a git blob",
  8918. "type": "object",
  8919. "properties": {
  8920. "content": {
  8921. "type": "string",
  8922. "x-go-name": "Content"
  8923. },
  8924. "encoding": {
  8925. "type": "string",
  8926. "x-go-name": "Encoding"
  8927. },
  8928. "sha": {
  8929. "type": "string",
  8930. "x-go-name": "SHA"
  8931. },
  8932. "size": {
  8933. "type": "integer",
  8934. "format": "int64",
  8935. "x-go-name": "Size"
  8936. },
  8937. "url": {
  8938. "type": "string",
  8939. "x-go-name": "URL"
  8940. }
  8941. },
  8942. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8943. },
  8944. "GitEntry": {
  8945. "description": "GitEntry represents a git tree",
  8946. "type": "object",
  8947. "properties": {
  8948. "mode": {
  8949. "type": "string",
  8950. "x-go-name": "Mode"
  8951. },
  8952. "path": {
  8953. "type": "string",
  8954. "x-go-name": "Path"
  8955. },
  8956. "sha": {
  8957. "type": "string",
  8958. "x-go-name": "SHA"
  8959. },
  8960. "size": {
  8961. "type": "integer",
  8962. "format": "int64",
  8963. "x-go-name": "Size"
  8964. },
  8965. "type": {
  8966. "type": "string",
  8967. "x-go-name": "Type"
  8968. },
  8969. "url": {
  8970. "type": "string",
  8971. "x-go-name": "URL"
  8972. }
  8973. },
  8974. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8975. },
  8976. "GitHook": {
  8977. "description": "GitHook represents a Git repository hook",
  8978. "type": "object",
  8979. "properties": {
  8980. "content": {
  8981. "type": "string",
  8982. "x-go-name": "Content"
  8983. },
  8984. "is_active": {
  8985. "type": "boolean",
  8986. "x-go-name": "IsActive"
  8987. },
  8988. "name": {
  8989. "type": "string",
  8990. "x-go-name": "Name"
  8991. }
  8992. },
  8993. "x-go-package": "code.gitea.io/gitea/modules/structs"
  8994. },
  8995. "GitObject": {
  8996. "type": "object",
  8997. "title": "GitObject represents a Git object.",
  8998. "properties": {
  8999. "sha": {
  9000. "type": "string",
  9001. "x-go-name": "SHA"
  9002. },
  9003. "type": {
  9004. "type": "string",
  9005. "x-go-name": "Type"
  9006. },
  9007. "url": {
  9008. "type": "string",
  9009. "x-go-name": "URL"
  9010. }
  9011. },
  9012. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9013. },
  9014. "GitTreeResponse": {
  9015. "description": "GitTreeResponse returns a git tree",
  9016. "type": "object",
  9017. "properties": {
  9018. "page": {
  9019. "type": "integer",
  9020. "format": "int64",
  9021. "x-go-name": "Page"
  9022. },
  9023. "sha": {
  9024. "type": "string",
  9025. "x-go-name": "SHA"
  9026. },
  9027. "total_count": {
  9028. "type": "integer",
  9029. "format": "int64",
  9030. "x-go-name": "TotalCount"
  9031. },
  9032. "tree": {
  9033. "type": "array",
  9034. "items": {
  9035. "$ref": "#/definitions/GitEntry"
  9036. },
  9037. "x-go-name": "Entries"
  9038. },
  9039. "truncated": {
  9040. "type": "boolean",
  9041. "x-go-name": "Truncated"
  9042. },
  9043. "url": {
  9044. "type": "string",
  9045. "x-go-name": "URL"
  9046. }
  9047. },
  9048. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9049. },
  9050. "Hook": {
  9051. "description": "Hook a hook is a web hook when one repository changed",
  9052. "type": "object",
  9053. "properties": {
  9054. "active": {
  9055. "type": "boolean",
  9056. "x-go-name": "Active"
  9057. },
  9058. "config": {
  9059. "type": "object",
  9060. "additionalProperties": {
  9061. "type": "string"
  9062. },
  9063. "x-go-name": "Config"
  9064. },
  9065. "created_at": {
  9066. "type": "string",
  9067. "format": "date-time",
  9068. "x-go-name": "Created"
  9069. },
  9070. "events": {
  9071. "type": "array",
  9072. "items": {
  9073. "type": "string"
  9074. },
  9075. "x-go-name": "Events"
  9076. },
  9077. "id": {
  9078. "type": "integer",
  9079. "format": "int64",
  9080. "x-go-name": "ID"
  9081. },
  9082. "type": {
  9083. "type": "string",
  9084. "x-go-name": "Type"
  9085. },
  9086. "updated_at": {
  9087. "type": "string",
  9088. "format": "date-time",
  9089. "x-go-name": "Updated"
  9090. }
  9091. },
  9092. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9093. },
  9094. "Identity": {
  9095. "description": "Identity for a person's identity like an author or committer",
  9096. "type": "object",
  9097. "properties": {
  9098. "email": {
  9099. "type": "string",
  9100. "format": "email",
  9101. "x-go-name": "Email"
  9102. },
  9103. "name": {
  9104. "type": "string",
  9105. "x-go-name": "Name"
  9106. }
  9107. },
  9108. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9109. },
  9110. "InternalTracker": {
  9111. "description": "InternalTracker represents settings for internal tracker",
  9112. "type": "object",
  9113. "properties": {
  9114. "allow_only_contributors_to_track_time": {
  9115. "description": "Let only contributors track time (Built-in issue tracker)",
  9116. "type": "boolean",
  9117. "x-go-name": "AllowOnlyContributorsToTrackTime"
  9118. },
  9119. "enable_issue_dependencies": {
  9120. "description": "Enable dependencies for issues and pull requests (Built-in issue tracker)",
  9121. "type": "boolean",
  9122. "x-go-name": "EnableIssueDependencies"
  9123. },
  9124. "enable_time_tracker": {
  9125. "description": "Enable time tracking (Built-in issue tracker)",
  9126. "type": "boolean",
  9127. "x-go-name": "EnableTimeTracker"
  9128. }
  9129. },
  9130. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9131. },
  9132. "Issue": {
  9133. "description": "Issue represents an issue in a repository",
  9134. "type": "object",
  9135. "properties": {
  9136. "assignee": {
  9137. "$ref": "#/definitions/User"
  9138. },
  9139. "assignees": {
  9140. "type": "array",
  9141. "items": {
  9142. "$ref": "#/definitions/User"
  9143. },
  9144. "x-go-name": "Assignees"
  9145. },
  9146. "body": {
  9147. "type": "string",
  9148. "x-go-name": "Body"
  9149. },
  9150. "closed_at": {
  9151. "type": "string",
  9152. "format": "date-time",
  9153. "x-go-name": "Closed"
  9154. },
  9155. "comments": {
  9156. "type": "integer",
  9157. "format": "int64",
  9158. "x-go-name": "Comments"
  9159. },
  9160. "created_at": {
  9161. "type": "string",
  9162. "format": "date-time",
  9163. "x-go-name": "Created"
  9164. },
  9165. "due_date": {
  9166. "type": "string",
  9167. "format": "date-time",
  9168. "x-go-name": "Deadline"
  9169. },
  9170. "id": {
  9171. "type": "integer",
  9172. "format": "int64",
  9173. "x-go-name": "ID"
  9174. },
  9175. "labels": {
  9176. "type": "array",
  9177. "items": {
  9178. "$ref": "#/definitions/Label"
  9179. },
  9180. "x-go-name": "Labels"
  9181. },
  9182. "milestone": {
  9183. "$ref": "#/definitions/Milestone"
  9184. },
  9185. "number": {
  9186. "type": "integer",
  9187. "format": "int64",
  9188. "x-go-name": "Index"
  9189. },
  9190. "original_author": {
  9191. "type": "string",
  9192. "x-go-name": "OriginalAuthor"
  9193. },
  9194. "original_author_id": {
  9195. "type": "integer",
  9196. "format": "int64",
  9197. "x-go-name": "OriginalAuthorID"
  9198. },
  9199. "pull_request": {
  9200. "$ref": "#/definitions/PullRequestMeta"
  9201. },
  9202. "state": {
  9203. "$ref": "#/definitions/StateType"
  9204. },
  9205. "title": {
  9206. "type": "string",
  9207. "x-go-name": "Title"
  9208. },
  9209. "updated_at": {
  9210. "type": "string",
  9211. "format": "date-time",
  9212. "x-go-name": "Updated"
  9213. },
  9214. "url": {
  9215. "type": "string",
  9216. "x-go-name": "URL"
  9217. },
  9218. "user": {
  9219. "$ref": "#/definitions/User"
  9220. }
  9221. },
  9222. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9223. },
  9224. "IssueDeadline": {
  9225. "description": "IssueDeadline represents an issue deadline",
  9226. "type": "object",
  9227. "properties": {
  9228. "due_date": {
  9229. "type": "string",
  9230. "format": "date-time",
  9231. "x-go-name": "Deadline"
  9232. }
  9233. },
  9234. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9235. },
  9236. "IssueLabelsOption": {
  9237. "description": "IssueLabelsOption a collection of labels",
  9238. "type": "object",
  9239. "properties": {
  9240. "labels": {
  9241. "description": "list of label IDs",
  9242. "type": "array",
  9243. "items": {
  9244. "type": "integer",
  9245. "format": "int64"
  9246. },
  9247. "x-go-name": "Labels"
  9248. }
  9249. },
  9250. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9251. },
  9252. "Label": {
  9253. "description": "Label a label to an issue or a pr",
  9254. "type": "object",
  9255. "properties": {
  9256. "color": {
  9257. "type": "string",
  9258. "x-go-name": "Color",
  9259. "example": "00aabb"
  9260. },
  9261. "description": {
  9262. "type": "string",
  9263. "x-go-name": "Description"
  9264. },
  9265. "id": {
  9266. "type": "integer",
  9267. "format": "int64",
  9268. "x-go-name": "ID"
  9269. },
  9270. "name": {
  9271. "type": "string",
  9272. "x-go-name": "Name"
  9273. },
  9274. "url": {
  9275. "type": "string",
  9276. "x-go-name": "URL"
  9277. }
  9278. },
  9279. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9280. },
  9281. "MarkdownOption": {
  9282. "description": "MarkdownOption markdown options",
  9283. "type": "object",
  9284. "properties": {
  9285. "Context": {
  9286. "description": "Context to render\n\nin: body",
  9287. "type": "string"
  9288. },
  9289. "Mode": {
  9290. "description": "Mode to render\n\nin: body",
  9291. "type": "string"
  9292. },
  9293. "Text": {
  9294. "description": "Text markdown to render\n\nin: body",
  9295. "type": "string"
  9296. },
  9297. "Wiki": {
  9298. "description": "Is it a wiki page ?\n\nin: body",
  9299. "type": "boolean"
  9300. }
  9301. },
  9302. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9303. },
  9304. "MergePullRequestOption": {
  9305. "description": "MergePullRequestForm form for merging Pull Request",
  9306. "type": "object",
  9307. "required": [
  9308. "Do"
  9309. ],
  9310. "properties": {
  9311. "Do": {
  9312. "type": "string",
  9313. "enum": [
  9314. "merge",
  9315. "rebase",
  9316. "rebase-merge",
  9317. "squash"
  9318. ]
  9319. },
  9320. "MergeMessageField": {
  9321. "type": "string"
  9322. },
  9323. "MergeTitleField": {
  9324. "type": "string"
  9325. }
  9326. },
  9327. "x-go-name": "MergePullRequestForm",
  9328. "x-go-package": "code.gitea.io/gitea/modules/auth"
  9329. },
  9330. "MigrateRepoForm": {
  9331. "description": "MigrateRepoForm form for migrating repository",
  9332. "type": "object",
  9333. "required": [
  9334. "clone_addr",
  9335. "uid",
  9336. "repo_name"
  9337. ],
  9338. "properties": {
  9339. "auth_password": {
  9340. "type": "string",
  9341. "x-go-name": "AuthPassword"
  9342. },
  9343. "auth_username": {
  9344. "type": "string",
  9345. "x-go-name": "AuthUsername"
  9346. },
  9347. "clone_addr": {
  9348. "type": "string",
  9349. "x-go-name": "CloneAddr"
  9350. },
  9351. "description": {
  9352. "type": "string",
  9353. "x-go-name": "Description"
  9354. },
  9355. "issues": {
  9356. "type": "boolean",
  9357. "x-go-name": "Issues"
  9358. },
  9359. "labels": {
  9360. "type": "boolean",
  9361. "x-go-name": "Labels"
  9362. },
  9363. "milestones": {
  9364. "type": "boolean",
  9365. "x-go-name": "Milestones"
  9366. },
  9367. "mirror": {
  9368. "type": "boolean",
  9369. "x-go-name": "Mirror"
  9370. },
  9371. "private": {
  9372. "type": "boolean",
  9373. "x-go-name": "Private"
  9374. },
  9375. "pull_requests": {
  9376. "type": "boolean",
  9377. "x-go-name": "PullRequests"
  9378. },
  9379. "releases": {
  9380. "type": "boolean",
  9381. "x-go-name": "Releases"
  9382. },
  9383. "repo_name": {
  9384. "type": "string",
  9385. "x-go-name": "RepoName"
  9386. },
  9387. "uid": {
  9388. "type": "integer",
  9389. "format": "int64",
  9390. "x-go-name": "UID"
  9391. },
  9392. "wiki": {
  9393. "type": "boolean",
  9394. "x-go-name": "Wiki"
  9395. }
  9396. },
  9397. "x-go-package": "code.gitea.io/gitea/modules/auth"
  9398. },
  9399. "Milestone": {
  9400. "description": "Milestone milestone is a collection of issues on one repository",
  9401. "type": "object",
  9402. "properties": {
  9403. "closed_at": {
  9404. "type": "string",
  9405. "format": "date-time",
  9406. "x-go-name": "Closed"
  9407. },
  9408. "closed_issues": {
  9409. "type": "integer",
  9410. "format": "int64",
  9411. "x-go-name": "ClosedIssues"
  9412. },
  9413. "description": {
  9414. "type": "string",
  9415. "x-go-name": "Description"
  9416. },
  9417. "due_on": {
  9418. "type": "string",
  9419. "format": "date-time",
  9420. "x-go-name": "Deadline"
  9421. },
  9422. "id": {
  9423. "type": "integer",
  9424. "format": "int64",
  9425. "x-go-name": "ID"
  9426. },
  9427. "open_issues": {
  9428. "type": "integer",
  9429. "format": "int64",
  9430. "x-go-name": "OpenIssues"
  9431. },
  9432. "state": {
  9433. "$ref": "#/definitions/StateType"
  9434. },
  9435. "title": {
  9436. "type": "string",
  9437. "x-go-name": "Title"
  9438. }
  9439. },
  9440. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9441. },
  9442. "Organization": {
  9443. "description": "Organization represents an organization",
  9444. "type": "object",
  9445. "properties": {
  9446. "avatar_url": {
  9447. "type": "string",
  9448. "x-go-name": "AvatarURL"
  9449. },
  9450. "description": {
  9451. "type": "string",
  9452. "x-go-name": "Description"
  9453. },
  9454. "full_name": {
  9455. "type": "string",
  9456. "x-go-name": "FullName"
  9457. },
  9458. "id": {
  9459. "type": "integer",
  9460. "format": "int64",
  9461. "x-go-name": "ID"
  9462. },
  9463. "location": {
  9464. "type": "string",
  9465. "x-go-name": "Location"
  9466. },
  9467. "repo_admin_change_team_access": {
  9468. "type": "boolean",
  9469. "x-go-name": "RepoAdminChangeTeamAccess"
  9470. },
  9471. "username": {
  9472. "type": "string",
  9473. "x-go-name": "UserName"
  9474. },
  9475. "visibility": {
  9476. "type": "string",
  9477. "x-go-name": "Visibility"
  9478. },
  9479. "website": {
  9480. "type": "string",
  9481. "x-go-name": "Website"
  9482. }
  9483. },
  9484. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9485. },
  9486. "PRBranchInfo": {
  9487. "description": "PRBranchInfo information about a branch",
  9488. "type": "object",
  9489. "properties": {
  9490. "label": {
  9491. "type": "string",
  9492. "x-go-name": "Name"
  9493. },
  9494. "ref": {
  9495. "type": "string",
  9496. "x-go-name": "Ref"
  9497. },
  9498. "repo": {
  9499. "$ref": "#/definitions/Repository"
  9500. },
  9501. "repo_id": {
  9502. "type": "integer",
  9503. "format": "int64",
  9504. "x-go-name": "RepoID"
  9505. },
  9506. "sha": {
  9507. "type": "string",
  9508. "x-go-name": "Sha"
  9509. }
  9510. },
  9511. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9512. },
  9513. "PayloadCommit": {
  9514. "description": "PayloadCommit represents a commit",
  9515. "type": "object",
  9516. "properties": {
  9517. "added": {
  9518. "type": "array",
  9519. "items": {
  9520. "type": "string"
  9521. },
  9522. "x-go-name": "Added"
  9523. },
  9524. "author": {
  9525. "$ref": "#/definitions/PayloadUser"
  9526. },
  9527. "committer": {
  9528. "$ref": "#/definitions/PayloadUser"
  9529. },
  9530. "id": {
  9531. "description": "sha1 hash of the commit",
  9532. "type": "string",
  9533. "x-go-name": "ID"
  9534. },
  9535. "message": {
  9536. "type": "string",
  9537. "x-go-name": "Message"
  9538. },
  9539. "modified": {
  9540. "type": "array",
  9541. "items": {
  9542. "type": "string"
  9543. },
  9544. "x-go-name": "Modified"
  9545. },
  9546. "removed": {
  9547. "type": "array",
  9548. "items": {
  9549. "type": "string"
  9550. },
  9551. "x-go-name": "Removed"
  9552. },
  9553. "timestamp": {
  9554. "type": "string",
  9555. "format": "date-time",
  9556. "x-go-name": "Timestamp"
  9557. },
  9558. "url": {
  9559. "type": "string",
  9560. "x-go-name": "URL"
  9561. },
  9562. "verification": {
  9563. "$ref": "#/definitions/PayloadCommitVerification"
  9564. }
  9565. },
  9566. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9567. },
  9568. "PayloadCommitVerification": {
  9569. "description": "PayloadCommitVerification represents the GPG verification of a commit",
  9570. "type": "object",
  9571. "properties": {
  9572. "payload": {
  9573. "type": "string",
  9574. "x-go-name": "Payload"
  9575. },
  9576. "reason": {
  9577. "type": "string",
  9578. "x-go-name": "Reason"
  9579. },
  9580. "signature": {
  9581. "type": "string",
  9582. "x-go-name": "Signature"
  9583. },
  9584. "signer": {
  9585. "$ref": "#/definitions/PayloadUser"
  9586. },
  9587. "verified": {
  9588. "type": "boolean",
  9589. "x-go-name": "Verified"
  9590. }
  9591. },
  9592. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9593. },
  9594. "PayloadUser": {
  9595. "description": "PayloadUser represents the author or committer of a commit",
  9596. "type": "object",
  9597. "properties": {
  9598. "email": {
  9599. "type": "string",
  9600. "format": "email",
  9601. "x-go-name": "Email"
  9602. },
  9603. "name": {
  9604. "description": "Full name of the commit author",
  9605. "type": "string",
  9606. "x-go-name": "Name"
  9607. },
  9608. "username": {
  9609. "type": "string",
  9610. "x-go-name": "UserName"
  9611. }
  9612. },
  9613. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9614. },
  9615. "Permission": {
  9616. "description": "Permission represents a set of permissions",
  9617. "type": "object",
  9618. "properties": {
  9619. "admin": {
  9620. "type": "boolean",
  9621. "x-go-name": "Admin"
  9622. },
  9623. "pull": {
  9624. "type": "boolean",
  9625. "x-go-name": "Pull"
  9626. },
  9627. "push": {
  9628. "type": "boolean",
  9629. "x-go-name": "Push"
  9630. }
  9631. },
  9632. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9633. },
  9634. "PublicKey": {
  9635. "description": "PublicKey publickey is a user key to push code to repository",
  9636. "type": "object",
  9637. "properties": {
  9638. "created_at": {
  9639. "type": "string",
  9640. "format": "date-time",
  9641. "x-go-name": "Created"
  9642. },
  9643. "fingerprint": {
  9644. "type": "string",
  9645. "x-go-name": "Fingerprint"
  9646. },
  9647. "id": {
  9648. "type": "integer",
  9649. "format": "int64",
  9650. "x-go-name": "ID"
  9651. },
  9652. "key": {
  9653. "type": "string",
  9654. "x-go-name": "Key"
  9655. },
  9656. "key_type": {
  9657. "type": "string",
  9658. "x-go-name": "KeyType"
  9659. },
  9660. "read_only": {
  9661. "type": "boolean",
  9662. "x-go-name": "ReadOnly"
  9663. },
  9664. "title": {
  9665. "type": "string",
  9666. "x-go-name": "Title"
  9667. },
  9668. "url": {
  9669. "type": "string",
  9670. "x-go-name": "URL"
  9671. },
  9672. "user": {
  9673. "$ref": "#/definitions/User"
  9674. }
  9675. },
  9676. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9677. },
  9678. "PullRequest": {
  9679. "description": "PullRequest represents a pull request",
  9680. "type": "object",
  9681. "properties": {
  9682. "assignee": {
  9683. "$ref": "#/definitions/User"
  9684. },
  9685. "assignees": {
  9686. "type": "array",
  9687. "items": {
  9688. "$ref": "#/definitions/User"
  9689. },
  9690. "x-go-name": "Assignees"
  9691. },
  9692. "base": {
  9693. "$ref": "#/definitions/PRBranchInfo"
  9694. },
  9695. "body": {
  9696. "type": "string",
  9697. "x-go-name": "Body"
  9698. },
  9699. "closed_at": {
  9700. "type": "string",
  9701. "format": "date-time",
  9702. "x-go-name": "Closed"
  9703. },
  9704. "comments": {
  9705. "type": "integer",
  9706. "format": "int64",
  9707. "x-go-name": "Comments"
  9708. },
  9709. "created_at": {
  9710. "type": "string",
  9711. "format": "date-time",
  9712. "x-go-name": "Created"
  9713. },
  9714. "diff_url": {
  9715. "type": "string",
  9716. "x-go-name": "DiffURL"
  9717. },
  9718. "due_date": {
  9719. "type": "string",
  9720. "format": "date-time",
  9721. "x-go-name": "Deadline"
  9722. },
  9723. "head": {
  9724. "$ref": "#/definitions/PRBranchInfo"
  9725. },
  9726. "html_url": {
  9727. "type": "string",
  9728. "x-go-name": "HTMLURL"
  9729. },
  9730. "id": {
  9731. "type": "integer",
  9732. "format": "int64",
  9733. "x-go-name": "ID"
  9734. },
  9735. "labels": {
  9736. "type": "array",
  9737. "items": {
  9738. "$ref": "#/definitions/Label"
  9739. },
  9740. "x-go-name": "Labels"
  9741. },
  9742. "merge_base": {
  9743. "type": "string",
  9744. "x-go-name": "MergeBase"
  9745. },
  9746. "merge_commit_sha": {
  9747. "type": "string",
  9748. "x-go-name": "MergedCommitID"
  9749. },
  9750. "mergeable": {
  9751. "type": "boolean",
  9752. "x-go-name": "Mergeable"
  9753. },
  9754. "merged": {
  9755. "type": "boolean",
  9756. "x-go-name": "HasMerged"
  9757. },
  9758. "merged_at": {
  9759. "type": "string",
  9760. "format": "date-time",
  9761. "x-go-name": "Merged"
  9762. },
  9763. "merged_by": {
  9764. "$ref": "#/definitions/User"
  9765. },
  9766. "milestone": {
  9767. "$ref": "#/definitions/Milestone"
  9768. },
  9769. "number": {
  9770. "type": "integer",
  9771. "format": "int64",
  9772. "x-go-name": "Index"
  9773. },
  9774. "patch_url": {
  9775. "type": "string",
  9776. "x-go-name": "PatchURL"
  9777. },
  9778. "state": {
  9779. "$ref": "#/definitions/StateType"
  9780. },
  9781. "title": {
  9782. "type": "string",
  9783. "x-go-name": "Title"
  9784. },
  9785. "updated_at": {
  9786. "type": "string",
  9787. "format": "date-time",
  9788. "x-go-name": "Updated"
  9789. },
  9790. "url": {
  9791. "type": "string",
  9792. "x-go-name": "URL"
  9793. },
  9794. "user": {
  9795. "$ref": "#/definitions/User"
  9796. }
  9797. },
  9798. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9799. },
  9800. "PullRequestMeta": {
  9801. "description": "PullRequestMeta PR info if an issue is a PR",
  9802. "type": "object",
  9803. "properties": {
  9804. "merged": {
  9805. "type": "boolean",
  9806. "x-go-name": "HasMerged"
  9807. },
  9808. "merged_at": {
  9809. "type": "string",
  9810. "format": "date-time",
  9811. "x-go-name": "Merged"
  9812. }
  9813. },
  9814. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9815. },
  9816. "Reference": {
  9817. "type": "object",
  9818. "title": "Reference represents a Git reference.",
  9819. "properties": {
  9820. "object": {
  9821. "$ref": "#/definitions/GitObject"
  9822. },
  9823. "ref": {
  9824. "type": "string",
  9825. "x-go-name": "Ref"
  9826. },
  9827. "url": {
  9828. "type": "string",
  9829. "x-go-name": "URL"
  9830. }
  9831. },
  9832. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9833. },
  9834. "Release": {
  9835. "description": "Release represents a repository release",
  9836. "type": "object",
  9837. "properties": {
  9838. "assets": {
  9839. "type": "array",
  9840. "items": {
  9841. "$ref": "#/definitions/Attachment"
  9842. },
  9843. "x-go-name": "Attachments"
  9844. },
  9845. "author": {
  9846. "$ref": "#/definitions/User"
  9847. },
  9848. "body": {
  9849. "type": "string",
  9850. "x-go-name": "Note"
  9851. },
  9852. "created_at": {
  9853. "type": "string",
  9854. "format": "date-time",
  9855. "x-go-name": "CreatedAt"
  9856. },
  9857. "draft": {
  9858. "type": "boolean",
  9859. "x-go-name": "IsDraft"
  9860. },
  9861. "id": {
  9862. "type": "integer",
  9863. "format": "int64",
  9864. "x-go-name": "ID"
  9865. },
  9866. "name": {
  9867. "type": "string",
  9868. "x-go-name": "Title"
  9869. },
  9870. "prerelease": {
  9871. "type": "boolean",
  9872. "x-go-name": "IsPrerelease"
  9873. },
  9874. "published_at": {
  9875. "type": "string",
  9876. "format": "date-time",
  9877. "x-go-name": "PublishedAt"
  9878. },
  9879. "tag_name": {
  9880. "type": "string",
  9881. "x-go-name": "TagName"
  9882. },
  9883. "tarball_url": {
  9884. "type": "string",
  9885. "x-go-name": "TarURL"
  9886. },
  9887. "target_commitish": {
  9888. "type": "string",
  9889. "x-go-name": "Target"
  9890. },
  9891. "url": {
  9892. "type": "string",
  9893. "x-go-name": "URL"
  9894. },
  9895. "zipball_url": {
  9896. "type": "string",
  9897. "x-go-name": "ZipURL"
  9898. }
  9899. },
  9900. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9901. },
  9902. "RepoCommit": {
  9903. "type": "object",
  9904. "title": "RepoCommit contains information of a commit in the context of a repository.",
  9905. "properties": {
  9906. "author": {
  9907. "$ref": "#/definitions/CommitUser"
  9908. },
  9909. "committer": {
  9910. "$ref": "#/definitions/CommitUser"
  9911. },
  9912. "message": {
  9913. "type": "string",
  9914. "x-go-name": "Message"
  9915. },
  9916. "tree": {
  9917. "$ref": "#/definitions/CommitMeta"
  9918. },
  9919. "url": {
  9920. "type": "string",
  9921. "x-go-name": "URL"
  9922. }
  9923. },
  9924. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9925. },
  9926. "RepoTopicOptions": {
  9927. "description": "RepoTopicOptions a collection of repo topic names",
  9928. "type": "object",
  9929. "properties": {
  9930. "topics": {
  9931. "description": "list of topic names",
  9932. "type": "array",
  9933. "items": {
  9934. "type": "string"
  9935. },
  9936. "x-go-name": "Topics"
  9937. }
  9938. },
  9939. "x-go-package": "code.gitea.io/gitea/modules/structs"
  9940. },
  9941. "Repository": {
  9942. "description": "Repository represents a repository",
  9943. "type": "object",
  9944. "properties": {
  9945. "allow_merge_commits": {
  9946. "type": "boolean",
  9947. "x-go-name": "AllowMerge"
  9948. },
  9949. "allow_rebase": {
  9950. "type": "boolean",
  9951. "x-go-name": "AllowRebase"
  9952. },
  9953. "allow_rebase_explicit": {
  9954. "type": "boolean",
  9955. "x-go-name": "AllowRebaseMerge"
  9956. },
  9957. "allow_squash_merge": {
  9958. "type": "boolean",
  9959. "x-go-name": "AllowSquash"
  9960. },
  9961. "archived": {
  9962. "type": "boolean",
  9963. "x-go-name": "Archived"
  9964. },
  9965. "avatar_url": {
  9966. "type": "string",
  9967. "x-go-name": "AvatarURL"
  9968. },
  9969. "clone_url": {
  9970. "type": "string",
  9971. "x-go-name": "CloneURL"
  9972. },
  9973. "created_at": {
  9974. "type": "string",
  9975. "format": "date-time",
  9976. "x-go-name": "Created"
  9977. },
  9978. "default_branch": {
  9979. "type": "string",
  9980. "x-go-name": "DefaultBranch"
  9981. },
  9982. "description": {
  9983. "type": "string",
  9984. "x-go-name": "Description"
  9985. },
  9986. "empty": {
  9987. "type": "boolean",
  9988. "x-go-name": "Empty"
  9989. },
  9990. "external_tracker": {
  9991. "$ref": "#/definitions/ExternalTracker"
  9992. },
  9993. "external_wiki": {
  9994. "$ref": "#/definitions/ExternalWiki"
  9995. },
  9996. "fork": {
  9997. "type": "boolean",
  9998. "x-go-name": "Fork"
  9999. },
  10000. "forks_count": {
  10001. "type": "integer",
  10002. "format": "int64",
  10003. "x-go-name": "Forks"
  10004. },
  10005. "full_name": {
  10006. "type": "string",
  10007. "x-go-name": "FullName"
  10008. },
  10009. "has_issues": {
  10010. "type": "boolean",
  10011. "x-go-name": "HasIssues"
  10012. },
  10013. "has_pull_requests": {
  10014. "type": "boolean",
  10015. "x-go-name": "HasPullRequests"
  10016. },
  10017. "has_wiki": {
  10018. "type": "boolean",
  10019. "x-go-name": "HasWiki"
  10020. },
  10021. "html_url": {
  10022. "type": "string",
  10023. "x-go-name": "HTMLURL"
  10024. },
  10025. "id": {
  10026. "type": "integer",
  10027. "format": "int64",
  10028. "x-go-name": "ID"
  10029. },
  10030. "ignore_whitespace_conflicts": {
  10031. "type": "boolean",
  10032. "x-go-name": "IgnoreWhitespaceConflicts"
  10033. },
  10034. "internal_tracker": {
  10035. "$ref": "#/definitions/InternalTracker"
  10036. },
  10037. "mirror": {
  10038. "type": "boolean",
  10039. "x-go-name": "Mirror"
  10040. },
  10041. "name": {
  10042. "type": "string",
  10043. "x-go-name": "Name"
  10044. },
  10045. "open_issues_count": {
  10046. "type": "integer",
  10047. "format": "int64",
  10048. "x-go-name": "OpenIssues"
  10049. },
  10050. "original_url": {
  10051. "type": "string",
  10052. "x-go-name": "OriginalURL"
  10053. },
  10054. "owner": {
  10055. "$ref": "#/definitions/User"
  10056. },
  10057. "parent": {
  10058. "$ref": "#/definitions/Repository"
  10059. },
  10060. "permissions": {
  10061. "$ref": "#/definitions/Permission"
  10062. },
  10063. "private": {
  10064. "type": "boolean",
  10065. "x-go-name": "Private"
  10066. },
  10067. "size": {
  10068. "type": "integer",
  10069. "format": "int64",
  10070. "x-go-name": "Size"
  10071. },
  10072. "ssh_url": {
  10073. "type": "string",
  10074. "x-go-name": "SSHURL"
  10075. },
  10076. "stars_count": {
  10077. "type": "integer",
  10078. "format": "int64",
  10079. "x-go-name": "Stars"
  10080. },
  10081. "updated_at": {
  10082. "type": "string",
  10083. "format": "date-time",
  10084. "x-go-name": "Updated"
  10085. },
  10086. "watchers_count": {
  10087. "type": "integer",
  10088. "format": "int64",
  10089. "x-go-name": "Watchers"
  10090. },
  10091. "website": {
  10092. "type": "string",
  10093. "x-go-name": "Website"
  10094. }
  10095. },
  10096. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10097. },
  10098. "SearchResults": {
  10099. "description": "SearchResults results of a successful search",
  10100. "type": "object",
  10101. "properties": {
  10102. "data": {
  10103. "type": "array",
  10104. "items": {
  10105. "$ref": "#/definitions/Repository"
  10106. },
  10107. "x-go-name": "Data"
  10108. },
  10109. "ok": {
  10110. "type": "boolean",
  10111. "x-go-name": "OK"
  10112. }
  10113. },
  10114. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10115. },
  10116. "ServerVersion": {
  10117. "description": "ServerVersion wraps the version of the server",
  10118. "type": "object",
  10119. "properties": {
  10120. "version": {
  10121. "type": "string",
  10122. "x-go-name": "Version"
  10123. }
  10124. },
  10125. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10126. },
  10127. "StateType": {
  10128. "description": "StateType issue state type",
  10129. "type": "string",
  10130. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10131. },
  10132. "Status": {
  10133. "description": "Status holds a single Status of a single Commit",
  10134. "type": "object",
  10135. "properties": {
  10136. "context": {
  10137. "type": "string",
  10138. "x-go-name": "Context"
  10139. },
  10140. "created_at": {
  10141. "type": "string",
  10142. "format": "date-time",
  10143. "x-go-name": "Created"
  10144. },
  10145. "creator": {
  10146. "$ref": "#/definitions/User"
  10147. },
  10148. "description": {
  10149. "type": "string",
  10150. "x-go-name": "Description"
  10151. },
  10152. "id": {
  10153. "type": "integer",
  10154. "format": "int64",
  10155. "x-go-name": "ID"
  10156. },
  10157. "status": {
  10158. "$ref": "#/definitions/StatusState"
  10159. },
  10160. "target_url": {
  10161. "type": "string",
  10162. "x-go-name": "TargetURL"
  10163. },
  10164. "updated_at": {
  10165. "type": "string",
  10166. "format": "date-time",
  10167. "x-go-name": "Updated"
  10168. },
  10169. "url": {
  10170. "type": "string",
  10171. "x-go-name": "URL"
  10172. }
  10173. },
  10174. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10175. },
  10176. "StatusState": {
  10177. "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"",
  10178. "type": "string",
  10179. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10180. },
  10181. "Tag": {
  10182. "description": "Tag represents a repository tag",
  10183. "type": "object",
  10184. "properties": {
  10185. "commit": {
  10186. "$ref": "#/definitions/CommitMeta"
  10187. },
  10188. "id": {
  10189. "type": "string",
  10190. "x-go-name": "ID"
  10191. },
  10192. "name": {
  10193. "type": "string",
  10194. "x-go-name": "Name"
  10195. },
  10196. "tarball_url": {
  10197. "type": "string",
  10198. "x-go-name": "TarballURL"
  10199. },
  10200. "zipball_url": {
  10201. "type": "string",
  10202. "x-go-name": "ZipballURL"
  10203. }
  10204. },
  10205. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10206. },
  10207. "Team": {
  10208. "description": "Team represents a team in an organization",
  10209. "type": "object",
  10210. "properties": {
  10211. "description": {
  10212. "type": "string",
  10213. "x-go-name": "Description"
  10214. },
  10215. "id": {
  10216. "type": "integer",
  10217. "format": "int64",
  10218. "x-go-name": "ID"
  10219. },
  10220. "name": {
  10221. "type": "string",
  10222. "x-go-name": "Name"
  10223. },
  10224. "organization": {
  10225. "$ref": "#/definitions/Organization"
  10226. },
  10227. "permission": {
  10228. "type": "string",
  10229. "enum": [
  10230. "none",
  10231. "read",
  10232. "write",
  10233. "admin",
  10234. "owner"
  10235. ],
  10236. "x-go-name": "Permission"
  10237. },
  10238. "units": {
  10239. "type": "array",
  10240. "items": {
  10241. "type": "string"
  10242. },
  10243. "x-go-name": "Units",
  10244. "example": [
  10245. "repo.code",
  10246. "repo.issues",
  10247. "repo.ext_issues",
  10248. "repo.wiki",
  10249. "repo.pulls",
  10250. "repo.releases",
  10251. "repo.ext_wiki"
  10252. ]
  10253. }
  10254. },
  10255. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10256. },
  10257. "TimeStamp": {
  10258. "description": "TimeStamp defines a timestamp",
  10259. "type": "integer",
  10260. "format": "int64",
  10261. "x-go-package": "code.gitea.io/gitea/modules/timeutil"
  10262. },
  10263. "TopicName": {
  10264. "description": "TopicName a list of repo topic names",
  10265. "type": "object",
  10266. "properties": {
  10267. "topics": {
  10268. "type": "array",
  10269. "items": {
  10270. "type": "string"
  10271. },
  10272. "x-go-name": "TopicNames"
  10273. }
  10274. },
  10275. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10276. },
  10277. "TopicResponse": {
  10278. "description": "TopicResponse for returning topics",
  10279. "type": "object",
  10280. "properties": {
  10281. "created": {
  10282. "type": "string",
  10283. "format": "date-time",
  10284. "x-go-name": "Created"
  10285. },
  10286. "id": {
  10287. "type": "integer",
  10288. "format": "int64",
  10289. "x-go-name": "ID"
  10290. },
  10291. "repo_count": {
  10292. "type": "integer",
  10293. "format": "int64",
  10294. "x-go-name": "RepoCount"
  10295. },
  10296. "topic_name": {
  10297. "type": "string",
  10298. "x-go-name": "Name"
  10299. },
  10300. "updated": {
  10301. "type": "string",
  10302. "format": "date-time",
  10303. "x-go-name": "Updated"
  10304. }
  10305. },
  10306. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10307. },
  10308. "TrackedTime": {
  10309. "description": "TrackedTime worked time for an issue / pr",
  10310. "type": "object",
  10311. "properties": {
  10312. "created": {
  10313. "type": "string",
  10314. "format": "date-time",
  10315. "x-go-name": "Created"
  10316. },
  10317. "id": {
  10318. "type": "integer",
  10319. "format": "int64",
  10320. "x-go-name": "ID"
  10321. },
  10322. "issue_id": {
  10323. "type": "integer",
  10324. "format": "int64",
  10325. "x-go-name": "IssueID"
  10326. },
  10327. "time": {
  10328. "description": "Time in seconds",
  10329. "type": "integer",
  10330. "format": "int64",
  10331. "x-go-name": "Time"
  10332. },
  10333. "user_id": {
  10334. "type": "integer",
  10335. "format": "int64",
  10336. "x-go-name": "UserID"
  10337. }
  10338. },
  10339. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10340. },
  10341. "UpdateFileOptions": {
  10342. "description": "UpdateFileOptions options for updating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)",
  10343. "type": "object",
  10344. "required": [
  10345. "sha",
  10346. "content"
  10347. ],
  10348. "properties": {
  10349. "author": {
  10350. "$ref": "#/definitions/Identity"
  10351. },
  10352. "branch": {
  10353. "description": "branch (optional) to base this file from. if not given, the default branch is used",
  10354. "type": "string",
  10355. "x-go-name": "BranchName"
  10356. },
  10357. "committer": {
  10358. "$ref": "#/definitions/Identity"
  10359. },
  10360. "content": {
  10361. "description": "content must be base64 encoded",
  10362. "type": "string",
  10363. "x-go-name": "Content"
  10364. },
  10365. "from_path": {
  10366. "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL",
  10367. "type": "string",
  10368. "x-go-name": "FromPath"
  10369. },
  10370. "message": {
  10371. "description": "message (optional) for the commit of this file. if not supplied, a default message will be used",
  10372. "type": "string",
  10373. "x-go-name": "Message"
  10374. },
  10375. "new_branch": {
  10376. "description": "new_branch (optional) will make a new branch from `branch` before creating the file",
  10377. "type": "string",
  10378. "x-go-name": "NewBranchName"
  10379. },
  10380. "sha": {
  10381. "description": "sha is the SHA for the file that already exists",
  10382. "type": "string",
  10383. "x-go-name": "SHA"
  10384. }
  10385. },
  10386. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10387. },
  10388. "User": {
  10389. "description": "User represents a user",
  10390. "type": "object",
  10391. "properties": {
  10392. "avatar_url": {
  10393. "description": "URL to the user's avatar",
  10394. "type": "string",
  10395. "x-go-name": "AvatarURL"
  10396. },
  10397. "created": {
  10398. "type": "string",
  10399. "format": "date-time",
  10400. "x-go-name": "Created"
  10401. },
  10402. "email": {
  10403. "type": "string",
  10404. "format": "email",
  10405. "x-go-name": "Email"
  10406. },
  10407. "full_name": {
  10408. "description": "the user's full name",
  10409. "type": "string",
  10410. "x-go-name": "FullName"
  10411. },
  10412. "id": {
  10413. "description": "the user's id",
  10414. "type": "integer",
  10415. "format": "int64",
  10416. "x-go-name": "ID"
  10417. },
  10418. "is_admin": {
  10419. "description": "Is the user an administrator",
  10420. "type": "boolean",
  10421. "x-go-name": "IsAdmin"
  10422. },
  10423. "language": {
  10424. "description": "User locale",
  10425. "type": "string",
  10426. "x-go-name": "Language"
  10427. },
  10428. "last_login": {
  10429. "type": "string",
  10430. "format": "date-time",
  10431. "x-go-name": "LastLogin"
  10432. },
  10433. "login": {
  10434. "description": "the user's username",
  10435. "type": "string",
  10436. "x-go-name": "UserName"
  10437. }
  10438. },
  10439. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10440. },
  10441. "UserHeatmapData": {
  10442. "description": "UserHeatmapData represents the data needed to create a heatmap",
  10443. "type": "object",
  10444. "properties": {
  10445. "contributions": {
  10446. "type": "integer",
  10447. "format": "int64",
  10448. "x-go-name": "Contributions"
  10449. },
  10450. "timestamp": {
  10451. "$ref": "#/definitions/TimeStamp"
  10452. }
  10453. },
  10454. "x-go-package": "code.gitea.io/gitea/models"
  10455. },
  10456. "WatchInfo": {
  10457. "description": "WatchInfo represents an API watch status of one repository",
  10458. "type": "object",
  10459. "properties": {
  10460. "created_at": {
  10461. "type": "string",
  10462. "format": "date-time",
  10463. "x-go-name": "CreatedAt"
  10464. },
  10465. "ignored": {
  10466. "type": "boolean",
  10467. "x-go-name": "Ignored"
  10468. },
  10469. "reason": {
  10470. "type": "object",
  10471. "x-go-name": "Reason"
  10472. },
  10473. "repository_url": {
  10474. "type": "string",
  10475. "x-go-name": "RepositoryURL"
  10476. },
  10477. "subscribed": {
  10478. "type": "boolean",
  10479. "x-go-name": "Subscribed"
  10480. },
  10481. "url": {
  10482. "type": "string",
  10483. "x-go-name": "URL"
  10484. }
  10485. },
  10486. "x-go-package": "code.gitea.io/gitea/modules/structs"
  10487. }
  10488. },
  10489. "responses": {
  10490. "AccessToken": {
  10491. "description": "AccessToken represents an API access token.",
  10492. "headers": {
  10493. "id": {
  10494. "type": "integer",
  10495. "format": "int64"
  10496. },
  10497. "name": {
  10498. "type": "string"
  10499. },
  10500. "sha1": {
  10501. "type": "string"
  10502. },
  10503. "token_last_eight": {
  10504. "type": "string"
  10505. }
  10506. }
  10507. },
  10508. "AccessTokenList": {
  10509. "description": "AccessTokenList represents a list of API access token.",
  10510. "schema": {
  10511. "type": "array",
  10512. "items": {
  10513. "$ref": "#/definitions/AccessToken"
  10514. }
  10515. }
  10516. },
  10517. "AnnotatedTag": {
  10518. "description": "AnnotatedTag",
  10519. "schema": {
  10520. "$ref": "#/definitions/AnnotatedTag"
  10521. }
  10522. },
  10523. "Attachment": {
  10524. "description": "Attachment",
  10525. "schema": {
  10526. "$ref": "#/definitions/Attachment"
  10527. }
  10528. },
  10529. "AttachmentList": {
  10530. "description": "AttachmentList",
  10531. "schema": {
  10532. "type": "array",
  10533. "items": {
  10534. "$ref": "#/definitions/Attachment"
  10535. }
  10536. }
  10537. },
  10538. "Branch": {
  10539. "description": "Branch",
  10540. "schema": {
  10541. "$ref": "#/definitions/Branch"
  10542. }
  10543. },
  10544. "BranchList": {
  10545. "description": "BranchList",
  10546. "schema": {
  10547. "type": "array",
  10548. "items": {
  10549. "$ref": "#/definitions/Branch"
  10550. }
  10551. }
  10552. },
  10553. "Comment": {
  10554. "description": "Comment",
  10555. "schema": {
  10556. "$ref": "#/definitions/Comment"
  10557. }
  10558. },
  10559. "CommentList": {
  10560. "description": "CommentList",
  10561. "schema": {
  10562. "type": "array",
  10563. "items": {
  10564. "$ref": "#/definitions/Comment"
  10565. }
  10566. }
  10567. },
  10568. "Commit": {
  10569. "description": "Commit",
  10570. "schema": {
  10571. "$ref": "#/definitions/Commit"
  10572. }
  10573. },
  10574. "CommitList": {
  10575. "description": "CommitList",
  10576. "schema": {
  10577. "type": "array",
  10578. "items": {
  10579. "$ref": "#/definitions/Commit"
  10580. }
  10581. },
  10582. "headers": {
  10583. "X-HasMore": {
  10584. "type": "boolean",
  10585. "description": "True if there is another page"
  10586. },
  10587. "X-Page": {
  10588. "type": "integer",
  10589. "format": "int64",
  10590. "description": "The current page"
  10591. },
  10592. "X-PageCount": {
  10593. "type": "integer",
  10594. "format": "int64",
  10595. "description": "Total number of pages"
  10596. },
  10597. "X-PerPage": {
  10598. "type": "integer",
  10599. "format": "int64",
  10600. "description": "Commits per page"
  10601. },
  10602. "X-Total": {
  10603. "type": "integer",
  10604. "format": "int64",
  10605. "description": "Total commit count"
  10606. }
  10607. }
  10608. },
  10609. "ContentsListResponse": {
  10610. "description": "ContentsListResponse",
  10611. "schema": {
  10612. "type": "array",
  10613. "items": {
  10614. "$ref": "#/definitions/ContentsResponse"
  10615. }
  10616. }
  10617. },
  10618. "ContentsResponse": {
  10619. "description": "ContentsResponse",
  10620. "schema": {
  10621. "$ref": "#/definitions/ContentsResponse"
  10622. }
  10623. },
  10624. "DeployKey": {
  10625. "description": "DeployKey",
  10626. "schema": {
  10627. "$ref": "#/definitions/DeployKey"
  10628. }
  10629. },
  10630. "DeployKeyList": {
  10631. "description": "DeployKeyList",
  10632. "schema": {
  10633. "type": "array",
  10634. "items": {
  10635. "$ref": "#/definitions/DeployKey"
  10636. }
  10637. }
  10638. },
  10639. "EmailList": {
  10640. "description": "EmailList",
  10641. "schema": {
  10642. "type": "array",
  10643. "items": {
  10644. "$ref": "#/definitions/Email"
  10645. }
  10646. }
  10647. },
  10648. "EmptyRepository": {
  10649. "description": "EmptyRepository",
  10650. "schema": {
  10651. "$ref": "#/definitions/APIError"
  10652. }
  10653. },
  10654. "FileDeleteResponse": {
  10655. "description": "FileDeleteResponse",
  10656. "schema": {
  10657. "$ref": "#/definitions/FileDeleteResponse"
  10658. }
  10659. },
  10660. "FileResponse": {
  10661. "description": "FileResponse",
  10662. "schema": {
  10663. "$ref": "#/definitions/FileResponse"
  10664. }
  10665. },
  10666. "GPGKey": {
  10667. "description": "GPGKey",
  10668. "schema": {
  10669. "$ref": "#/definitions/GPGKey"
  10670. }
  10671. },
  10672. "GPGKeyList": {
  10673. "description": "GPGKeyList",
  10674. "schema": {
  10675. "type": "array",
  10676. "items": {
  10677. "$ref": "#/definitions/GPGKey"
  10678. }
  10679. }
  10680. },
  10681. "GitBlobResponse": {
  10682. "description": "GitBlobResponse",
  10683. "schema": {
  10684. "$ref": "#/definitions/GitBlobResponse"
  10685. }
  10686. },
  10687. "GitHook": {
  10688. "description": "GitHook",
  10689. "schema": {
  10690. "$ref": "#/definitions/GitHook"
  10691. }
  10692. },
  10693. "GitHookList": {
  10694. "description": "GitHookList",
  10695. "schema": {
  10696. "type": "array",
  10697. "items": {
  10698. "$ref": "#/definitions/GitHook"
  10699. }
  10700. }
  10701. },
  10702. "GitTreeResponse": {
  10703. "description": "GitTreeResponse",
  10704. "schema": {
  10705. "$ref": "#/definitions/GitTreeResponse"
  10706. }
  10707. },
  10708. "Hook": {
  10709. "description": "Hook",
  10710. "schema": {
  10711. "$ref": "#/definitions/Hook"
  10712. }
  10713. },
  10714. "HookList": {
  10715. "description": "HookList",
  10716. "schema": {
  10717. "type": "array",
  10718. "items": {
  10719. "$ref": "#/definitions/Hook"
  10720. }
  10721. }
  10722. },
  10723. "Issue": {
  10724. "description": "Issue",
  10725. "schema": {
  10726. "$ref": "#/definitions/Issue"
  10727. }
  10728. },
  10729. "IssueDeadline": {
  10730. "description": "IssueDeadline",
  10731. "schema": {
  10732. "$ref": "#/definitions/IssueDeadline"
  10733. }
  10734. },
  10735. "IssueList": {
  10736. "description": "IssueList",
  10737. "schema": {
  10738. "type": "array",
  10739. "items": {
  10740. "$ref": "#/definitions/Issue"
  10741. }
  10742. }
  10743. },
  10744. "Label": {
  10745. "description": "Label",
  10746. "schema": {
  10747. "$ref": "#/definitions/Label"
  10748. }
  10749. },
  10750. "LabelList": {
  10751. "description": "LabelList",
  10752. "schema": {
  10753. "type": "array",
  10754. "items": {
  10755. "$ref": "#/definitions/Label"
  10756. }
  10757. }
  10758. },
  10759. "MarkdownRender": {
  10760. "description": "MarkdownRender is a rendered markdown document",
  10761. "schema": {
  10762. "type": "string"
  10763. }
  10764. },
  10765. "Milestone": {
  10766. "description": "Milestone",
  10767. "schema": {
  10768. "$ref": "#/definitions/Milestone"
  10769. }
  10770. },
  10771. "MilestoneList": {
  10772. "description": "MilestoneList",
  10773. "schema": {
  10774. "type": "array",
  10775. "items": {
  10776. "$ref": "#/definitions/Milestone"
  10777. }
  10778. }
  10779. },
  10780. "Organization": {
  10781. "description": "Organization",
  10782. "schema": {
  10783. "$ref": "#/definitions/Organization"
  10784. }
  10785. },
  10786. "OrganizationList": {
  10787. "description": "OrganizationList",
  10788. "schema": {
  10789. "type": "array",
  10790. "items": {
  10791. "$ref": "#/definitions/Organization"
  10792. }
  10793. }
  10794. },
  10795. "PublicKey": {
  10796. "description": "PublicKey",
  10797. "schema": {
  10798. "$ref": "#/definitions/PublicKey"
  10799. }
  10800. },
  10801. "PublicKeyList": {
  10802. "description": "PublicKeyList",
  10803. "schema": {
  10804. "type": "array",
  10805. "items": {
  10806. "$ref": "#/definitions/PublicKey"
  10807. }
  10808. }
  10809. },
  10810. "PullRequest": {
  10811. "description": "PullRequest",
  10812. "schema": {
  10813. "$ref": "#/definitions/PullRequest"
  10814. }
  10815. },
  10816. "PullRequestList": {
  10817. "description": "PullRequestList",
  10818. "schema": {
  10819. "type": "array",
  10820. "items": {
  10821. "$ref": "#/definitions/PullRequest"
  10822. }
  10823. }
  10824. },
  10825. "Reference": {
  10826. "description": "Reference",
  10827. "schema": {
  10828. "$ref": "#/definitions/Reference"
  10829. }
  10830. },
  10831. "ReferenceList": {
  10832. "description": "ReferenceList",
  10833. "schema": {
  10834. "type": "array",
  10835. "items": {
  10836. "$ref": "#/definitions/Reference"
  10837. }
  10838. }
  10839. },
  10840. "Release": {
  10841. "description": "Release",
  10842. "schema": {
  10843. "$ref": "#/definitions/Release"
  10844. }
  10845. },
  10846. "ReleaseList": {
  10847. "description": "ReleaseList",
  10848. "schema": {
  10849. "type": "array",
  10850. "items": {
  10851. "$ref": "#/definitions/Release"
  10852. }
  10853. }
  10854. },
  10855. "Repository": {
  10856. "description": "Repository",
  10857. "schema": {
  10858. "$ref": "#/definitions/Repository"
  10859. }
  10860. },
  10861. "RepositoryList": {
  10862. "description": "RepositoryList",
  10863. "schema": {
  10864. "type": "array",
  10865. "items": {
  10866. "$ref": "#/definitions/Repository"
  10867. }
  10868. }
  10869. },
  10870. "SearchResults": {
  10871. "description": "SearchResults",
  10872. "schema": {
  10873. "$ref": "#/definitions/SearchResults"
  10874. }
  10875. },
  10876. "ServerVersion": {
  10877. "description": "ServerVersion",
  10878. "schema": {
  10879. "$ref": "#/definitions/ServerVersion"
  10880. }
  10881. },
  10882. "Status": {
  10883. "description": "Status",
  10884. "schema": {
  10885. "$ref": "#/definitions/Status"
  10886. }
  10887. },
  10888. "StatusList": {
  10889. "description": "StatusList",
  10890. "schema": {
  10891. "type": "array",
  10892. "items": {
  10893. "$ref": "#/definitions/Status"
  10894. }
  10895. }
  10896. },
  10897. "Tag": {
  10898. "description": "Tag",
  10899. "schema": {
  10900. "$ref": "#/definitions/Tag"
  10901. }
  10902. },
  10903. "TagList": {
  10904. "description": "TagList",
  10905. "schema": {
  10906. "type": "array",
  10907. "items": {
  10908. "$ref": "#/definitions/Tag"
  10909. }
  10910. }
  10911. },
  10912. "Team": {
  10913. "description": "Team",
  10914. "schema": {
  10915. "$ref": "#/definitions/Team"
  10916. }
  10917. },
  10918. "TeamList": {
  10919. "description": "TeamList",
  10920. "schema": {
  10921. "type": "array",
  10922. "items": {
  10923. "$ref": "#/definitions/Team"
  10924. }
  10925. }
  10926. },
  10927. "TopicListResponse": {
  10928. "description": "TopicListResponse",
  10929. "schema": {
  10930. "type": "array",
  10931. "items": {
  10932. "$ref": "#/definitions/TopicResponse"
  10933. }
  10934. }
  10935. },
  10936. "TopicNames": {
  10937. "description": "TopicNames",
  10938. "schema": {
  10939. "$ref": "#/definitions/TopicName"
  10940. }
  10941. },
  10942. "TrackedTime": {
  10943. "description": "TrackedTime",
  10944. "schema": {
  10945. "$ref": "#/definitions/TrackedTime"
  10946. }
  10947. },
  10948. "TrackedTimeList": {
  10949. "description": "TrackedTimeList",
  10950. "schema": {
  10951. "type": "array",
  10952. "items": {
  10953. "$ref": "#/definitions/TrackedTime"
  10954. }
  10955. }
  10956. },
  10957. "User": {
  10958. "description": "User",
  10959. "schema": {
  10960. "$ref": "#/definitions/User"
  10961. }
  10962. },
  10963. "UserHeatmapData": {
  10964. "description": "UserHeatmapData",
  10965. "schema": {
  10966. "type": "array",
  10967. "items": {
  10968. "$ref": "#/definitions/UserHeatmapData"
  10969. }
  10970. }
  10971. },
  10972. "UserList": {
  10973. "description": "UserList",
  10974. "schema": {
  10975. "type": "array",
  10976. "items": {
  10977. "$ref": "#/definitions/User"
  10978. }
  10979. }
  10980. },
  10981. "WatchInfo": {
  10982. "description": "WatchInfo",
  10983. "schema": {
  10984. "$ref": "#/definitions/WatchInfo"
  10985. }
  10986. },
  10987. "empty": {
  10988. "description": "APIEmpty is an empty response"
  10989. },
  10990. "error": {
  10991. "description": "APIError is error format response",
  10992. "headers": {
  10993. "message": {
  10994. "type": "string"
  10995. },
  10996. "url": {
  10997. "type": "string"
  10998. }
  10999. }
  11000. },
  11001. "forbidden": {
  11002. "description": "APIForbiddenError is a forbidden error response",
  11003. "headers": {
  11004. "message": {
  11005. "type": "string"
  11006. },
  11007. "url": {
  11008. "type": "string"
  11009. }
  11010. }
  11011. },
  11012. "notFound": {
  11013. "description": "APINotFound is a not found empty response"
  11014. },
  11015. "parameterBodies": {
  11016. "description": "parameterBodies",
  11017. "schema": {
  11018. "$ref": "#/definitions/RepoTopicOptions"
  11019. }
  11020. },
  11021. "redirect": {
  11022. "description": "APIRedirect is a redirect response"
  11023. },
  11024. "validationError": {
  11025. "description": "APIValidationError is error format response related to input validation",
  11026. "headers": {
  11027. "message": {
  11028. "type": "string"
  11029. },
  11030. "url": {
  11031. "type": "string"
  11032. }
  11033. }
  11034. }
  11035. },
  11036. "securityDefinitions": {
  11037. "AccessToken": {
  11038. "type": "apiKey",
  11039. "name": "access_token",
  11040. "in": "query"
  11041. },
  11042. "AuthorizationHeaderToken": {
  11043. "description": "API tokens must be prepended with \"token\" followed by a space.",
  11044. "type": "apiKey",
  11045. "name": "Authorization",
  11046. "in": "header"
  11047. },
  11048. "BasicAuth": {
  11049. "type": "basic"
  11050. },
  11051. "SudoHeader": {
  11052. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  11053. "type": "apiKey",
  11054. "name": "Sudo",
  11055. "in": "header"
  11056. },
  11057. "SudoParam": {
  11058. "description": "Sudo API request as the user provided as the key. Admin privileges are required.",
  11059. "type": "apiKey",
  11060. "name": "sudo",
  11061. "in": "query"
  11062. },
  11063. "Token": {
  11064. "type": "apiKey",
  11065. "name": "token",
  11066. "in": "query"
  11067. }
  11068. },
  11069. "security": [
  11070. {
  11071. "BasicAuth": []
  11072. },
  11073. {
  11074. "Token": []
  11075. },
  11076. {
  11077. "AccessToken": []
  11078. },
  11079. {
  11080. "AuthorizationHeaderToken": []
  11081. },
  11082. {
  11083. "SudoParam": []
  11084. },
  11085. {
  11086. "SudoHeader": []
  11087. }
  11088. ]
  11089. }
上海开阖软件有限公司 沪ICP备12045867号-1