swagger3 project.yml 27 KB

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