swagger3 project.yml 27 KB

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