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

2943 lines
65 KiB

Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
7 years ago
  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. "/admin/users": {
  28. "post": {
  29. "consumes": [
  30. "application/json"
  31. ],
  32. "produces": [
  33. "application/json"
  34. ],
  35. "tags": [
  36. "admin"
  37. ],
  38. "operationId": "adminCreateUser",
  39. "parameters": [
  40. {
  41. "x-go-name": "SourceID",
  42. "name": "source_id",
  43. "in": "body",
  44. "schema": {
  45. "type": "integer",
  46. "format": "int64"
  47. }
  48. },
  49. {
  50. "x-go-name": "LoginName",
  51. "name": "login_name",
  52. "in": "body",
  53. "schema": {
  54. "type": "string"
  55. }
  56. },
  57. {
  58. "x-go-name": "Username",
  59. "name": "username",
  60. "in": "body",
  61. "schema": {
  62. "type": "string"
  63. }
  64. },
  65. {
  66. "x-go-name": "FullName",
  67. "name": "full_name",
  68. "in": "body",
  69. "schema": {
  70. "type": "string"
  71. }
  72. },
  73. {
  74. "x-go-name": "Email",
  75. "name": "email",
  76. "in": "body",
  77. "schema": {
  78. "type": "string"
  79. }
  80. },
  81. {
  82. "x-go-name": "Password",
  83. "name": "password",
  84. "in": "body",
  85. "schema": {
  86. "type": "string"
  87. }
  88. },
  89. {
  90. "x-go-name": "SendNotify",
  91. "name": "send_notify",
  92. "in": "body",
  93. "schema": {
  94. "type": "boolean"
  95. }
  96. }
  97. ],
  98. "responses": {
  99. "201": {
  100. "$ref": "#/responses/User"
  101. },
  102. "403": {
  103. "$ref": "#/responses/forbidden"
  104. },
  105. "422": {
  106. "$ref": "#/responses/validationError"
  107. },
  108. "500": {
  109. "$ref": "#/responses/error"
  110. }
  111. }
  112. }
  113. },
  114. "/admin/users/{username}": {
  115. "delete": {
  116. "produces": [
  117. "application/json"
  118. ],
  119. "tags": [
  120. "admin"
  121. ],
  122. "operationId": "adminDeleteUser",
  123. "responses": {
  124. "204": {
  125. "$ref": "#/responses/empty"
  126. },
  127. "403": {
  128. "$ref": "#/responses/forbidden"
  129. },
  130. "422": {
  131. "$ref": "#/responses/validationError"
  132. },
  133. "500": {
  134. "$ref": "#/responses/error"
  135. }
  136. }
  137. },
  138. "patch": {
  139. "consumes": [
  140. "application/json"
  141. ],
  142. "produces": [
  143. "application/json"
  144. ],
  145. "tags": [
  146. "admin"
  147. ],
  148. "operationId": "adminEditUser",
  149. "parameters": [
  150. {
  151. "x-go-name": "SourceID",
  152. "name": "source_id",
  153. "in": "body",
  154. "schema": {
  155. "type": "integer",
  156. "format": "int64"
  157. }
  158. },
  159. {
  160. "x-go-name": "LoginName",
  161. "name": "login_name",
  162. "in": "body",
  163. "schema": {
  164. "type": "string"
  165. }
  166. },
  167. {
  168. "x-go-name": "FullName",
  169. "name": "full_name",
  170. "in": "body",
  171. "schema": {
  172. "type": "string"
  173. }
  174. },
  175. {
  176. "x-go-name": "Email",
  177. "name": "email",
  178. "in": "body",
  179. "schema": {
  180. "type": "string"
  181. }
  182. },
  183. {
  184. "x-go-name": "Password",
  185. "name": "password",
  186. "in": "body",
  187. "schema": {
  188. "type": "string"
  189. }
  190. },
  191. {
  192. "x-go-name": "Website",
  193. "name": "website",
  194. "in": "body",
  195. "schema": {
  196. "type": "string"
  197. }
  198. },
  199. {
  200. "x-go-name": "Location",
  201. "name": "location",
  202. "in": "body",
  203. "schema": {
  204. "type": "string"
  205. }
  206. },
  207. {
  208. "x-go-name": "Active",
  209. "name": "active",
  210. "in": "body",
  211. "schema": {
  212. "type": "boolean"
  213. }
  214. },
  215. {
  216. "x-go-name": "Admin",
  217. "name": "admin",
  218. "in": "body",
  219. "schema": {
  220. "type": "boolean"
  221. }
  222. },
  223. {
  224. "x-go-name": "AllowGitHook",
  225. "name": "allow_git_hook",
  226. "in": "body",
  227. "schema": {
  228. "type": "boolean"
  229. }
  230. },
  231. {
  232. "x-go-name": "AllowImportLocal",
  233. "name": "allow_import_local",
  234. "in": "body",
  235. "schema": {
  236. "type": "boolean"
  237. }
  238. },
  239. {
  240. "x-go-name": "MaxRepoCreation",
  241. "name": "max_repo_creation",
  242. "in": "body",
  243. "schema": {
  244. "type": "integer",
  245. "format": "int64"
  246. }
  247. }
  248. ],
  249. "responses": {
  250. "200": {
  251. "$ref": "#/responses/User"
  252. },
  253. "403": {
  254. "$ref": "#/responses/forbidden"
  255. },
  256. "422": {
  257. "$ref": "#/responses/validationError"
  258. },
  259. "500": {
  260. "$ref": "#/responses/error"
  261. }
  262. }
  263. }
  264. },
  265. "/admin/users/{username}/keys": {
  266. "post": {
  267. "consumes": [
  268. "application/json"
  269. ],
  270. "produces": [
  271. "application/json"
  272. ],
  273. "tags": [
  274. "admin"
  275. ],
  276. "operationId": "adminCreatePublicKey",
  277. "parameters": [
  278. {
  279. "uniqueItems": true,
  280. "x-go-name": "Title",
  281. "description": "Title of the key to add",
  282. "name": "title",
  283. "in": "body",
  284. "required": true,
  285. "schema": {
  286. "type": "string"
  287. }
  288. },
  289. {
  290. "uniqueItems": true,
  291. "x-go-name": "Key",
  292. "description": "An armored SSH key to add",
  293. "name": "key",
  294. "in": "body",
  295. "required": true,
  296. "schema": {
  297. "type": "string"
  298. }
  299. }
  300. ],
  301. "responses": {
  302. "201": {
  303. "$ref": "#/responses/PublicKey"
  304. },
  305. "403": {
  306. "$ref": "#/responses/forbidden"
  307. },
  308. "422": {
  309. "$ref": "#/responses/validationError"
  310. },
  311. "500": {
  312. "$ref": "#/responses/error"
  313. }
  314. }
  315. }
  316. },
  317. "/admin/users/{username}/orgs": {
  318. "post": {
  319. "consumes": [
  320. "application/json"
  321. ],
  322. "produces": [
  323. "application/json"
  324. ],
  325. "tags": [
  326. "admin"
  327. ],
  328. "operationId": "adminCreateOrg",
  329. "parameters": [
  330. {
  331. "x-go-name": "UserName",
  332. "name": "username",
  333. "in": "body",
  334. "schema": {
  335. "type": "string"
  336. }
  337. },
  338. {
  339. "x-go-name": "FullName",
  340. "name": "full_name",
  341. "in": "body",
  342. "schema": {
  343. "type": "string"
  344. }
  345. },
  346. {
  347. "x-go-name": "Description",
  348. "name": "description",
  349. "in": "body",
  350. "schema": {
  351. "type": "string"
  352. }
  353. },
  354. {
  355. "x-go-name": "Website",
  356. "name": "website",
  357. "in": "body",
  358. "schema": {
  359. "type": "string"
  360. }
  361. },
  362. {
  363. "x-go-name": "Location",
  364. "name": "location",
  365. "in": "body",
  366. "schema": {
  367. "type": "string"
  368. }
  369. }
  370. ],
  371. "responses": {
  372. "201": {
  373. "$ref": "#/responses/Organization"
  374. },
  375. "403": {
  376. "$ref": "#/responses/forbidden"
  377. },
  378. "422": {
  379. "$ref": "#/responses/validationError"
  380. },
  381. "500": {
  382. "$ref": "#/responses/error"
  383. }
  384. }
  385. }
  386. },
  387. "/admin/users/{username}/repos": {
  388. "post": {
  389. "consumes": [
  390. "application/json"
  391. ],
  392. "produces": [
  393. "application/json"
  394. ],
  395. "tags": [
  396. "admin"
  397. ],
  398. "operationId": "adminCreateRepo",
  399. "parameters": [
  400. {
  401. "uniqueItems": true,
  402. "x-go-name": "Name",
  403. "description": "Name of the repository to create",
  404. "name": "name",
  405. "in": "body",
  406. "schema": {
  407. "type": "string"
  408. }
  409. },
  410. {
  411. "x-go-name": "Description",
  412. "description": "Description of the repository to create",
  413. "name": "description",
  414. "in": "body",
  415. "schema": {
  416. "type": "string"
  417. }
  418. },
  419. {
  420. "x-go-name": "Private",
  421. "description": "Is the repository to create private ?",
  422. "name": "private",
  423. "in": "body",
  424. "schema": {
  425. "type": "boolean"
  426. }
  427. },
  428. {
  429. "x-go-name": "AutoInit",
  430. "description": "Init the repository to create ?",
  431. "name": "auto_init",
  432. "in": "body",
  433. "schema": {
  434. "type": "boolean"
  435. }
  436. },
  437. {
  438. "x-go-name": "Gitignores",
  439. "description": "Gitignores to use",
  440. "name": "gitignores",
  441. "in": "body",
  442. "schema": {
  443. "type": "string"
  444. }
  445. },
  446. {
  447. "x-go-name": "License",
  448. "description": "License to use",
  449. "name": "license",
  450. "in": "body",
  451. "schema": {
  452. "type": "string"
  453. }
  454. },
  455. {
  456. "x-go-name": "Readme",
  457. "description": "Readme of the repository to create",
  458. "name": "readme",
  459. "in": "body",
  460. "schema": {
  461. "type": "string"
  462. }
  463. }
  464. ],
  465. "responses": {
  466. "201": {
  467. "$ref": "#/responses/Repository"
  468. },
  469. "403": {
  470. "$ref": "#/responses/forbidden"
  471. },
  472. "422": {
  473. "$ref": "#/responses/validationError"
  474. },
  475. "500": {
  476. "$ref": "#/responses/error"
  477. }
  478. }
  479. }
  480. },
  481. "/markdown": {
  482. "post": {
  483. "consumes": [
  484. "application/json"
  485. ],
  486. "produces": [
  487. "text/html"
  488. ],
  489. "tags": [
  490. "miscellaneous"
  491. ],
  492. "operationId": "renderMarkdown",
  493. "parameters": [
  494. {
  495. "description": "Text markdown to render",
  496. "name": "Text",
  497. "in": "body",
  498. "schema": {
  499. "type": "string"
  500. }
  501. },
  502. {
  503. "description": "Mode to render",
  504. "name": "Mode",
  505. "in": "body",
  506. "schema": {
  507. "type": "string"
  508. }
  509. },
  510. {
  511. "description": "Context to render",
  512. "name": "Context",
  513. "in": "body",
  514. "schema": {
  515. "type": "string"
  516. }
  517. },
  518. {
  519. "description": "Is it a wiki page ?",
  520. "name": "Wiki",
  521. "in": "body",
  522. "schema": {
  523. "type": "boolean"
  524. }
  525. }
  526. ],
  527. "responses": {
  528. "200": {
  529. "$ref": "#/responses/MarkdownRender"
  530. },
  531. "422": {
  532. "$ref": "#/responses/validationError"
  533. }
  534. }
  535. }
  536. },
  537. "/markdown/raw": {
  538. "post": {
  539. "consumes": [
  540. "text/plain"
  541. ],
  542. "produces": [
  543. "text/html"
  544. ],
  545. "tags": [
  546. "miscellaneous"
  547. ],
  548. "operationId": "renderMarkdownRaw",
  549. "responses": {
  550. "200": {
  551. "$ref": "#/responses/MarkdownRender"
  552. },
  553. "422": {
  554. "$ref": "#/responses/validationError"
  555. }
  556. }
  557. }
  558. },
  559. "/org/{org}/repos": {
  560. "post": {
  561. "consumes": [
  562. "application/json"
  563. ],
  564. "produces": [
  565. "application/json"
  566. ],
  567. "tags": [
  568. "organization"
  569. ],
  570. "operationId": "createOrgRepo",
  571. "parameters": [
  572. {
  573. "uniqueItems": true,
  574. "x-go-name": "Name",
  575. "description": "Name of the repository to create",
  576. "name": "name",
  577. "in": "body",
  578. "schema": {
  579. "type": "string"
  580. }
  581. },
  582. {
  583. "x-go-name": "Description",
  584. "description": "Description of the repository to create",
  585. "name": "description",
  586. "in": "body",
  587. "schema": {
  588. "type": "string"
  589. }
  590. },
  591. {
  592. "x-go-name": "Private",
  593. "description": "Is the repository to create private ?",
  594. "name": "private",
  595. "in": "body",
  596. "schema": {
  597. "type": "boolean"
  598. }
  599. },
  600. {
  601. "x-go-name": "AutoInit",
  602. "description": "Init the repository to create ?",
  603. "name": "auto_init",
  604. "in": "body",
  605. "schema": {
  606. "type": "boolean"
  607. }
  608. },
  609. {
  610. "x-go-name": "Gitignores",
  611. "description": "Gitignores to use",
  612. "name": "gitignores",
  613. "in": "body",
  614. "schema": {
  615. "type": "string"
  616. }
  617. },
  618. {
  619. "x-go-name": "License",
  620. "description": "License to use",
  621. "name": "license",
  622. "in": "body",
  623. "schema": {
  624. "type": "string"
  625. }
  626. },
  627. {
  628. "x-go-name": "Readme",
  629. "description": "Readme of the repository to create",
  630. "name": "readme",
  631. "in": "body",
  632. "schema": {
  633. "type": "string"
  634. }
  635. }
  636. ],
  637. "responses": {
  638. "201": {
  639. "$ref": "#/responses/Repository"
  640. },
  641. "403": {
  642. "$ref": "#/responses/forbidden"
  643. },
  644. "422": {
  645. "$ref": "#/responses/validationError"
  646. },
  647. "500": {
  648. "$ref": "#/responses/error"
  649. }
  650. }
  651. }
  652. },
  653. "/orgs/{orgname}/hooks": {
  654. "get": {
  655. "produces": [
  656. "application/json"
  657. ],
  658. "tags": [
  659. "organization"
  660. ],
  661. "operationId": "orgListHooks",
  662. "responses": {
  663. "200": {
  664. "$ref": "#/responses/HookList"
  665. },
  666. "500": {
  667. "$ref": "#/responses/error"
  668. }
  669. }
  670. }
  671. },
  672. "/orgs/{orgname}/hooks/": {
  673. "post": {
  674. "consumes": [
  675. "application/json"
  676. ],
  677. "produces": [
  678. "application/json"
  679. ],
  680. "tags": [
  681. "organization"
  682. ],
  683. "operationId": "orgCreateHook",
  684. "parameters": [
  685. {
  686. "x-go-name": "Type",
  687. "name": "type",
  688. "in": "body",
  689. "schema": {
  690. "type": "string"
  691. }
  692. },
  693. {
  694. "x-go-name": "Config",
  695. "name": "config",
  696. "in": "body",
  697. "schema": {
  698. "type": "object",
  699. "additionalProperties": {
  700. "type": "string"
  701. }
  702. }
  703. },
  704. {
  705. "x-go-name": "Events",
  706. "name": "events",
  707. "in": "body",
  708. "schema": {
  709. "type": "array",
  710. "items": {
  711. "type": "string"
  712. }
  713. }
  714. },
  715. {
  716. "x-go-name": "Active",
  717. "name": "active",
  718. "in": "body",
  719. "schema": {
  720. "type": "boolean"
  721. }
  722. }
  723. ],
  724. "responses": {
  725. "201": {
  726. "$ref": "#/responses/Hook"
  727. },
  728. "422": {
  729. "$ref": "#/responses/validationError"
  730. },
  731. "500": {
  732. "$ref": "#/responses/error"
  733. }
  734. }
  735. }
  736. },
  737. "/orgs/{orgname}/hooks/{id}": {
  738. "get": {
  739. "produces": [
  740. "application/json"
  741. ],
  742. "tags": [
  743. "organization"
  744. ],
  745. "operationId": "orgGetHook",
  746. "responses": {
  747. "200": {
  748. "$ref": "#/responses/Hook"
  749. },
  750. "404": {
  751. "$ref": "#/responses/notFound"
  752. },
  753. "500": {
  754. "$ref": "#/responses/error"
  755. }
  756. }
  757. },
  758. "delete": {
  759. "produces": [
  760. "application/json"
  761. ],
  762. "tags": [
  763. "organization"
  764. ],
  765. "operationId": "orgDeleteHook",
  766. "responses": {
  767. "204": {
  768. "$ref": "#/responses/empty"
  769. },
  770. "404": {
  771. "$ref": "#/responses/notFound"
  772. },
  773. "500": {
  774. "$ref": "#/responses/error"
  775. }
  776. }
  777. },
  778. "patch": {
  779. "consumes": [
  780. "application/json"
  781. ],
  782. "produces": [
  783. "application/json"
  784. ],
  785. "tags": [
  786. "organization"
  787. ],
  788. "operationId": "orgEditHook",
  789. "parameters": [
  790. {
  791. "x-go-name": "Config",
  792. "name": "config",
  793. "in": "body",
  794. "schema": {
  795. "type": "object",
  796. "additionalProperties": {
  797. "type": "string"
  798. }
  799. }
  800. },
  801. {
  802. "x-go-name": "Events",
  803. "name": "events",
  804. "in": "body",
  805. "schema": {
  806. "type": "array",
  807. "items": {
  808. "type": "string"
  809. }
  810. }
  811. },
  812. {
  813. "x-go-name": "Active",
  814. "name": "active",
  815. "in": "body",
  816. "schema": {
  817. "type": "boolean"
  818. }
  819. }
  820. ],
  821. "responses": {
  822. "200": {
  823. "$ref": "#/responses/Hook"
  824. },
  825. "404": {
  826. "$ref": "#/responses/notFound"
  827. },
  828. "422": {
  829. "$ref": "#/responses/validationError"
  830. },
  831. "500": {
  832. "$ref": "#/responses/error"
  833. }
  834. }
  835. }
  836. },
  837. "/orgs/{orgname}/members": {
  838. "get": {
  839. "produces": [
  840. "application/json"
  841. ],
  842. "tags": [
  843. "organization"
  844. ],
  845. "operationId": "orgListMembers",
  846. "responses": {
  847. "200": {
  848. "$ref": "#/responses/UserList"
  849. },
  850. "500": {
  851. "$ref": "#/responses/error"
  852. }
  853. }
  854. }
  855. },
  856. "/orgs/{orgname}/members/{username}": {
  857. "get": {
  858. "produces": [
  859. "application/json"
  860. ],
  861. "tags": [
  862. "organization"
  863. ],
  864. "operationId": "orgIsMember",
  865. "responses": {
  866. "204": {
  867. "$ref": "#/responses/empty"
  868. },
  869. "302": {
  870. "$ref": "#/responses/redirect"
  871. },
  872. "404": {
  873. "$ref": "#/responses/notFound"
  874. }
  875. }
  876. },
  877. "delete": {
  878. "produces": [
  879. "application/json"
  880. ],
  881. "tags": [
  882. "organization"
  883. ],
  884. "operationId": "orgDeleteMember",
  885. "responses": {
  886. "204": {
  887. "$ref": "#/responses/empty"
  888. },
  889. "500": {
  890. "$ref": "#/responses/error"
  891. }
  892. }
  893. }
  894. },
  895. "/orgs/{orgname}/public_members": {
  896. "get": {
  897. "produces": [
  898. "application/json"
  899. ],
  900. "tags": [
  901. "organization"
  902. ],
  903. "operationId": "orgListPublicMembers",
  904. "responses": {
  905. "200": {
  906. "$ref": "#/responses/UserList"
  907. },
  908. "500": {
  909. "$ref": "#/responses/error"
  910. }
  911. }
  912. }
  913. },
  914. "/orgs/{orgname}/public_members/{username}": {
  915. "get": {
  916. "produces": [
  917. "application/json"
  918. ],
  919. "tags": [
  920. "organization"
  921. ],
  922. "operationId": "orgIsPublicMember",
  923. "responses": {
  924. "204": {
  925. "$ref": "#/responses/empty"
  926. },
  927. "404": {
  928. "$ref": "#/responses/notFound"
  929. }
  930. }
  931. },
  932. "put": {
  933. "produces": [
  934. "application/json"
  935. ],
  936. "tags": [
  937. "organization"
  938. ],
  939. "operationId": "orgPublicizeMember",
  940. "responses": {
  941. "204": {
  942. "$ref": "#/responses/empty"
  943. },
  944. "403": {
  945. "$ref": "#/responses/forbidden"
  946. },
  947. "500": {
  948. "$ref": "#/responses/error"
  949. }
  950. }
  951. },
  952. "delete": {
  953. "produces": [
  954. "application/json"
  955. ],
  956. "tags": [
  957. "organization"
  958. ],
  959. "operationId": "orgConcealMember",
  960. "responses": {
  961. "204": {
  962. "$ref": "#/responses/empty"
  963. },
  964. "403": {
  965. "$ref": "#/responses/forbidden"
  966. },
  967. "500": {
  968. "$ref": "#/responses/error"
  969. }
  970. }
  971. }
  972. },
  973. "/orgs/{orgname}/repos": {
  974. "get": {
  975. "produces": [
  976. "application/json"
  977. ],
  978. "tags": [
  979. "organization"
  980. ],
  981. "operationId": "orgListRepos",
  982. "responses": {
  983. "200": {
  984. "$ref": "#/responses/RepositoryList"
  985. },
  986. "500": {
  987. "$ref": "#/responses/error"
  988. }
  989. }
  990. }
  991. },
  992. "/repos/migrate": {
  993. "post": {
  994. "consumes": [
  995. "application/json"
  996. ],
  997. "produces": [
  998. "application/json"
  999. ],
  1000. "tags": [
  1001. "repository"
  1002. ],
  1003. "operationId": "repoMigrate",
  1004. "parameters": [
  1005. {
  1006. "x-go-name": "CloneAddr",
  1007. "name": "clone_addr",
  1008. "in": "body",
  1009. "schema": {
  1010. "type": "string"
  1011. }
  1012. },
  1013. {
  1014. "x-go-name": "AuthUsername",
  1015. "name": "auth_username",
  1016. "in": "body",
  1017. "schema": {
  1018. "type": "string"
  1019. }
  1020. },
  1021. {
  1022. "x-go-name": "AuthPassword",
  1023. "name": "auth_password",
  1024. "in": "body",
  1025. "schema": {
  1026. "type": "string"
  1027. }
  1028. },
  1029. {
  1030. "x-go-name": "UID",
  1031. "name": "uid",
  1032. "in": "body",
  1033. "schema": {
  1034. "type": "integer",
  1035. "format": "int64"
  1036. }
  1037. },
  1038. {
  1039. "x-go-name": "RepoName",
  1040. "name": "repo_name",
  1041. "in": "body",
  1042. "schema": {
  1043. "type": "string"
  1044. }
  1045. },
  1046. {
  1047. "x-go-name": "Mirror",
  1048. "name": "mirror",
  1049. "in": "body",
  1050. "schema": {
  1051. "type": "boolean"
  1052. }
  1053. },
  1054. {
  1055. "x-go-name": "Private",
  1056. "name": "private",
  1057. "in": "body",
  1058. "schema": {
  1059. "type": "boolean"
  1060. }
  1061. },
  1062. {
  1063. "x-go-name": "Description",
  1064. "name": "description",
  1065. "in": "body",
  1066. "schema": {
  1067. "type": "string"
  1068. }
  1069. }
  1070. ],
  1071. "responses": {
  1072. "201": {
  1073. "$ref": "#/responses/Repository"
  1074. },
  1075. "422": {
  1076. "$ref": "#/responses/validationError"
  1077. },
  1078. "500": {
  1079. "$ref": "#/responses/error"
  1080. }
  1081. }
  1082. }
  1083. },
  1084. "/repos/search": {
  1085. "get": {
  1086. "produces": [
  1087. "application/json"
  1088. ],
  1089. "tags": [
  1090. "repository"
  1091. ],
  1092. "operationId": "repoSearch",
  1093. "parameters": [
  1094. {
  1095. "type": "string",
  1096. "x-go-name": "Keyword",
  1097. "description": "Keyword to search",
  1098. "name": "q",
  1099. "in": "query"
  1100. },
  1101. {
  1102. "type": "integer",
  1103. "format": "int64",
  1104. "x-go-name": "OwnerID",
  1105. "description": "Owner in we search search",
  1106. "name": "uid",
  1107. "in": "query"
  1108. },
  1109. {
  1110. "type": "integer",
  1111. "format": "int64",
  1112. "x-go-name": "PageSize",
  1113. "description": "Limit of result\n\nmaximum: setting.ExplorePagingNum",
  1114. "name": "limit",
  1115. "in": "query"
  1116. }
  1117. ],
  1118. "responses": {
  1119. "200": {
  1120. "$ref": "#/responses/SearchResults"
  1121. },
  1122. "500": {
  1123. "$ref": "#/responses/SearchError"
  1124. }
  1125. }
  1126. }
  1127. },
  1128. "/repos/{owner}/{repo}/forks": {
  1129. "get": {
  1130. "produces": [
  1131. "application/json"
  1132. ],
  1133. "tags": [
  1134. "repository"
  1135. ],
  1136. "operationId": "listForks",
  1137. "responses": {
  1138. "200": {
  1139. "$ref": "#/responses/RepositoryList"
  1140. },
  1141. "500": {
  1142. "$ref": "#/responses/error"
  1143. }
  1144. }
  1145. },
  1146. "post": {
  1147. "produces": [
  1148. "application/json"
  1149. ],
  1150. "tags": [
  1151. "repository"
  1152. ],
  1153. "operationId": "createFork",
  1154. "parameters": [
  1155. {
  1156. "x-go-name": "Organization",
  1157. "name": "organization",
  1158. "in": "body",
  1159. "schema": {
  1160. "type": "string"
  1161. }
  1162. }
  1163. ],
  1164. "responses": {
  1165. "202": {
  1166. "$ref": "#/responses/Repository"
  1167. },
  1168. "403": {
  1169. "$ref": "#/responses/forbidden"
  1170. },
  1171. "422": {
  1172. "$ref": "#/responses/validationError"
  1173. },
  1174. "500": {
  1175. "$ref": "#/responses/error"
  1176. }
  1177. }
  1178. }
  1179. },
  1180. "/repos/{username}/{reponame}": {
  1181. "get": {
  1182. "produces": [
  1183. "application/json"
  1184. ],
  1185. "tags": [
  1186. "repository"
  1187. ],
  1188. "operationId": "repoGet",
  1189. "responses": {
  1190. "200": {
  1191. "$ref": "#/responses/Repository"
  1192. },
  1193. "500": {
  1194. "$ref": "#/responses/error"
  1195. }
  1196. }
  1197. },
  1198. "delete": {
  1199. "produces": [
  1200. "application/json"
  1201. ],
  1202. "tags": [
  1203. "repository"
  1204. ],
  1205. "operationId": "repoDelete",
  1206. "responses": {
  1207. "204": {
  1208. "$ref": "#/responses/empty"
  1209. },
  1210. "403": {
  1211. "$ref": "#/responses/forbidden"
  1212. },
  1213. "500": {
  1214. "$ref": "#/responses/error"
  1215. }
  1216. }
  1217. }
  1218. },
  1219. "/repos/{username}/{reponame}/hooks": {
  1220. "get": {
  1221. "produces": [
  1222. "application/json"
  1223. ],
  1224. "tags": [
  1225. "repository"
  1226. ],
  1227. "operationId": "repoListHooks",
  1228. "responses": {
  1229. "200": {
  1230. "$ref": "#/responses/HookList"
  1231. },
  1232. "500": {
  1233. "$ref": "#/responses/error"
  1234. }
  1235. }
  1236. },
  1237. "post": {
  1238. "consumes": [
  1239. "application/json"
  1240. ],
  1241. "produces": [
  1242. "application/json"
  1243. ],
  1244. "tags": [
  1245. "repository"
  1246. ],
  1247. "operationId": "repoCreateHook",
  1248. "parameters": [
  1249. {
  1250. "x-go-name": "Type",
  1251. "name": "type",
  1252. "in": "body",
  1253. "schema": {
  1254. "type": "string"
  1255. }
  1256. },
  1257. {
  1258. "x-go-name": "Config",
  1259. "name": "config",
  1260. "in": "body",
  1261. "schema": {
  1262. "type": "object",
  1263. "additionalProperties": {
  1264. "type": "string"
  1265. }
  1266. }
  1267. },
  1268. {
  1269. "x-go-name": "Events",
  1270. "name": "events",
  1271. "in": "body",
  1272. "schema": {
  1273. "type": "array",
  1274. "items": {
  1275. "type": "string"
  1276. }
  1277. }
  1278. },
  1279. {
  1280. "x-go-name": "Active",
  1281. "name": "active",
  1282. "in": "body",
  1283. "schema": {
  1284. "type": "boolean"
  1285. }
  1286. }
  1287. ],
  1288. "responses": {
  1289. "200": {
  1290. "$ref": "#/responses/Hook"
  1291. },
  1292. "422": {
  1293. "$ref": "#/responses/validationError"
  1294. },
  1295. "500": {
  1296. "$ref": "#/responses/error"
  1297. }
  1298. }
  1299. }
  1300. },
  1301. "/repos/{username}/{reponame}/hooks/{id}": {
  1302. "delete": {
  1303. "produces": [
  1304. "application/json"
  1305. ],
  1306. "tags": [
  1307. "repository"
  1308. ],
  1309. "operationId": "repoDeleteHook",
  1310. "responses": {
  1311. "204": {
  1312. "$ref": "#/responses/empty"
  1313. },
  1314. "404": {
  1315. "$ref": "#/responses/notFound"
  1316. },
  1317. "500": {
  1318. "$ref": "#/responses/error"
  1319. }
  1320. }
  1321. },
  1322. "patch": {
  1323. "produces": [
  1324. "application/json"
  1325. ],
  1326. "tags": [
  1327. "repository"
  1328. ],
  1329. "operationId": "repoEditHook",
  1330. "parameters": [
  1331. {
  1332. "x-go-name": "Config",
  1333. "name": "config",
  1334. "in": "body",
  1335. "schema": {
  1336. "type": "object",
  1337. "additionalProperties": {
  1338. "type": "string"
  1339. }
  1340. }
  1341. },
  1342. {
  1343. "x-go-name": "Events",
  1344. "name": "events",
  1345. "in": "body",
  1346. "schema": {
  1347. "type": "array",
  1348. "items": {
  1349. "type": "string"
  1350. }
  1351. }
  1352. },
  1353. {
  1354. "x-go-name": "Active",
  1355. "name": "active",
  1356. "in": "body",
  1357. "schema": {
  1358. "type": "boolean"
  1359. }
  1360. }
  1361. ],
  1362. "responses": {
  1363. "200": {
  1364. "$ref": "#/responses/Hook"
  1365. },
  1366. "422": {
  1367. "$ref": "#/responses/validationError"
  1368. },
  1369. "500": {
  1370. "$ref": "#/responses/error"
  1371. }
  1372. }
  1373. }
  1374. },
  1375. "/repos/{username}/{reponame}/issues/{issue}/times": {
  1376. "get": {
  1377. "produces": [
  1378. "application/json"
  1379. ],
  1380. "tags": [
  1381. "repository"
  1382. ],
  1383. "operationId": "issueTrackedTimes",
  1384. "responses": {
  1385. "200": {
  1386. "$ref": "#/responses/TrackedTimes"
  1387. },
  1388. "404": {
  1389. "$ref": "#/responses/error"
  1390. },
  1391. "500": {
  1392. "$ref": "#/responses/error"
  1393. }
  1394. }
  1395. },
  1396. "post": {
  1397. "produces": [
  1398. "application/json"
  1399. ],
  1400. "tags": [
  1401. "repository"
  1402. ],
  1403. "operationId": "addTime",
  1404. "parameters": [
  1405. {
  1406. "x-go-name": "Time",
  1407. "name": "time",
  1408. "in": "body",
  1409. "schema": {
  1410. "type": "integer",
  1411. "format": "int64"
  1412. }
  1413. }
  1414. ],
  1415. "responses": {
  1416. "200": {
  1417. "$ref": "#/responses/TrackedTime"
  1418. },
  1419. "400": {
  1420. "$ref": "#/responses/error"
  1421. },
  1422. "403": {
  1423. "$ref": "#/responses/error"
  1424. },
  1425. "404": {
  1426. "$ref": "#/responses/error"
  1427. },
  1428. "500": {
  1429. "$ref": "#/responses/error"
  1430. }
  1431. }
  1432. }
  1433. },
  1434. "/repos/{username}/{reponame}/mirror-sync": {
  1435. "post": {
  1436. "produces": [
  1437. "application/json"
  1438. ],
  1439. "tags": [
  1440. "repository"
  1441. ],
  1442. "operationId": "repoMirrorSync",
  1443. "responses": {
  1444. "200": {
  1445. "$ref": "#/responses/empty"
  1446. },
  1447. "403": {
  1448. "$ref": "#/responses/forbidden"
  1449. }
  1450. }
  1451. }
  1452. },
  1453. "/repos/{username}/{reponame}/subscription": {
  1454. "get": {
  1455. "tags": [
  1456. "repository"
  1457. ],
  1458. "operationId": "userCurrentCheckSubscription",
  1459. "responses": {
  1460. "200": {
  1461. "$ref": "#/responses/WatchInfo"
  1462. },
  1463. "404": {
  1464. "$ref": "#/responses/notFound"
  1465. }
  1466. }
  1467. },
  1468. "put": {
  1469. "tags": [
  1470. "repository"
  1471. ],
  1472. "operationId": "userCurrentPutSubscription",
  1473. "responses": {
  1474. "200": {
  1475. "$ref": "#/responses/WatchInfo"
  1476. },
  1477. "500": {
  1478. "$ref": "#/responses/error"
  1479. }
  1480. }
  1481. },
  1482. "delete": {
  1483. "tags": [
  1484. "repository"
  1485. ],
  1486. "operationId": "userCurrentDeleteSubscription",
  1487. "responses": {
  1488. "204": {
  1489. "$ref": "#/responses/empty"
  1490. },
  1491. "500": {
  1492. "$ref": "#/responses/error"
  1493. }
  1494. }
  1495. }
  1496. },
  1497. "/repos/{username}/{reponame}/times": {
  1498. "get": {
  1499. "produces": [
  1500. "application/json"
  1501. ],
  1502. "tags": [
  1503. "repository"
  1504. ],
  1505. "operationId": "repoTrackedTimes",
  1506. "responses": {
  1507. "200": {
  1508. "$ref": "#/responses/TrackedTimes"
  1509. },
  1510. "400": {
  1511. "$ref": "#/responses/error"
  1512. },
  1513. "500": {
  1514. "$ref": "#/responses/error"
  1515. }
  1516. }
  1517. }
  1518. },
  1519. "/repos/{username}/{reponame}/times/{timetrackingusername}": {
  1520. "get": {
  1521. "produces": [
  1522. "application/json"
  1523. ],
  1524. "tags": [
  1525. "user"
  1526. ],
  1527. "operationId": "userTrackedTimes",
  1528. "responses": {
  1529. "200": {
  1530. "$ref": "#/responses/TrackedTimes"
  1531. },
  1532. "400": {
  1533. "$ref": "#/responses/error"
  1534. },
  1535. "404": {
  1536. "$ref": "#/responses/error"
  1537. },
  1538. "500": {
  1539. "$ref": "#/responses/error"
  1540. }
  1541. }
  1542. }
  1543. },
  1544. "/repositories/{id}": {
  1545. "get": {
  1546. "produces": [
  1547. "application/json"
  1548. ],
  1549. "tags": [
  1550. "repository"
  1551. ],
  1552. "operationId": "repoGetByID",
  1553. "responses": {
  1554. "200": {
  1555. "$ref": "#/responses/Repository"
  1556. },
  1557. "500": {
  1558. "$ref": "#/responses/error"
  1559. }
  1560. }
  1561. }
  1562. },
  1563. "/user": {
  1564. "get": {
  1565. "produces": [
  1566. "application/json"
  1567. ],
  1568. "tags": [
  1569. "user"
  1570. ],
  1571. "operationId": "userGetCurrent",
  1572. "responses": {
  1573. "200": {
  1574. "$ref": "#/responses/User"
  1575. }
  1576. }
  1577. }
  1578. },
  1579. "/user/followers": {
  1580. "get": {
  1581. "produces": [
  1582. "application/json"
  1583. ],
  1584. "tags": [
  1585. "user"
  1586. ],
  1587. "operationId": "userCurrentListFollowers",
  1588. "responses": {
  1589. "200": {
  1590. "$ref": "#/responses/UserList"
  1591. },
  1592. "500": {
  1593. "$ref": "#/responses/error"
  1594. }
  1595. }
  1596. }
  1597. },
  1598. "/user/following": {
  1599. "get": {
  1600. "produces": [
  1601. "application/json"
  1602. ],
  1603. "tags": [
  1604. "user"
  1605. ],
  1606. "operationId": "userCurrentListFollowing",
  1607. "responses": {
  1608. "200": {
  1609. "$ref": "#/responses/UserList"
  1610. },
  1611. "500": {
  1612. "$ref": "#/responses/error"
  1613. }
  1614. }
  1615. }
  1616. },
  1617. "/user/following/{username}": {
  1618. "get": {
  1619. "tags": [
  1620. "user"
  1621. ],
  1622. "operationId": "userCurrentCheckFollowing",
  1623. "responses": {
  1624. "204": {
  1625. "$ref": "#/responses/empty"
  1626. },
  1627. "404": {
  1628. "$ref": "#/responses/notFound"
  1629. }
  1630. }
  1631. },
  1632. "put": {
  1633. "tags": [
  1634. "user"
  1635. ],
  1636. "operationId": "userCurrentPutFollow",
  1637. "responses": {
  1638. "204": {
  1639. "$ref": "#/responses/empty"
  1640. },
  1641. "500": {
  1642. "$ref": "#/responses/error"
  1643. }
  1644. }
  1645. },
  1646. "delete": {
  1647. "tags": [
  1648. "user"
  1649. ],
  1650. "operationId": "userCurrentDeleteFollow",
  1651. "responses": {
  1652. "204": {
  1653. "$ref": "#/responses/empty"
  1654. },
  1655. "500": {
  1656. "$ref": "#/responses/error"
  1657. }
  1658. }
  1659. }
  1660. },
  1661. "/user/gpg_keys": {
  1662. "get": {
  1663. "produces": [
  1664. "application/json"
  1665. ],
  1666. "tags": [
  1667. "user"
  1668. ],
  1669. "operationId": "userCurrentListGPGKeys",
  1670. "responses": {
  1671. "200": {
  1672. "$ref": "#/responses/GPGKeyList"
  1673. },
  1674. "500": {
  1675. "$ref": "#/responses/error"
  1676. }
  1677. }
  1678. },
  1679. "post": {
  1680. "consumes": [
  1681. "application/json"
  1682. ],
  1683. "produces": [
  1684. "application/json"
  1685. ],
  1686. "tags": [
  1687. "user"
  1688. ],
  1689. "operationId": "userCurrentPostGPGKey",
  1690. "parameters": [
  1691. {
  1692. "uniqueItems": true,
  1693. "x-go-name": "ArmoredKey",
  1694. "description": "An armored GPG key to add",
  1695. "name": "armored_public_key",
  1696. "in": "body",
  1697. "required": true,
  1698. "schema": {
  1699. "type": "string"
  1700. }
  1701. }
  1702. ],
  1703. "responses": {
  1704. "201": {
  1705. "$ref": "#/responses/GPGKey"
  1706. },
  1707. "422": {
  1708. "$ref": "#/responses/validationError"
  1709. },
  1710. "500": {
  1711. "$ref": "#/responses/error"
  1712. }
  1713. }
  1714. }
  1715. },
  1716. "/user/gpg_keys/{id}": {
  1717. "get": {
  1718. "produces": [
  1719. "application/json"
  1720. ],
  1721. "tags": [
  1722. "user"
  1723. ],
  1724. "operationId": "userCurrentGetGPGKey",
  1725. "responses": {
  1726. "200": {
  1727. "$ref": "#/responses/GPGKey"
  1728. },
  1729. "404": {
  1730. "$ref": "#/responses/notFound"
  1731. },
  1732. "500": {
  1733. "$ref": "#/responses/error"
  1734. }
  1735. }
  1736. },
  1737. "delete": {
  1738. "produces": [
  1739. "application/json"
  1740. ],
  1741. "tags": [
  1742. "user"
  1743. ],
  1744. "operationId": "userCurrentDeleteGPGKey",
  1745. "responses": {
  1746. "204": {
  1747. "$ref": "#/responses/empty"
  1748. },
  1749. "403": {
  1750. "$ref": "#/responses/forbidden"
  1751. },
  1752. "500": {
  1753. "$ref": "#/responses/error"
  1754. }
  1755. }
  1756. }
  1757. },
  1758. "/user/keys": {
  1759. "get": {
  1760. "produces": [
  1761. "application/json"
  1762. ],
  1763. "tags": [
  1764. "user"
  1765. ],
  1766. "operationId": "userCurrentListKeys",
  1767. "responses": {
  1768. "200": {
  1769. "$ref": "#/responses/PublicKeyList"
  1770. },
  1771. "500": {
  1772. "$ref": "#/responses/error"
  1773. }
  1774. }
  1775. },
  1776. "post": {
  1777. "consumes": [
  1778. "application/json"
  1779. ],
  1780. "produces": [
  1781. "application/json"
  1782. ],
  1783. "tags": [
  1784. "user"
  1785. ],
  1786. "operationId": "userCurrentPostKey",
  1787. "parameters": [
  1788. {
  1789. "uniqueItems": true,
  1790. "x-go-name": "Title",
  1791. "description": "Title of the key to add",
  1792. "name": "title",
  1793. "in": "body",
  1794. "required": true,
  1795. "schema": {
  1796. "type": "string"
  1797. }
  1798. },
  1799. {
  1800. "uniqueItems": true,
  1801. "x-go-name": "Key",
  1802. "description": "An armored SSH key to add",
  1803. "name": "key",
  1804. "in": "body",
  1805. "required": true,
  1806. "schema": {
  1807. "type": "string"
  1808. }
  1809. }
  1810. ],
  1811. "responses": {
  1812. "201": {
  1813. "$ref": "#/responses/PublicKey"
  1814. },
  1815. "422": {
  1816. "$ref": "#/responses/validationError"
  1817. },
  1818. "500": {
  1819. "$ref": "#/responses/error"
  1820. }
  1821. }
  1822. }
  1823. },
  1824. "/user/keys/{id}": {
  1825. "get": {
  1826. "produces": [
  1827. "application/json"
  1828. ],
  1829. "tags": [
  1830. "user"
  1831. ],
  1832. "operationId": "userCurrentGetKey",
  1833. "responses": {
  1834. "200": {
  1835. "$ref": "#/responses/PublicKey"
  1836. },
  1837. "404": {
  1838. "$ref": "#/responses/notFound"
  1839. },
  1840. "500": {
  1841. "$ref": "#/responses/error"
  1842. }
  1843. }
  1844. },
  1845. "delete": {
  1846. "produces": [
  1847. "application/json"
  1848. ],
  1849. "tags": [
  1850. "user"
  1851. ],
  1852. "operationId": "userCurrentDeleteKey",
  1853. "responses": {
  1854. "204": {
  1855. "$ref": "#/responses/empty"
  1856. },
  1857. "403": {
  1858. "$ref": "#/responses/forbidden"
  1859. },
  1860. "500": {
  1861. "$ref": "#/responses/error"
  1862. }
  1863. }
  1864. }
  1865. },
  1866. "/user/repos": {
  1867. "get": {
  1868. "produces": [
  1869. "application/json"
  1870. ],
  1871. "tags": [
  1872. "user"
  1873. ],
  1874. "operationId": "userCurrentListRepos",
  1875. "responses": {
  1876. "200": {
  1877. "$ref": "#/responses/RepositoryList"
  1878. },
  1879. "500": {
  1880. "$ref": "#/responses/error"
  1881. }
  1882. }
  1883. },
  1884. "post": {
  1885. "consumes": [
  1886. "application/json"
  1887. ],
  1888. "produces": [
  1889. "application/json"
  1890. ],
  1891. "tags": [
  1892. "repository",
  1893. "user"
  1894. ],
  1895. "operationId": "createCurrentUserRepo",
  1896. "parameters": [
  1897. {
  1898. "uniqueItems": true,
  1899. "x-go-name": "Name",
  1900. "description": "Name of the repository to create",
  1901. "name": "name",
  1902. "in": "body",
  1903. "schema": {
  1904. "type": "string"
  1905. }
  1906. },
  1907. {
  1908. "x-go-name": "Description",
  1909. "description": "Description of the repository to create",
  1910. "name": "description",
  1911. "in": "body",
  1912. "schema": {
  1913. "type": "string"
  1914. }
  1915. },
  1916. {
  1917. "x-go-name": "Private",
  1918. "description": "Is the repository to create private ?",
  1919. "name": "private",
  1920. "in": "body",
  1921. "schema": {
  1922. "type": "boolean"
  1923. }
  1924. },
  1925. {
  1926. "x-go-name": "AutoInit",
  1927. "description": "Init the repository to create ?",
  1928. "name": "auto_init",
  1929. "in": "body",
  1930. "schema": {
  1931. "type": "boolean"
  1932. }
  1933. },
  1934. {
  1935. "x-go-name": "Gitignores",
  1936. "description": "Gitignores to use",
  1937. "name": "gitignores",
  1938. "in": "body",
  1939. "schema": {
  1940. "type": "string"
  1941. }
  1942. },
  1943. {
  1944. "x-go-name": "License",
  1945. "description": "License to use",
  1946. "name": "license",
  1947. "in": "body",
  1948. "schema": {
  1949. "type": "string"
  1950. }
  1951. },
  1952. {
  1953. "x-go-name": "Readme",
  1954. "description": "Readme of the repository to create",
  1955. "name": "readme",
  1956. "in": "body",
  1957. "schema": {
  1958. "type": "string"
  1959. }
  1960. }
  1961. ],
  1962. "responses": {
  1963. "201": {
  1964. "$ref": "#/responses/Repository"
  1965. },
  1966. "403": {
  1967. "$ref": "#/responses/forbidden"
  1968. },
  1969. "422": {
  1970. "$ref": "#/responses/validationError"
  1971. },
  1972. "500": {
  1973. "$ref": "#/responses/error"
  1974. }
  1975. }
  1976. }
  1977. },
  1978. "/user/starred": {
  1979. "get": {
  1980. "produces": [
  1981. "application/json"
  1982. ],
  1983. "tags": [
  1984. "user"
  1985. ],
  1986. "operationId": "userCurrentListStarred",
  1987. "responses": {
  1988. "200": {
  1989. "$ref": "#/responses/RepositoryList"
  1990. },
  1991. "500": {
  1992. "$ref": "#/responses/error"
  1993. }
  1994. }
  1995. }
  1996. },
  1997. "/user/starred/{username}/{reponame}": {
  1998. "get": {
  1999. "tags": [
  2000. "user"
  2001. ],
  2002. "operationId": "userCurrentCheckStarring",
  2003. "responses": {
  2004. "204": {
  2005. "$ref": "#/responses/empty"
  2006. },
  2007. "404": {
  2008. "$ref": "#/responses/notFound"
  2009. }
  2010. }
  2011. },
  2012. "put": {
  2013. "tags": [
  2014. "user"
  2015. ],
  2016. "operationId": "userCurrentPutStar",
  2017. "responses": {
  2018. "204": {
  2019. "$ref": "#/responses/empty"
  2020. },
  2021. "500": {
  2022. "$ref": "#/responses/error"
  2023. }
  2024. }
  2025. },
  2026. "delete": {
  2027. "tags": [
  2028. "user"
  2029. ],
  2030. "operationId": "userCurrentDeleteStar",
  2031. "responses": {
  2032. "204": {
  2033. "$ref": "#/responses/empty"
  2034. },
  2035. "500": {
  2036. "$ref": "#/responses/error"
  2037. }
  2038. }
  2039. }
  2040. },
  2041. "/user/subscriptions": {
  2042. "get": {
  2043. "produces": [
  2044. "application/json"
  2045. ],
  2046. "tags": [
  2047. "user"
  2048. ],
  2049. "operationId": "userCurrentListSubscriptions",
  2050. "responses": {
  2051. "200": {
  2052. "$ref": "#/responses/RepositoryList"
  2053. },
  2054. "500": {
  2055. "$ref": "#/responses/error"
  2056. }
  2057. }
  2058. }
  2059. },
  2060. "/user/times": {
  2061. "get": {
  2062. "produces": [
  2063. "application/json"
  2064. ],
  2065. "tags": [
  2066. "user"
  2067. ],
  2068. "operationId": "userTrackedTimes",
  2069. "responses": {
  2070. "200": {
  2071. "$ref": "#/responses/TrackedTimes"
  2072. },
  2073. "500": {
  2074. "$ref": "#/responses/error"
  2075. }
  2076. }
  2077. }
  2078. },
  2079. "/users/:username/followers": {
  2080. "get": {
  2081. "produces": [
  2082. "application/json"
  2083. ],
  2084. "tags": [
  2085. "user"
  2086. ],
  2087. "operationId": "userListFollowers",
  2088. "responses": {
  2089. "200": {
  2090. "$ref": "#/responses/UserList"
  2091. },
  2092. "500": {
  2093. "$ref": "#/responses/error"
  2094. }
  2095. }
  2096. }
  2097. },
  2098. "/users/search": {
  2099. "get": {
  2100. "produces": [
  2101. "application/json"
  2102. ],
  2103. "tags": [
  2104. "user"
  2105. ],
  2106. "operationId": "userSearch",
  2107. "responses": {
  2108. "200": {
  2109. "$ref": "#/responses/UserList"
  2110. },
  2111. "500": {
  2112. "$ref": "#/responses/error"
  2113. }
  2114. }
  2115. }
  2116. },
  2117. "/users/{username}": {
  2118. "get": {
  2119. "produces": [
  2120. "application/json"
  2121. ],
  2122. "tags": [
  2123. "user"
  2124. ],
  2125. "operationId": "userGet",
  2126. "responses": {
  2127. "200": {
  2128. "$ref": "#/responses/User"
  2129. },
  2130. "404": {
  2131. "$ref": "#/responses/notFound"
  2132. },
  2133. "500": {
  2134. "$ref": "#/responses/error"
  2135. }
  2136. }
  2137. }
  2138. },
  2139. "/users/{username}/following": {
  2140. "get": {
  2141. "produces": [
  2142. "application/json"
  2143. ],
  2144. "tags": [
  2145. "user"
  2146. ],
  2147. "operationId": "userListFollowing",
  2148. "responses": {
  2149. "200": {
  2150. "$ref": "#/responses/UserList"
  2151. },
  2152. "500": {
  2153. "$ref": "#/responses/error"
  2154. }
  2155. }
  2156. }
  2157. },
  2158. "/users/{username}/following/:target": {
  2159. "get": {
  2160. "tags": [
  2161. "user"
  2162. ],
  2163. "operationId": "userCheckFollowing",
  2164. "responses": {
  2165. "204": {
  2166. "$ref": "#/responses/empty"
  2167. },
  2168. "404": {
  2169. "$ref": "#/responses/notFound"
  2170. }
  2171. }
  2172. }
  2173. },
  2174. "/users/{username}/gpg_keys": {
  2175. "get": {
  2176. "produces": [
  2177. "application/json"
  2178. ],
  2179. "tags": [
  2180. "user"
  2181. ],
  2182. "operationId": "userListGPGKeys",
  2183. "responses": {
  2184. "200": {
  2185. "$ref": "#/responses/GPGKeyList"
  2186. },
  2187. "500": {
  2188. "$ref": "#/responses/error"
  2189. }
  2190. }
  2191. }
  2192. },
  2193. "/users/{username}/keys": {
  2194. "get": {
  2195. "produces": [
  2196. "application/json"
  2197. ],
  2198. "tags": [
  2199. "user"
  2200. ],
  2201. "operationId": "userListKeys",
  2202. "responses": {
  2203. "200": {
  2204. "$ref": "#/responses/PublicKeyList"
  2205. },
  2206. "500": {
  2207. "$ref": "#/responses/error"
  2208. }
  2209. }
  2210. }
  2211. },
  2212. "/users/{username}/repos": {
  2213. "get": {
  2214. "produces": [
  2215. "application/json"
  2216. ],
  2217. "tags": [
  2218. "user"
  2219. ],
  2220. "operationId": "userListRepos",
  2221. "responses": {
  2222. "200": {
  2223. "$ref": "#/responses/RepositoryList"
  2224. },
  2225. "500": {
  2226. "$ref": "#/responses/error"
  2227. }
  2228. }
  2229. }
  2230. },
  2231. "/users/{username}/starred": {
  2232. "get": {
  2233. "produces": [
  2234. "application/json"
  2235. ],
  2236. "tags": [
  2237. "user"
  2238. ],
  2239. "operationId": "userListStarred",
  2240. "responses": {
  2241. "200": {
  2242. "$ref": "#/responses/RepositoryList"
  2243. },
  2244. "500": {
  2245. "$ref": "#/responses/error"
  2246. }
  2247. }
  2248. }
  2249. },
  2250. "/users/{username}/subscriptions": {
  2251. "get": {
  2252. "produces": [
  2253. "application/json"
  2254. ],
  2255. "tags": [
  2256. "user"
  2257. ],
  2258. "operationId": "userListSubscriptions",
  2259. "responses": {
  2260. "200": {
  2261. "$ref": "#/responses/RepositoryList"
  2262. },
  2263. "500": {
  2264. "$ref": "#/responses/error"
  2265. }
  2266. }
  2267. }
  2268. },
  2269. "/users/{username}/tokens": {
  2270. "get": {
  2271. "produces": [
  2272. "application/json"
  2273. ],
  2274. "tags": [
  2275. "user"
  2276. ],
  2277. "operationId": "userGetTokens",
  2278. "responses": {
  2279. "200": {
  2280. "$ref": "#/responses/AccessTokenList"
  2281. },
  2282. "500": {
  2283. "$ref": "#/responses/error"
  2284. }
  2285. }
  2286. }
  2287. },
  2288. "/version": {
  2289. "get": {
  2290. "description": "This show current running Gitea application version.",
  2291. "produces": [
  2292. "application/json"
  2293. ],
  2294. "tags": [
  2295. "miscellaneous"
  2296. ],
  2297. "summary": "Return Gitea running version.",
  2298. "operationId": "getVersion",
  2299. "responses": {
  2300. "200": {
  2301. "$ref": "#/responses/ServerVersion"
  2302. }
  2303. }
  2304. }
  2305. }
  2306. },
  2307. "definitions": {
  2308. "GPGKey": {
  2309. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  2310. "type": "object",
  2311. "properties": {
  2312. "can_certify": {
  2313. "type": "boolean",
  2314. "x-go-name": "CanCertify"
  2315. },
  2316. "can_encrypt_comms": {
  2317. "type": "boolean",
  2318. "x-go-name": "CanEncryptComms"
  2319. },
  2320. "can_encrypt_storage": {
  2321. "type": "boolean",
  2322. "x-go-name": "CanEncryptStorage"
  2323. },
  2324. "can_sign": {
  2325. "type": "boolean",
  2326. "x-go-name": "CanSign"
  2327. },
  2328. "created_at": {
  2329. "x-go-name": "Created"
  2330. },
  2331. "emails": {
  2332. "type": "array",
  2333. "items": {
  2334. "$ref": "#/definitions/GPGKeyEmail"
  2335. },
  2336. "x-go-name": "Emails"
  2337. },
  2338. "expires_at": {
  2339. "x-go-name": "Expires"
  2340. },
  2341. "id": {
  2342. "type": "integer",
  2343. "format": "int64",
  2344. "x-go-name": "ID"
  2345. },
  2346. "key_id": {
  2347. "type": "string",
  2348. "x-go-name": "KeyID"
  2349. },
  2350. "primary_key_id": {
  2351. "type": "string",
  2352. "x-go-name": "PrimaryKeyID"
  2353. },
  2354. "public_key": {
  2355. "type": "string",
  2356. "x-go-name": "PublicKey"
  2357. },
  2358. "subkeys": {
  2359. "type": "array",
  2360. "items": {
  2361. "type": "object"
  2362. },
  2363. "x-go-name": "SubsKey"
  2364. }
  2365. },
  2366. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  2367. },
  2368. "GPGKeyEmail": {
  2369. "description": "GPGKeyEmail an email attached to a GPGKey",
  2370. "type": "object",
  2371. "properties": {
  2372. "email": {
  2373. "type": "string",
  2374. "x-go-name": "Email"
  2375. },
  2376. "verified": {
  2377. "type": "boolean",
  2378. "x-go-name": "Verified"
  2379. }
  2380. },
  2381. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  2382. },
  2383. "Permission": {
  2384. "type": "object",
  2385. "title": "Permission represents a API permission.",
  2386. "properties": {
  2387. "admin": {
  2388. "type": "boolean",
  2389. "x-go-name": "Admin"
  2390. },
  2391. "pull": {
  2392. "type": "boolean",
  2393. "x-go-name": "Pull"
  2394. },
  2395. "push": {
  2396. "type": "boolean",
  2397. "x-go-name": "Push"
  2398. }
  2399. },
  2400. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  2401. },
  2402. "Repository": {
  2403. "type": "object",
  2404. "title": "Repository represents a API repository.",
  2405. "properties": {
  2406. "clone_url": {
  2407. "type": "string",
  2408. "x-go-name": "CloneURL"
  2409. },
  2410. "created_at": {
  2411. "x-go-name": "Created"
  2412. },
  2413. "default_branch": {
  2414. "type": "string",
  2415. "x-go-name": "DefaultBranch"
  2416. },
  2417. "description": {
  2418. "type": "string",
  2419. "x-go-name": "Description"
  2420. },
  2421. "empty": {
  2422. "type": "boolean",
  2423. "x-go-name": "Empty"
  2424. },
  2425. "fork": {
  2426. "type": "boolean",
  2427. "x-go-name": "Fork"
  2428. },
  2429. "forks_count": {
  2430. "type": "integer",
  2431. "format": "int64",
  2432. "x-go-name": "Forks"
  2433. },
  2434. "full_name": {
  2435. "type": "string",
  2436. "x-go-name": "FullName"
  2437. },
  2438. "html_url": {
  2439. "type": "string",
  2440. "x-go-name": "HTMLURL"
  2441. },
  2442. "id": {
  2443. "type": "integer",
  2444. "format": "int64",
  2445. "x-go-name": "ID"
  2446. },
  2447. "mirror": {
  2448. "type": "boolean",
  2449. "x-go-name": "Mirror"
  2450. },
  2451. "name": {
  2452. "type": "string",
  2453. "x-go-name": "Name"
  2454. },
  2455. "open_issues_count": {
  2456. "type": "integer",
  2457. "format": "int64",
  2458. "x-go-name": "OpenIssues"
  2459. },
  2460. "owner": {
  2461. "$ref": "#/definitions/User"
  2462. },
  2463. "parent": {
  2464. "type": "object"
  2465. },
  2466. "permissions": {
  2467. "$ref": "#/definitions/Permission"
  2468. },
  2469. "private": {
  2470. "type": "boolean",
  2471. "x-go-name": "Private"
  2472. },
  2473. "size": {
  2474. "type": "integer",
  2475. "format": "int64",
  2476. "x-go-name": "Size"
  2477. },
  2478. "ssh_url": {
  2479. "type": "string",
  2480. "x-go-name": "SSHURL"
  2481. },
  2482. "stars_count": {
  2483. "type": "integer",
  2484. "format": "int64",
  2485. "x-go-name": "Stars"
  2486. },
  2487. "updated_at": {
  2488. "x-go-name": "Updated"
  2489. },
  2490. "watchers_count": {
  2491. "type": "integer",
  2492. "format": "int64",
  2493. "x-go-name": "Watchers"
  2494. },
  2495. "website": {
  2496. "type": "string",
  2497. "x-go-name": "Website"
  2498. }
  2499. },
  2500. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  2501. },
  2502. "User": {
  2503. "type": "object",
  2504. "title": "User represents a API user.",
  2505. "properties": {
  2506. "avatar_url": {
  2507. "type": "string",
  2508. "x-go-name": "AvatarURL"
  2509. },
  2510. "email": {
  2511. "type": "string",
  2512. "x-go-name": "Email"
  2513. },
  2514. "full_name": {
  2515. "type": "string",
  2516. "x-go-name": "FullName"
  2517. },
  2518. "id": {
  2519. "type": "integer",
  2520. "format": "int64",
  2521. "x-go-name": "ID"
  2522. },
  2523. "login": {
  2524. "type": "string",
  2525. "x-go-name": "UserName"
  2526. }
  2527. },
  2528. "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea"
  2529. }
  2530. },
  2531. "responses": {
  2532. "AccessToken": {
  2533. "description": "AccessToken represents a API access token.",
  2534. "headers": {
  2535. "name": {
  2536. "type": "string"
  2537. },
  2538. "sha1": {
  2539. "type": "string"
  2540. }
  2541. }
  2542. },
  2543. "AccessTokenList": {
  2544. "description": "AccessTokenList represents a list of API access token."
  2545. },
  2546. "GPGKey": {
  2547. "description": "GPGKey a user GPG key to sign commit and tag in repository",
  2548. "headers": {
  2549. "can_certify": {
  2550. "type": "boolean"
  2551. },
  2552. "can_encrypt_comms": {
  2553. "type": "boolean"
  2554. },
  2555. "can_encrypt_storage": {
  2556. "type": "boolean"
  2557. },
  2558. "can_sign": {
  2559. "type": "boolean"
  2560. },
  2561. "created_at": {},
  2562. "emails": {
  2563. "type": "array",
  2564. "items": {
  2565. "$ref": "#/definitions/GPGKeyEmail"
  2566. }
  2567. },
  2568. "expires_at": {},
  2569. "id": {
  2570. "type": "integer",
  2571. "format": "int64"
  2572. },
  2573. "key_id": {
  2574. "type": "string"
  2575. },
  2576. "primary_key_id": {
  2577. "type": "string"
  2578. },
  2579. "public_key": {
  2580. "type": "string"
  2581. },
  2582. "subkeys": {
  2583. "type": "array",
  2584. "items": {
  2585. "type": "object"
  2586. }
  2587. }
  2588. }
  2589. },
  2590. "GPGKeyList": {
  2591. "description": "GPGKeyList represents a list of GPGKey"
  2592. },
  2593. "Hook": {
  2594. "description": "Hook a hook is a web hook when one repository changed",
  2595. "schema": {
  2596. "type": "object",
  2597. "additionalProperties": {
  2598. "type": "string"
  2599. }
  2600. },
  2601. "headers": {
  2602. "active": {
  2603. "type": "boolean"
  2604. },
  2605. "config": {},
  2606. "created_at": {},
  2607. "events": {
  2608. "type": "array",
  2609. "items": {
  2610. "type": "string"
  2611. }
  2612. },
  2613. "id": {
  2614. "type": "integer",
  2615. "format": "int64"
  2616. },
  2617. "type": {
  2618. "type": "string"
  2619. },
  2620. "updated_at": {}
  2621. }
  2622. },
  2623. "HookList": {
  2624. "description": "HookList represents a list of API hook."
  2625. },
  2626. "MarkdownRender": {
  2627. "description": "MarkdownRender is a rendered markdown document"
  2628. },
  2629. "Organization": {
  2630. "description": "Organization a group of some repositories, users and teams",
  2631. "headers": {
  2632. "avatar_url": {
  2633. "type": "string"
  2634. },
  2635. "description": {
  2636. "type": "string"
  2637. },
  2638. "full_name": {
  2639. "type": "string"
  2640. },
  2641. "id": {
  2642. "type": "integer",
  2643. "format": "int64"
  2644. },
  2645. "location": {
  2646. "type": "string"
  2647. },
  2648. "username": {
  2649. "type": "string"
  2650. },
  2651. "website": {
  2652. "type": "string"
  2653. }
  2654. }
  2655. },
  2656. "PublicKey": {
  2657. "description": "PublicKey publickey is a user key to push code to repository",
  2658. "headers": {
  2659. "created_at": {},
  2660. "id": {
  2661. "type": "integer",
  2662. "format": "int64"
  2663. },
  2664. "key": {
  2665. "type": "string"
  2666. },
  2667. "title": {
  2668. "type": "string"
  2669. },
  2670. "url": {
  2671. "type": "string"
  2672. }
  2673. }
  2674. },
  2675. "PublicKeyList": {
  2676. "description": "PublicKeyList represents a list of PublicKey"
  2677. },
  2678. "Repository": {
  2679. "description": "Repository represents a API repository.",
  2680. "schema": {
  2681. "$ref": "#/definitions/Permission"
  2682. },
  2683. "headers": {
  2684. "clone_url": {
  2685. "type": "string"
  2686. },
  2687. "created_at": {},
  2688. "default_branch": {
  2689. "type": "string"
  2690. },
  2691. "description": {
  2692. "type": "string"
  2693. },
  2694. "empty": {
  2695. "type": "boolean"
  2696. },
  2697. "fork": {
  2698. "type": "boolean"
  2699. },
  2700. "forks_count": {
  2701. "type": "integer",
  2702. "format": "int64"
  2703. },
  2704. "full_name": {
  2705. "type": "string"
  2706. },
  2707. "html_url": {
  2708. "type": "string"
  2709. },
  2710. "id": {
  2711. "type": "integer",
  2712. "format": "int64"
  2713. },
  2714. "mirror": {
  2715. "type": "boolean"
  2716. },
  2717. "name": {
  2718. "type": "string"
  2719. },
  2720. "open_issues_count": {
  2721. "type": "integer",
  2722. "format": "int64"
  2723. },
  2724. "owner": {},
  2725. "parent": {},
  2726. "permissions": {},
  2727. "private": {
  2728. "type": "boolean"
  2729. },
  2730. "size": {
  2731. "type": "integer",
  2732. "format": "int64"
  2733. },
  2734. "ssh_url": {
  2735. "type": "string"
  2736. },
  2737. "stars_count": {
  2738. "type": "integer",
  2739. "format": "int64"
  2740. },
  2741. "updated_at": {},
  2742. "watchers_count": {
  2743. "type": "integer",
  2744. "format": "int64"
  2745. },
  2746. "website": {
  2747. "type": "string"
  2748. }
  2749. }
  2750. },
  2751. "RepositoryList": {
  2752. "description": "RepositoryList represents a list of API repository."
  2753. },
  2754. "SearchError": {
  2755. "description": "SearchError error of failing search",
  2756. "headers": {
  2757. "error": {
  2758. "type": "string"
  2759. },
  2760. "ok": {
  2761. "type": "boolean"
  2762. }
  2763. }
  2764. },
  2765. "SearchResults": {
  2766. "description": "SearchResults results of search",
  2767. "headers": {
  2768. "data": {
  2769. "type": "array",
  2770. "items": {
  2771. "$ref": "#/definitions/Repository"
  2772. }
  2773. },
  2774. "ok": {
  2775. "type": "boolean"
  2776. }
  2777. }
  2778. },
  2779. "ServerVersion": {
  2780. "description": "ServerVersion wraps the version of the server",
  2781. "headers": {
  2782. "Version": {
  2783. "type": "string"
  2784. }
  2785. }
  2786. },
  2787. "TrackedTime": {
  2788. "description": "TrackedTime worked time for an issue / pr",
  2789. "headers": {
  2790. "created": {},
  2791. "id": {
  2792. "type": "integer",
  2793. "format": "int64"
  2794. },
  2795. "issue_id": {
  2796. "type": "integer",
  2797. "format": "int64"
  2798. },
  2799. "time": {
  2800. "type": "integer",
  2801. "format": "int64",
  2802. "description": "Time in seconds"
  2803. },
  2804. "user_id": {
  2805. "type": "integer",
  2806. "format": "int64"
  2807. }
  2808. }
  2809. },
  2810. "TrackedTimes": {
  2811. "description": "TrackedTimes represent a list of tracked times"
  2812. },
  2813. "User": {
  2814. "description": "User represents a API user.",
  2815. "headers": {
  2816. "avatar_url": {
  2817. "type": "string"
  2818. },
  2819. "email": {
  2820. "type": "string"
  2821. },
  2822. "full_name": {
  2823. "type": "string"
  2824. },
  2825. "id": {
  2826. "type": "integer",
  2827. "format": "int64"
  2828. },
  2829. "login": {
  2830. "type": "string"
  2831. }
  2832. }
  2833. },
  2834. "UserList": {
  2835. "description": "UserList represents a list of API user."
  2836. },
  2837. "WatchInfo": {
  2838. "description": "WatchInfo represents a API watch status of one repository",
  2839. "schema": {
  2840. "type": "object"
  2841. },
  2842. "headers": {
  2843. "created_at": {},
  2844. "ignored": {
  2845. "type": "boolean"
  2846. },
  2847. "reason": {},
  2848. "repository_url": {
  2849. "type": "string"
  2850. },
  2851. "subscribed": {
  2852. "type": "boolean"
  2853. },
  2854. "url": {
  2855. "type": "string"
  2856. }
  2857. }
  2858. },
  2859. "empty": {
  2860. "description": "APIEmpty is an empty response"
  2861. },
  2862. "error": {
  2863. "description": "APIError is error format response",
  2864. "headers": {
  2865. "message": {
  2866. "type": "string"
  2867. },
  2868. "url": {
  2869. "type": "string"
  2870. }
  2871. }
  2872. },
  2873. "forbidden": {
  2874. "description": "APIForbiddenError is a forbidden error response",
  2875. "headers": {
  2876. "message": {
  2877. "type": "string"
  2878. },
  2879. "url": {
  2880. "type": "string"
  2881. }
  2882. }
  2883. },
  2884. "notFound": {
  2885. "description": "APINotFound is a not found empty response"
  2886. },
  2887. "redirect": {
  2888. "description": "APIRedirect is a redirect response"
  2889. },
  2890. "validationError": {
  2891. "description": "APIValidationError is error format response related to input validation",
  2892. "headers": {
  2893. "message": {
  2894. "type": "string"
  2895. },
  2896. "url": {
  2897. "type": "string"
  2898. }
  2899. }
  2900. }
  2901. },
  2902. "securityDefinitions": {
  2903. "AccessToken": {
  2904. "type": "apiKey",
  2905. "name": "access_token",
  2906. "in": "query"
  2907. },
  2908. "AuthorizationHeaderToken": {
  2909. "type": "apiKey",
  2910. "name": "Authorization",
  2911. "in": "header"
  2912. },
  2913. "BasicAuth": {
  2914. "type": "basic"
  2915. },
  2916. "Token": {
  2917. "type": "apiKey",
  2918. "name": "token",
  2919. "in": "query"
  2920. }
  2921. },
  2922. "security": [
  2923. {
  2924. "BasicAuth": [
  2925. "[]"
  2926. ]
  2927. },
  2928. {
  2929. "Token": [
  2930. "[]"
  2931. ]
  2932. },
  2933. {
  2934. "AccessToken": [
  2935. "[]"
  2936. ]
  2937. },
  2938. {
  2939. "AuthorizationHeaderToken": [
  2940. "[]"
  2941. ]
  2942. }
  2943. ]
  2944. }