swagger3 project.yml 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012
  1. openapi: 3.0.1
  2. info:
  3. title: Project API
  4. description: |
  5. Latihan Project API
  6. - CRUD Project
  7. - Platform Relationship
  8. - Auth
  9. - Membership & Ownership
  10. - Rights & Paging
  11. version: 5.0.0
  12. servers:
  13. - url: http://localhost:8080/api/v1
  14. tags:
  15. - name: projects
  16. description: everything project
  17. - name: platforms
  18. description: everything platform
  19. - name: users
  20. description: everything user
  21. paths:
  22. /projects:
  23. get:
  24. tags:
  25. - projects
  26. summary: find all project
  27. description: return all project
  28. operationId: getProject
  29. parameters:
  30. - $ref: '#/components/parameters/page'
  31. - $ref: '#/components/parameters/limit'
  32. - $ref: '#/components/parameters/sortQuery'
  33. responses:
  34. 200:
  35. $ref: '#/components/responses/getArrayProject'
  36. 400:
  37. $ref: '#/components/responses/400'
  38. 401:
  39. $ref: '#/components/responses/UnauthorizedError'
  40. security:
  41. - testAuth: []
  42. post:
  43. tags:
  44. - projects
  45. summary: Add new Project
  46. description: Add new Project
  47. operationId: addProject
  48. requestBody:
  49. $ref: '#/components/requestBodies/Project'
  50. responses:
  51. 201:
  52. $ref: '#/components/responses/successAddProject'
  53. 400:
  54. $ref: '#/components/responses/400'
  55. 401:
  56. $ref: '#/components/responses/UnauthorizedError'
  57. 409:
  58. $ref: '#/components/responses/409'
  59. 413:
  60. $ref: '#/components/responses/413'
  61. security:
  62. - testAuth: []
  63. /projects/{projectId}:
  64. get:
  65. tags:
  66. - projects
  67. summary: find project by ID
  68. description: return project
  69. operationId: getProjectById
  70. parameters:
  71. - $ref: '#/components/parameters/projectPath'
  72. responses:
  73. 200:
  74. $ref: '#/components/responses/getSingleProject'
  75. 401:
  76. $ref: '#/components/responses/UnauthorizedError'
  77. 403:
  78. $ref: '#/components/responses/403'
  79. 404:
  80. $ref: '#/components/responses/404'
  81. security:
  82. - testAuth: []
  83. put:
  84. tags:
  85. - projects
  86. summary: update existing project by ID
  87. description: update project
  88. operationId: updateProjectById
  89. parameters:
  90. - $ref: '#/components/parameters/projectPath'
  91. requestBody:
  92. $ref: '#/components/requestBodies/Project'
  93. responses:
  94. 200:
  95. $ref: '#/components/responses/getSingleProject'
  96. 400:
  97. $ref: '#/components/responses/400'
  98. 401:
  99. $ref: '#/components/responses/UnauthorizedError'
  100. 403:
  101. $ref: '#/components/responses/403'
  102. 404:
  103. $ref: '#/components/responses/404'
  104. 409:
  105. $ref: '#/components/responses/409'
  106. 413:
  107. $ref: '#/components/responses/413'
  108. security:
  109. - testAuth: []
  110. delete:
  111. tags:
  112. - projects
  113. summary: Deletes a project
  114. description: delete a project
  115. operationId: deleteProject
  116. parameters:
  117. - $ref: '#/components/parameters/projectPath'
  118. responses:
  119. 200:
  120. description: successful operation
  121. 205:
  122. description: Unable to delete. Data is used.
  123. 401:
  124. $ref: '#/components/responses/UnauthorizedError'
  125. 403:
  126. $ref: '#/components/responses/403'
  127. security:
  128. - testAuth: []
  129. /projects/{projectId}/member:
  130. get:
  131. tags:
  132. - projects
  133. summary: find all member by project
  134. description: return all member by project
  135. operationId: getMemberByProject
  136. parameters:
  137. - $ref: '#/components/parameters/projectPath'
  138. - $ref: '#/components/parameters/roleQuery'
  139. - $ref: '#/components/parameters/page'
  140. - $ref: '#/components/parameters/limit'
  141. - name: sort
  142. in: query
  143. description: sort direction (default 'member_id, desc')
  144. schema:
  145. type: string
  146. responses:
  147. 200:
  148. $ref: '#/components/responses/getArrayMember'
  149. 400:
  150. $ref: '#/components/responses/400'
  151. 401:
  152. $ref: '#/components/responses/UnauthorizedError'
  153. security:
  154. - testAuth: []
  155. post:
  156. tags:
  157. - projects
  158. summary: add project member
  159. description: add project member
  160. operationId: addProjectMember
  161. parameters:
  162. - $ref: '#/components/parameters/projectPath'
  163. requestBody:
  164. $ref: '#/components/requestBodies/ProjectMember'
  165. responses:
  166. 201:
  167. $ref: '#/components/responses/successAddMember'
  168. 400:
  169. $ref: '#/components/responses/400'
  170. 401:
  171. $ref: '#/components/responses/UnauthorizedError'
  172. 403:
  173. $ref: '#/components/responses/403'
  174. 404:
  175. $ref: '#/components/responses/404'
  176. 409:
  177. $ref: '#/components/responses/409'
  178. security:
  179. - testAuth: []
  180. /projects/member/{memberId}:
  181. get:
  182. tags:
  183. - projects
  184. summary: find member by ID
  185. description: return member by ID
  186. operationId: getMemberProject
  187. parameters:
  188. - $ref: '#/components/parameters/memberPath'
  189. responses:
  190. 200:
  191. $ref: '#/components/responses/getSingleMember'
  192. 401:
  193. $ref: '#/components/responses/UnauthorizedError'
  194. security:
  195. - testAuth: []
  196. delete:
  197. tags:
  198. - projects
  199. summary: delete project member
  200. description: delete project member
  201. operationId: deleteProjectMember
  202. parameters:
  203. - $ref: '#/components/parameters/memberPath'
  204. responses:
  205. 200:
  206. description: successful operation
  207. 401:
  208. $ref: '#/components/responses/UnauthorizedError'
  209. 403:
  210. $ref: '#/components/responses/403'
  211. 404:
  212. $ref: '#/components/responses/404'
  213. security:
  214. - testAuth: []
  215. /platforms:
  216. get:
  217. tags:
  218. - platforms
  219. summary: find all platform of a project
  220. description: return all platform of a project
  221. operationId: getPlatformByProjectId
  222. parameters:
  223. - $ref: '#/components/parameters/projectQuery'
  224. - $ref: '#/components/parameters/page'
  225. - $ref: '#/components/parameters/limit'
  226. - name: sort
  227. in: query
  228. description: sort direction (default 'platform_id, desc')
  229. schema:
  230. type: string
  231. responses:
  232. 200:
  233. $ref: '#/components/responses/getArrayPlatform'
  234. 401:
  235. $ref: '#/components/responses/UnauthorizedError'
  236. security:
  237. - testAuth: []
  238. post:
  239. tags:
  240. - platforms
  241. summary: Add new platform for a project
  242. description: add new platform for a project
  243. operationId: addPlatformByProjectId
  244. requestBody:
  245. $ref: '#/components/requestBodies/Platform'
  246. responses:
  247. 201:
  248. $ref: '#/components/responses/successAddPlatform'
  249. 400:
  250. $ref: '#/components/responses/400'
  251. 401:
  252. $ref: '#/components/responses/UnauthorizedError'
  253. 403:
  254. $ref: '#/components/responses/403'
  255. 404:
  256. $ref: '#/components/responses/404'
  257. 409:
  258. $ref: '#/components/responses/409'
  259. 413:
  260. $ref: '#/components/responses/413'
  261. security:
  262. - testAuth: []
  263. /platforms/{platformId}:
  264. get:
  265. tags:
  266. - platforms
  267. summary: find platform by ID
  268. description: return platform by ID
  269. operationId: getPlatformById
  270. parameters:
  271. - $ref: '#/components/parameters/platformPath'
  272. responses:
  273. 200:
  274. $ref: '#/components/responses/getSinglePlatform'
  275. 401:
  276. $ref: '#/components/responses/UnauthorizedError'
  277. 404:
  278. $ref: '#/components/responses/404'
  279. security:
  280. - testAuth: []
  281. put:
  282. tags:
  283. - platforms
  284. summary: update existing platform by ID
  285. description: update platform
  286. operationId: updatePlatformById
  287. parameters:
  288. - $ref: '#/components/parameters/platformPath'
  289. requestBody:
  290. $ref: '#/components/requestBodies/Platform'
  291. responses:
  292. 200:
  293. $ref: '#/components/responses/getSinglePlatform'
  294. 400:
  295. $ref: '#/components/responses/400'
  296. 401:
  297. $ref: '#/components/responses/UnauthorizedError'
  298. 403:
  299. $ref: '#/components/responses/403'
  300. 404:
  301. $ref: '#/components/responses/404'
  302. 409:
  303. $ref: '#/components/responses/409'
  304. 413:
  305. $ref: '#/components/responses/413'
  306. security:
  307. - testAuth: []
  308. delete:
  309. tags:
  310. - platforms
  311. summary: deletes a platform by ID
  312. description: delete a platform by ID
  313. operationId: deletePlatformById
  314. parameters:
  315. - $ref: '#/components/parameters/platformPath'
  316. responses:
  317. 200:
  318. description: successful operation
  319. 401:
  320. $ref: '#/components/responses/UnauthorizedError'
  321. 403:
  322. $ref: '#/components/responses/403'
  323. 404:
  324. $ref: '#/components/responses/404'
  325. security:
  326. - testAuth: []
  327. /users:
  328. get:
  329. tags:
  330. - users
  331. summary: find all user
  332. description: return all user
  333. operationId: getUser
  334. parameters:
  335. - $ref: '#/components/parameters/page'
  336. - $ref: '#/components/parameters/limit'
  337. - $ref: '#/components/parameters/sortQuery'
  338. responses:
  339. 200:
  340. $ref: '#/components/responses/getArrayUser'
  341. 400:
  342. $ref: '#/components/responses/400'
  343. 401:
  344. $ref: '#/components/responses/UnauthorizedError'
  345. security:
  346. - testAuth: []
  347. post:
  348. tags:
  349. - users
  350. summary: add user
  351. description: add new user
  352. operationId: AddUser
  353. requestBody:
  354. $ref: '#/components/requestBodies/User'
  355. responses:
  356. 201:
  357. $ref: '#/components/responses/successAddUser'
  358. 400:
  359. $ref: '#/components/responses/400'
  360. 401:
  361. $ref: '#/components/responses/UnauthorizedError'
  362. 409:
  363. $ref: '#/components/responses/409'
  364. 413:
  365. $ref: '#/components/responses/413'
  366. security:
  367. - testAuth: []
  368. /users/{userId}:
  369. get:
  370. tags:
  371. - users
  372. summary: find user by userId
  373. description: return user by userId
  374. operationId: getUserById
  375. parameters:
  376. - $ref: '#/components/parameters/UserPath'
  377. responses:
  378. 200:
  379. $ref: '#/components/responses/getSingleUser'
  380. 401:
  381. $ref: '#/components/responses/UnauthorizedError'
  382. 404:
  383. $ref: '#/components/responses/404'
  384. security:
  385. - testAuth: []
  386. put:
  387. tags:
  388. - users
  389. summary: update existing user except password
  390. description: update user
  391. operationId: updateUserById
  392. parameters:
  393. - $ref: '#/components/parameters/UserPath'
  394. requestBody:
  395. description: User object
  396. required: true
  397. content:
  398. application/json:
  399. schema:
  400. type: object
  401. properties:
  402. username:
  403. type: string
  404. example: abi
  405. name:
  406. type: string
  407. example: abidzar
  408. responses:
  409. 200:
  410. $ref: '#/components/responses/getSingleUser'
  411. 400:
  412. $ref: '#/components/responses/400'
  413. 401:
  414. $ref: '#/components/responses/UnauthorizedError'
  415. 404:
  416. $ref: '#/components/responses/404'
  417. 409:
  418. $ref: '#/components/responses/409'
  419. 413:
  420. $ref: '#/components/responses/413'
  421. security:
  422. - testAuth: []
  423. delete:
  424. tags:
  425. - users
  426. summary: deletes a user by ID
  427. description: delete a user by ID
  428. operationId: deleteUserById
  429. parameters:
  430. - $ref: '#/components/parameters/UserPath'
  431. responses:
  432. 200:
  433. description: successful operation
  434. 205:
  435. description: Unable to delete. Data is used.
  436. 401:
  437. $ref: '#/components/responses/UnauthorizedError'
  438. 403:
  439. $ref: '#/components/responses/403'
  440. 404:
  441. $ref: '#/components/responses/404'
  442. security:
  443. - testAuth: []
  444. /users/{userId}/password:
  445. put:
  446. tags:
  447. - users
  448. summary: change password
  449. description: update user password
  450. operationId: updatePassword
  451. parameters:
  452. - $ref: '#/components/parameters/UserPath'
  453. requestBody:
  454. description: User object
  455. required: true
  456. content:
  457. application/json:
  458. schema:
  459. type: object
  460. properties:
  461. oldPassword:
  462. type: string
  463. example: abi123
  464. newPassword:
  465. type: string
  466. example: abi456
  467. responses:
  468. 200:
  469. $ref: '#/components/responses/getSingleUser'
  470. 400:
  471. $ref: '#/components/responses/400'
  472. 401:
  473. $ref: '#/components/responses/UnauthorizedError'
  474. 403:
  475. description: wrong old password
  476. 404:
  477. $ref: '#/components/responses/404'
  478. security:
  479. - testAuth: []
  480. components:
  481. schemas:
  482. Project:
  483. required:
  484. - id
  485. - name
  486. - owner
  487. type: object
  488. properties:
  489. id:
  490. type: integer
  491. uniqueItems: true
  492. example: 2
  493. name:
  494. type: string
  495. uniqueItems: true
  496. maximum: 100
  497. example: PI
  498. description:
  499. type: string
  500. maximum: 255
  501. example: PropInspector
  502. owner:
  503. $ref: '#/components/schemas/User'
  504. Platform:
  505. type: object
  506. required:
  507. - id
  508. - name
  509. properties:
  510. id:
  511. type: integer
  512. uniqueItems: true
  513. example: 3
  514. name:
  515. type: string
  516. uniqueItems: true
  517. maximum: 100
  518. example: mobile
  519. project_id:
  520. $ref: '#/components/schemas/Project'
  521. User:
  522. type: object
  523. required:
  524. - id
  525. - username
  526. - password
  527. - name
  528. properties:
  529. id:
  530. type: integer
  531. uniqueItems: true
  532. example: 4
  533. username:
  534. type: string
  535. uniqueItems: true
  536. maximum: 100
  537. example: abi
  538. password:
  539. type: string
  540. maximum: 100
  541. example: abi123
  542. name:
  543. type: string
  544. maximum: 255
  545. example: abidzar
  546. project_member:
  547. type: object
  548. properties:
  549. id:
  550. type: integer
  551. uniqueItems: true
  552. project:
  553. $ref: '#/components/schemas/Project'
  554. user:
  555. $ref: '#/components/schemas/User'
  556. role:
  557. type: number
  558. enum: [0,1,2]
  559. description: role = 0.QC, 1. Programmer, 2.Admin
  560. required:
  561. - id
  562. - project
  563. - user
  564. - role
  565. PaginatedResult:
  566. type: object
  567. properties:
  568. totalPage: { type: number, example: 2 }
  569. currentPage: { type: number, example: 0 }
  570. totalRecord: { type: number, example: 4 }
  571. results: { type: array, items: {} }
  572. parameters:
  573. projectPath:
  574. name: projectId
  575. in: path
  576. description: Project ID
  577. required: true
  578. schema:
  579. type: integer
  580. platformPath:
  581. name: platformId
  582. in: path
  583. description: Platform ID
  584. required: true
  585. schema:
  586. type: integer
  587. UserPath:
  588. name: userId
  589. in: path
  590. description: User ID
  591. required: true
  592. schema:
  593. type: integer
  594. projectQuery:
  595. name: project
  596. in: query
  597. description: Project ID
  598. schema:
  599. type: integer
  600. memberPath:
  601. name: memberId
  602. in: path
  603. description: Project Member ID
  604. required: true
  605. schema:
  606. type: integer
  607. limit:
  608. name: limit
  609. in: query
  610. description: Number of records to return (default 3)
  611. schema:
  612. type: number
  613. minimum: 1
  614. page:
  615. name: page
  616. in: query
  617. description: Number of page to return (default 0)
  618. schema:
  619. type: number
  620. minimum: 0
  621. roleQuery:
  622. name: role
  623. in: query
  624. description: filter role
  625. schema:
  626. type: string
  627. sortQuery:
  628. name: sort
  629. in: query
  630. description: sort direction (default 'id, desc')
  631. schema:
  632. type: string
  633. responses:
  634. getArrayProject:
  635. description: successful operation
  636. content:
  637. application/json:
  638. schema:
  639. type: object
  640. allOf:
  641. - $ref: '#/components/schemas/PaginatedResult'
  642. - type: object
  643. properties:
  644. results:
  645. type: array
  646. items:
  647. properties:
  648. id:
  649. type: integer
  650. example: 1
  651. name:
  652. type: string
  653. example: TM
  654. description:
  655. type: string
  656. example: TelMesengger
  657. owner:
  658. properties:
  659. id:
  660. type: integer
  661. example: 1
  662. username:
  663. type: string
  664. example: abi
  665. name:
  666. type: string
  667. example: abidzar
  668. getSingleProject:
  669. description: successful operation
  670. content:
  671. application/json:
  672. schema:
  673. properties:
  674. id:
  675. type: integer
  676. example: 1
  677. name:
  678. type: string
  679. example: TM
  680. description:
  681. type: string
  682. example: TelMesengger
  683. owner:
  684. properties:
  685. id:
  686. type: integer
  687. example: 1
  688. username:
  689. type: string
  690. example: abi
  691. name:
  692. type: string
  693. example: abidzar
  694. successAddProject:
  695. description: record successfully added
  696. content:
  697. application/json:
  698. schema:
  699. properties:
  700. id:
  701. type: integer
  702. example: 1
  703. name:
  704. type: string
  705. example: TM
  706. description:
  707. type: string
  708. example: TelMesengger
  709. owner:
  710. properties:
  711. id:
  712. type: integer
  713. example: 1
  714. username:
  715. type: string
  716. example: abi
  717. name:
  718. type: string
  719. example: abidzar
  720. successAddMember:
  721. description: record successfully added
  722. content:
  723. application/json:
  724. schema:
  725. properties:
  726. id:
  727. type: integer
  728. example: 1
  729. project:
  730. example: TelMessenger
  731. user:
  732. example: abidzar
  733. role:
  734. type: string
  735. example: QC
  736. getArrayPlatform:
  737. description: successful operation
  738. content:
  739. application/json:
  740. schema:
  741. type: object
  742. allOf:
  743. - $ref: '#/components/schemas/PaginatedResult'
  744. - type: object
  745. properties:
  746. results:
  747. type: array
  748. items:
  749. properties:
  750. id:
  751. type: integer
  752. example: 1
  753. name:
  754. type: string
  755. example: mobile
  756. project_id:
  757. properties:
  758. id:
  759. type: integer
  760. example: 1
  761. name:
  762. type: string
  763. example: TM
  764. description:
  765. type: string
  766. example: TelMessenger
  767. owner:
  768. properties:
  769. id:
  770. type: integer
  771. example: 1
  772. username:
  773. type: string
  774. example: abi
  775. name:
  776. type: string
  777. example: abidzar
  778. successAddPlatform:
  779. description: record successfully added
  780. content:
  781. application/json:
  782. schema:
  783. properties:
  784. id:
  785. type: integer
  786. example: 1
  787. name:
  788. type: string
  789. example: mobile
  790. project_id:
  791. properties:
  792. id:
  793. type: integer
  794. example: 1
  795. name:
  796. type: string
  797. example: TM
  798. description:
  799. type: string
  800. example: TelMessenger
  801. owner:
  802. properties:
  803. id:
  804. type: integer
  805. example: 1
  806. username:
  807. type: string
  808. example: abi
  809. name:
  810. type: string
  811. example: abidzar
  812. getSinglePlatform:
  813. description: successful operation
  814. content:
  815. application/json:
  816. schema:
  817. properties:
  818. id:
  819. type: integer
  820. example: 1
  821. name:
  822. type: string
  823. example: mobile
  824. project_id:
  825. properties:
  826. id:
  827. type: integer
  828. example: 1
  829. name:
  830. type: string
  831. example: TM
  832. description:
  833. type: string
  834. example: TelMessenger
  835. owner:
  836. properties:
  837. id:
  838. type: integer
  839. example: 1
  840. username:
  841. type: string
  842. example: abi
  843. name:
  844. type: string
  845. example: abidzar
  846. getArrayUser:
  847. description: successful operation
  848. content:
  849. application/json:
  850. schema:
  851. type: object
  852. allOf:
  853. - $ref: '#/components/schemas/PaginatedResult'
  854. - type: object
  855. properties:
  856. results:
  857. type: array
  858. items:
  859. properties:
  860. id:
  861. type: integer
  862. example: 1
  863. username:
  864. type: string
  865. example: abi
  866. name:
  867. type: string
  868. example: abidzar
  869. successAddUser:
  870. description: record successfully added
  871. content:
  872. application/json:
  873. schema:
  874. properties:
  875. id:
  876. type: integer
  877. example: 1
  878. username:
  879. type: string
  880. example: abi
  881. name:
  882. type: string
  883. example: abidzar
  884. getSingleUser:
  885. description: successful operation
  886. content:
  887. application/json:
  888. schema:
  889. properties:
  890. id:
  891. type: integer
  892. example: 1
  893. username:
  894. type: string
  895. example: abi
  896. name:
  897. type: string
  898. example: abidzar
  899. getSingleMember:
  900. description: successful operation
  901. content:
  902. application/json:
  903. schema:
  904. properties:
  905. id:
  906. example: 1
  907. project:
  908. example: TelMessenger
  909. user:
  910. example: abidzar
  911. role:
  912. example: QC
  913. getArrayMember:
  914. description: successful operation
  915. content:
  916. application/json:
  917. schema:
  918. type: object
  919. allOf:
  920. - $ref: '#/components/schemas/PaginatedResult'
  921. - type: object
  922. properties:
  923. results:
  924. type: array
  925. items:
  926. properties:
  927. id:
  928. example: 1
  929. project:
  930. example: TelMessenger
  931. user:
  932. example: abidzar
  933. role:
  934. example: QC
  935. 400:
  936. description: invalid data
  937. 403:
  938. description: do not have rights
  939. UnauthorizedError:
  940. description: Authentication information is missing or invalid
  941. 404:
  942. description: not found
  943. 409:
  944. description: duplicate data
  945. 413:
  946. description: content too large
  947. requestBodies:
  948. Project:
  949. description: Project object
  950. required: true
  951. content:
  952. application/json:
  953. schema:
  954. type: object
  955. properties:
  956. name:
  957. type: string
  958. example: TM
  959. description:
  960. type: string
  961. example: TelMesengger
  962. ProjectMember:
  963. description: project member object
  964. required: true
  965. content:
  966. application/json:
  967. schema:
  968. type: object
  969. properties:
  970. user_id:
  971. type: integer
  972. example: 1
  973. role:
  974. type: string
  975. example: qc
  976. Platform:
  977. description: Platform object
  978. required: true
  979. content:
  980. application/json:
  981. schema:
  982. type: object
  983. properties:
  984. name:
  985. type: string
  986. example: web
  987. project_name:
  988. type: string
  989. example: TM
  990. User:
  991. description: User object
  992. required: true
  993. content:
  994. application/json:
  995. schema:
  996. type: object
  997. properties:
  998. username:
  999. type: string
  1000. example: abi
  1001. password:
  1002. type: string
  1003. example: abi123
  1004. name:
  1005. type: string
  1006. example: abidzar
  1007. securitySchemes:
  1008. testAuth:
  1009. type: http
  1010. scheme: basic
  1011. description: use `user`/`password` to login