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

swagger.v1.json 32 kB

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