swagger3 project.yml 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450
  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. - Bug
  12. version: 6.0.0
  13. servers:
  14. - url: http://localhost:8080/api/v1
  15. tags:
  16. - name: projects
  17. description: everything project
  18. - name: platforms
  19. description: everything platform
  20. - name: users
  21. description: everything user
  22. - name: bugs
  23. description: everything bug
  24. - name: comments
  25. description: everything comment
  26. paths:
  27. /projects:
  28. get:
  29. tags:
  30. - projects
  31. summary: find all project
  32. description: return all project
  33. operationId: getProject
  34. parameters:
  35. - $ref: '#/components/parameters/page'
  36. - $ref: '#/components/parameters/limit'
  37. - name: sort
  38. in: query
  39. description: sort direction (default 'project_id, desc')
  40. schema:
  41. type: string
  42. responses:
  43. 200:
  44. $ref: '#/components/responses/getArrayProject'
  45. 400:
  46. $ref: '#/components/responses/400'
  47. 401:
  48. $ref: '#/components/responses/UnauthorizedError'
  49. security:
  50. - testAuth: []
  51. post:
  52. tags:
  53. - projects
  54. summary: Add new Project
  55. description: Add new Project
  56. operationId: addProject
  57. requestBody:
  58. $ref: '#/components/requestBodies/Project'
  59. responses:
  60. 201:
  61. $ref: '#/components/responses/successAddProject'
  62. 400:
  63. $ref: '#/components/responses/400'
  64. 401:
  65. $ref: '#/components/responses/UnauthorizedError'
  66. 409:
  67. $ref: '#/components/responses/409'
  68. 413:
  69. $ref: '#/components/responses/413'
  70. security:
  71. - testAuth: []
  72. /projects/{projectId}:
  73. get:
  74. tags:
  75. - projects
  76. summary: find project by ID
  77. description: return project
  78. operationId: getProjectById
  79. parameters:
  80. - $ref: '#/components/parameters/projectPath'
  81. responses:
  82. 200:
  83. $ref: '#/components/responses/getSingleProject'
  84. 401:
  85. $ref: '#/components/responses/UnauthorizedError'
  86. 403:
  87. $ref: '#/components/responses/403'
  88. 404:
  89. $ref: '#/components/responses/404'
  90. security:
  91. - testAuth: []
  92. put:
  93. tags:
  94. - projects
  95. summary: update existing project by ID
  96. description: update project
  97. operationId: updateProjectById
  98. parameters:
  99. - $ref: '#/components/parameters/projectPath'
  100. requestBody:
  101. $ref: '#/components/requestBodies/Project'
  102. responses:
  103. 200:
  104. $ref: '#/components/responses/getSingleProject'
  105. 400:
  106. $ref: '#/components/responses/400'
  107. 401:
  108. $ref: '#/components/responses/UnauthorizedError'
  109. 403:
  110. $ref: '#/components/responses/403'
  111. 404:
  112. $ref: '#/components/responses/404'
  113. 409:
  114. $ref: '#/components/responses/409'
  115. 413:
  116. $ref: '#/components/responses/413'
  117. security:
  118. - testAuth: []
  119. delete:
  120. tags:
  121. - projects
  122. summary: Deletes a project
  123. description: delete a project
  124. operationId: deleteProject
  125. parameters:
  126. - $ref: '#/components/parameters/projectPath'
  127. responses:
  128. 200:
  129. description: successful operation
  130. 205:
  131. description: Unable to delete. Data is used.
  132. 401:
  133. $ref: '#/components/responses/UnauthorizedError'
  134. 403:
  135. $ref: '#/components/responses/403'
  136. security:
  137. - testAuth: []
  138. /projects/{projectId}/member:
  139. get:
  140. tags:
  141. - projects
  142. summary: find all member by project
  143. description: return all member by project
  144. operationId: getMemberByProject
  145. parameters:
  146. - $ref: '#/components/parameters/projectPath'
  147. - $ref: '#/components/parameters/roleQuery'
  148. - $ref: '#/components/parameters/page'
  149. - $ref: '#/components/parameters/limit'
  150. - $ref: '#/components/parameters/sortQuery'
  151. responses:
  152. 200:
  153. $ref: '#/components/responses/getArrayMember'
  154. 400:
  155. $ref: '#/components/responses/400'
  156. 401:
  157. $ref: '#/components/responses/UnauthorizedError'
  158. security:
  159. - testAuth: []
  160. post:
  161. tags:
  162. - projects
  163. summary: add project member
  164. description: add project member
  165. operationId: addProjectMember
  166. parameters:
  167. - $ref: '#/components/parameters/projectPath'
  168. requestBody:
  169. $ref: '#/components/requestBodies/ProjectMember'
  170. responses:
  171. 201:
  172. $ref: '#/components/responses/successAddMember'
  173. 400:
  174. $ref: '#/components/responses/400'
  175. 401:
  176. $ref: '#/components/responses/UnauthorizedError'
  177. 403:
  178. $ref: '#/components/responses/403'
  179. 404:
  180. $ref: '#/components/responses/404'
  181. 409:
  182. $ref: '#/components/responses/409'
  183. security:
  184. - testAuth: []
  185. /projects/member/{memberId}:
  186. get:
  187. tags:
  188. - projects
  189. summary: find member by ID
  190. description: return member by ID
  191. operationId: getMemberProject
  192. parameters:
  193. - $ref: '#/components/parameters/memberPath'
  194. responses:
  195. 200:
  196. $ref: '#/components/responses/getSingleMember'
  197. 401:
  198. $ref: '#/components/responses/UnauthorizedError'
  199. security:
  200. - testAuth: []
  201. delete:
  202. tags:
  203. - projects
  204. summary: delete project member
  205. description: delete project member
  206. operationId: deleteProjectMember
  207. parameters:
  208. - $ref: '#/components/parameters/memberPath'
  209. responses:
  210. 200:
  211. description: successful operation
  212. 401:
  213. $ref: '#/components/responses/UnauthorizedError'
  214. 403:
  215. $ref: '#/components/responses/403'
  216. 404:
  217. $ref: '#/components/responses/404'
  218. security:
  219. - testAuth: []
  220. /platforms:
  221. get:
  222. tags:
  223. - platforms
  224. summary: find all platform of a project
  225. description: return all platform of a project
  226. operationId: getPlatformByProjectId
  227. parameters:
  228. - $ref: '#/components/parameters/projectQuery'
  229. - $ref: '#/components/parameters/page'
  230. - $ref: '#/components/parameters/limit'
  231. - name: sort
  232. in: query
  233. description: sort direction (default 'platform_id, desc')
  234. schema:
  235. type: string
  236. responses:
  237. 200:
  238. $ref: '#/components/responses/getArrayPlatform'
  239. 400:
  240. $ref: '#/components/responses/400'
  241. 401:
  242. $ref: '#/components/responses/UnauthorizedError'
  243. security:
  244. - testAuth: []
  245. post:
  246. tags:
  247. - platforms
  248. summary: Add new platform for a project
  249. description: add new platform for a project
  250. operationId: addPlatformByProjectId
  251. requestBody:
  252. $ref: '#/components/requestBodies/Platform'
  253. responses:
  254. 201:
  255. $ref: '#/components/responses/successAddPlatform'
  256. 400:
  257. $ref: '#/components/responses/400'
  258. 401:
  259. $ref: '#/components/responses/UnauthorizedError'
  260. 403:
  261. $ref: '#/components/responses/403'
  262. 404:
  263. $ref: '#/components/responses/404'
  264. 409:
  265. $ref: '#/components/responses/409'
  266. 413:
  267. $ref: '#/components/responses/413'
  268. security:
  269. - testAuth: []
  270. /platforms/{platformId}:
  271. get:
  272. tags:
  273. - platforms
  274. summary: find platform by ID
  275. description: return platform by ID
  276. operationId: getPlatformById
  277. parameters:
  278. - $ref: '#/components/parameters/platformPath'
  279. responses:
  280. 200:
  281. $ref: '#/components/responses/getSinglePlatform'
  282. 401:
  283. $ref: '#/components/responses/UnauthorizedError'
  284. 404:
  285. $ref: '#/components/responses/404'
  286. security:
  287. - testAuth: []
  288. put:
  289. tags:
  290. - platforms
  291. summary: update existing platform by ID
  292. description: update platform
  293. operationId: updatePlatformById
  294. parameters:
  295. - $ref: '#/components/parameters/platformPath'
  296. requestBody:
  297. $ref: '#/components/requestBodies/Platform'
  298. responses:
  299. 200:
  300. $ref: '#/components/responses/getSinglePlatform'
  301. 400:
  302. $ref: '#/components/responses/400'
  303. 401:
  304. $ref: '#/components/responses/UnauthorizedError'
  305. 403:
  306. $ref: '#/components/responses/403'
  307. 404:
  308. $ref: '#/components/responses/404'
  309. 409:
  310. $ref: '#/components/responses/409'
  311. 413:
  312. $ref: '#/components/responses/413'
  313. security:
  314. - testAuth: []
  315. delete:
  316. tags:
  317. - platforms
  318. summary: deletes a platform by ID
  319. description: delete a platform by ID
  320. operationId: deletePlatformById
  321. parameters:
  322. - $ref: '#/components/parameters/platformPath'
  323. responses:
  324. 200:
  325. description: successful operation
  326. 205:
  327. description: Unable to delete. Data is used.
  328. 401:
  329. $ref: '#/components/responses/UnauthorizedError'
  330. 403:
  331. $ref: '#/components/responses/403'
  332. 404:
  333. $ref: '#/components/responses/404'
  334. security:
  335. - testAuth: []
  336. /users:
  337. get:
  338. tags:
  339. - users
  340. summary: find all user
  341. description: return all user
  342. operationId: getUser
  343. parameters:
  344. - $ref: '#/components/parameters/page'
  345. - $ref: '#/components/parameters/limit'
  346. - $ref: '#/components/parameters/sortQuery'
  347. responses:
  348. 200:
  349. $ref: '#/components/responses/getArrayUser'
  350. 400:
  351. $ref: '#/components/responses/400'
  352. 401:
  353. $ref: '#/components/responses/UnauthorizedError'
  354. security:
  355. - testAuth: []
  356. post:
  357. tags:
  358. - users
  359. summary: add user
  360. description: add new user
  361. operationId: AddUser
  362. requestBody:
  363. $ref: '#/components/requestBodies/User'
  364. responses:
  365. 201:
  366. $ref: '#/components/responses/successAddUser'
  367. 400:
  368. $ref: '#/components/responses/400'
  369. 401:
  370. $ref: '#/components/responses/UnauthorizedError'
  371. 409:
  372. $ref: '#/components/responses/409'
  373. 413:
  374. $ref: '#/components/responses/413'
  375. security:
  376. - testAuth: []
  377. /users/{userId}:
  378. get:
  379. tags:
  380. - users
  381. summary: find user by userId
  382. description: return user by userId
  383. operationId: getUserById
  384. parameters:
  385. - $ref: '#/components/parameters/UserPath'
  386. responses:
  387. 200:
  388. $ref: '#/components/responses/getSingleUser'
  389. 401:
  390. $ref: '#/components/responses/UnauthorizedError'
  391. 404:
  392. $ref: '#/components/responses/404'
  393. security:
  394. - testAuth: []
  395. put:
  396. tags:
  397. - users
  398. summary: update existing user except password
  399. description: update user
  400. operationId: updateUserById
  401. parameters:
  402. - $ref: '#/components/parameters/UserPath'
  403. requestBody:
  404. description: User object
  405. required: true
  406. content:
  407. application/json:
  408. schema:
  409. type: object
  410. properties:
  411. username:
  412. type: string
  413. example: abi
  414. name:
  415. type: string
  416. example: abidzar
  417. responses:
  418. 200:
  419. $ref: '#/components/responses/getSingleUser'
  420. 400:
  421. $ref: '#/components/responses/400'
  422. 401:
  423. $ref: '#/components/responses/UnauthorizedError'
  424. 404:
  425. $ref: '#/components/responses/404'
  426. 409:
  427. $ref: '#/components/responses/409'
  428. 413:
  429. $ref: '#/components/responses/413'
  430. security:
  431. - testAuth: []
  432. delete:
  433. tags:
  434. - users
  435. summary: deletes a user by ID
  436. description: delete a user by ID
  437. operationId: deleteUserById
  438. parameters:
  439. - $ref: '#/components/parameters/UserPath'
  440. responses:
  441. 200:
  442. description: successful operation
  443. 205:
  444. description: Unable to delete. Data is used.
  445. 401:
  446. $ref: '#/components/responses/UnauthorizedError'
  447. 403:
  448. $ref: '#/components/responses/403'
  449. 404:
  450. $ref: '#/components/responses/404'
  451. security:
  452. - testAuth: []
  453. /users/{userId}/password:
  454. put:
  455. tags:
  456. - users
  457. summary: change password
  458. description: update user password
  459. operationId: updatePassword
  460. parameters:
  461. - $ref: '#/components/parameters/UserPath'
  462. requestBody:
  463. description: User object
  464. required: true
  465. content:
  466. application/json:
  467. schema:
  468. type: object
  469. properties:
  470. oldPassword:
  471. type: string
  472. example: abi123
  473. newPassword:
  474. type: string
  475. example: abi456
  476. responses:
  477. 200:
  478. $ref: '#/components/responses/getSingleUser'
  479. 400:
  480. $ref: '#/components/responses/400'
  481. 401:
  482. $ref: '#/components/responses/UnauthorizedError'
  483. 403:
  484. description: wrong old password
  485. 404:
  486. $ref: '#/components/responses/404'
  487. security:
  488. - testAuth: []
  489. /bugs:
  490. get:
  491. tags:
  492. - bugs
  493. summary: find all bugs
  494. description: return all bugs
  495. operationId: getBug
  496. parameters:
  497. - $ref: '#/components/parameters/page'
  498. - $ref: '#/components/parameters/limit'
  499. - $ref: '#/components/parameters/sortQuery'
  500. responses:
  501. 200:
  502. $ref: '#/components/responses/getArrayBug'
  503. 400:
  504. $ref: '#/components/responses/400'
  505. 401:
  506. $ref: '#/components/responses/UnauthorizedError'
  507. security:
  508. - testAuth: []
  509. post:
  510. tags:
  511. - bugs
  512. summary: add bug
  513. description: add new bug
  514. operationId: addBug
  515. requestBody:
  516. $ref: '#/components/requestBodies/Bug'
  517. responses:
  518. 201:
  519. $ref: '#/components/responses/successAddBug'
  520. 400:
  521. $ref: '#/components/responses/400'
  522. 401:
  523. $ref: '#/components/responses/UnauthorizedError'
  524. 404:
  525. $ref: '#/components/responses/404'
  526. 409:
  527. $ref: '#/components/responses/409'
  528. 413:
  529. $ref: '#/components/responses/413'
  530. security:
  531. - testAuth: []
  532. /bugs/{bugId}:
  533. get:
  534. tags:
  535. - bugs
  536. summary: find bug by ID
  537. description: return bug
  538. operationId: getBugById
  539. parameters:
  540. - $ref: '#/components/parameters/bugPath'
  541. responses:
  542. 200:
  543. $ref: '#/components/responses/getSingleBug'
  544. 401:
  545. $ref: '#/components/responses/UnauthorizedError'
  546. 404:
  547. $ref: '#/components/responses/404'
  548. security:
  549. - testAuth: []
  550. put:
  551. tags:
  552. - bugs
  553. summary: update existing bug
  554. description: update bug
  555. operationId: updateBugById
  556. parameters:
  557. - $ref: '#/components/parameters/bugPath'
  558. requestBody:
  559. description: Bug object | level (note, minor, major) status (onprogress, done, hold, cancel) dev_status (notstart, onprogress, done)
  560. required: true
  561. content:
  562. application/json:
  563. schema:
  564. type: object
  565. properties:
  566. description:
  567. example: bug browser
  568. qc:
  569. example: 23
  570. dev:
  571. example: 24
  572. platform:
  573. example: web
  574. goodday_url:
  575. example: goodday.com
  576. image_url:
  577. example: image.com
  578. level:
  579. example: major
  580. status:
  581. example: onprogress
  582. dev_status:
  583. example: notstart
  584. responses:
  585. 200:
  586. $ref: '#/components/responses/getSingleBug'
  587. 400:
  588. $ref: '#/components/responses/400'
  589. 401:
  590. $ref: '#/components/responses/UnauthorizedError'
  591. 403:
  592. $ref: '#/components/responses/403'
  593. 404:
  594. $ref: '#/components/responses/404'
  595. 409:
  596. $ref: '#/components/responses/409'
  597. 413:
  598. $ref: '#/components/responses/413'
  599. security:
  600. - testAuth: []
  601. delete:
  602. tags:
  603. - bugs
  604. summary: deletes a bug by ID
  605. description: delete a bug by ID
  606. operationId: deleteBugById
  607. parameters:
  608. - $ref: '#/components/parameters/bugPath'
  609. responses:
  610. 200:
  611. description: successful operation
  612. 205:
  613. description: Unable to delete. Data is used.
  614. 401:
  615. $ref: '#/components/responses/UnauthorizedError'
  616. 403:
  617. $ref: '#/components/responses/403'
  618. 404:
  619. $ref: '#/components/responses/404'
  620. security:
  621. - testAuth: []
  622. /bugs/{bugId}/comment:
  623. get:
  624. tags:
  625. - bugs
  626. summary: find all comments by bug ID
  627. description: return all comments by bug ID
  628. operationId: getCommentByBug
  629. parameters:
  630. - $ref: '#/components/parameters/bugPath'
  631. - $ref: '#/components/parameters/page'
  632. - $ref: '#/components/parameters/limit'
  633. - name: sort
  634. in: query
  635. description: sort direction (default 'comment_id, desc')
  636. schema:
  637. type: string
  638. responses:
  639. 200:
  640. $ref: '#/components/responses/getArrayComment'
  641. 400:
  642. $ref: '#/components/responses/400'
  643. 401:
  644. $ref: '#/components/responses/UnauthorizedError'
  645. 404:
  646. $ref: '#/components/responses/404'
  647. security:
  648. - testAuth: []
  649. post:
  650. tags:
  651. - bugs
  652. summary: add comment
  653. description: add new comment
  654. operationId: addComment
  655. parameters:
  656. - $ref: '#/components/parameters/bugPath'
  657. requestBody:
  658. $ref: '#/components/requestBodies/Comment'
  659. responses:
  660. 201:
  661. $ref: '#/components/responses/successAddComment'
  662. 400:
  663. $ref: '#/components/responses/400'
  664. 401:
  665. $ref: '#/components/responses/UnauthorizedError'
  666. 404:
  667. $ref: '#/components/responses/404'
  668. 413:
  669. $ref: '#/components/responses/413'
  670. security:
  671. - testAuth: []
  672. /comments/{commentId}:
  673. get:
  674. tags:
  675. - comments
  676. summary: find comment by ID
  677. description: return comment
  678. operationId: getCommentById
  679. parameters:
  680. - $ref: '#/components/parameters/commentPath'
  681. responses:
  682. 200:
  683. $ref: '#/components/responses/getSingleComment'
  684. 401:
  685. $ref: '#/components/responses/UnauthorizedError'
  686. 404:
  687. $ref: '#/components/responses/404'
  688. security:
  689. - testAuth: []
  690. delete:
  691. tags:
  692. - comments
  693. summary: deletes a comment by ID
  694. description: delete a comment by ID
  695. operationId: deleteCommentById
  696. parameters:
  697. - $ref: '#/components/parameters/commentPath'
  698. responses:
  699. 200:
  700. description: successful operation
  701. 401:
  702. $ref: '#/components/responses/UnauthorizedError'
  703. 403:
  704. $ref: '#/components/responses/403'
  705. 404:
  706. $ref: '#/components/responses/404'
  707. security:
  708. - testAuth: []
  709. components:
  710. schemas:
  711. Project:
  712. required:
  713. - id
  714. - name
  715. - owner
  716. type: object
  717. properties:
  718. id:
  719. type: integer
  720. uniqueItems: true
  721. example: 2
  722. name:
  723. type: string
  724. uniqueItems: true
  725. maximum: 100
  726. example: PI
  727. description:
  728. type: string
  729. maximum: 255
  730. example: PropInspector
  731. owner:
  732. $ref: '#/components/schemas/User'
  733. Platform:
  734. type: object
  735. required:
  736. - id
  737. - name
  738. properties:
  739. id:
  740. type: integer
  741. uniqueItems: true
  742. example: 3
  743. name:
  744. type: string
  745. uniqueItems: true
  746. maximum: 100
  747. example: mobile
  748. project_id:
  749. $ref: '#/components/schemas/Project'
  750. User:
  751. type: object
  752. required:
  753. - id
  754. - username
  755. - password
  756. - name
  757. properties:
  758. id:
  759. type: integer
  760. uniqueItems: true
  761. example: 4
  762. username:
  763. type: string
  764. uniqueItems: true
  765. maximum: 100
  766. example: abi
  767. password:
  768. type: string
  769. maximum: 100
  770. example: abi123
  771. name:
  772. type: string
  773. maximum: 255
  774. example: abidzar
  775. Project_member:
  776. type: object
  777. properties:
  778. id:
  779. type: integer
  780. uniqueItems: true
  781. project:
  782. $ref: '#/components/schemas/Project'
  783. user:
  784. $ref: '#/components/schemas/User'
  785. role:
  786. type: number
  787. enum: [0,1,2]
  788. description: role = 0.QC, 1.Programmer, 2.Admin
  789. required:
  790. - id
  791. - project
  792. - user
  793. - role
  794. Bug:
  795. type: object
  796. properties:
  797. id:
  798. type: integer
  799. uniqueItems: true
  800. created:
  801. type: string
  802. format: date-time
  803. description:
  804. type: string
  805. maximum: 500
  806. qc:
  807. $ref: '#/components/schemas/User'
  808. dev:
  809. $ref: '#/components/schemas/User'
  810. platform:
  811. $ref: '#/components/schemas/Platform'
  812. goodday_url:
  813. type: string
  814. format: url
  815. image_url:
  816. type: string
  817. format: url
  818. level:
  819. type: number
  820. enum: [0,1,2]
  821. description: level = 0.Note, 1.Minor, 2.Major
  822. status:
  823. type: number
  824. enum: [0,1,2,3]
  825. description: status = 0.onProgress, 1.done, 2.hold, 3.cancel
  826. dev_status:
  827. type: number
  828. enum: [0,1,2]
  829. description: dev_status = 0.notStart, 1.onProgress, 2.done
  830. required:
  831. - id
  832. - created
  833. - description
  834. - qc
  835. - dev
  836. - platform
  837. - goodday_url
  838. - level
  839. - status
  840. - dev_status
  841. Comment:
  842. type: object
  843. properties:
  844. id:
  845. type: integer
  846. uniqueItems: true
  847. bug:
  848. $ref: '#/components/schemas/Bug'
  849. creator:
  850. $ref: '#/components/schemas/User'
  851. created:
  852. type: string
  853. format: date-time
  854. content:
  855. type: string
  856. maximum: 500
  857. required:
  858. - id
  859. - bug
  860. - creator
  861. - created
  862. - content
  863. paginatedResult:
  864. type: object
  865. properties:
  866. totalPage: { type: number, example: 2 }
  867. currentPage: { type: number, example: 0 }
  868. totalRecord: { type: number, example: 4 }
  869. results: { type: array, items: {} }
  870. parameters:
  871. projectPath:
  872. name: projectId
  873. in: path
  874. description: Project ID
  875. required: true
  876. schema:
  877. type: integer
  878. platformPath:
  879. name: platformId
  880. in: path
  881. description: Platform ID
  882. required: true
  883. schema:
  884. type: integer
  885. UserPath:
  886. name: userId
  887. in: path
  888. description: User ID
  889. required: true
  890. schema:
  891. type: integer
  892. projectQuery:
  893. name: project
  894. in: query
  895. description: Project ID
  896. schema:
  897. type: integer
  898. memberPath:
  899. name: memberId
  900. in: path
  901. description: Project Member ID
  902. required: true
  903. schema:
  904. type: integer
  905. limit:
  906. name: limit
  907. in: query
  908. description: Number of records to return (default 3)
  909. schema:
  910. type: number
  911. minimum: 1
  912. page:
  913. name: page
  914. in: query
  915. description: Number of page to return (default 0)
  916. schema:
  917. type: number
  918. minimum: 0
  919. roleQuery:
  920. name: role
  921. in: query
  922. description: filter role (role = QC, Programmer, Admin)
  923. schema:
  924. type: string
  925. sortQuery:
  926. name: sort
  927. in: query
  928. description: sort direction (default 'id, desc')
  929. schema:
  930. type: string
  931. bugPath:
  932. name: bugId
  933. in: path
  934. description: Bug ID
  935. required: true
  936. schema:
  937. type: integer
  938. commentPath:
  939. name: commentId
  940. in: path
  941. description: Comment ID
  942. required: true
  943. schema:
  944. type: integer
  945. responses:
  946. getSingleComment:
  947. description: successful operation
  948. content:
  949. application/json:
  950. schema:
  951. properties:
  952. id:
  953. example: 8
  954. bug:
  955. example: error mobile
  956. creator:
  957. example: irma
  958. created:
  959. example: 22-Nov-2023 11:23:22
  960. content:
  961. example: qc error mobile done
  962. successAddComment:
  963. description: record succesfully added
  964. content:
  965. application/json:
  966. schema:
  967. properties:
  968. id:
  969. example: 15
  970. bug:
  971. example: error web
  972. creator:
  973. example: arif
  974. created:
  975. example: 04-Jul-2023 11:23:22
  976. content:
  977. example: error web mulai dikerjakan
  978. getArrayComment:
  979. description: successful operation
  980. content:
  981. application/json:
  982. schema:
  983. type: object
  984. allOf:
  985. - $ref: '#/components/schemas/paginatedResult'
  986. - type: object
  987. properties:
  988. results:
  989. type: array
  990. items:
  991. properties:
  992. id:
  993. example: 3
  994. bug:
  995. example: bug web
  996. creator:
  997. example: dama
  998. created:
  999. example: 15-Ags-2023 11:23:22
  1000. content:
  1001. example: web sudah done
  1002. getSingleBug:
  1003. description: successful operation
  1004. content:
  1005. application/json:
  1006. schema:
  1007. properties:
  1008. id:
  1009. example: 1
  1010. created:
  1011. example: 01-Feb-2023 11:23:22
  1012. description:
  1013. example: error button
  1014. qc:
  1015. example: irma
  1016. dev:
  1017. example: dama
  1018. platform:
  1019. example: mobile
  1020. goodday_url:
  1021. example: goodday.com
  1022. image_url:
  1023. example: image.com
  1024. level:
  1025. example: minor
  1026. status:
  1027. example: onprogress
  1028. dev_status:
  1029. example: done
  1030. successAddBug:
  1031. description: record succesfully added
  1032. content:
  1033. application/json:
  1034. schema:
  1035. properties:
  1036. id:
  1037. example: 2
  1038. created:
  1039. example: 23-Mar-2023 11:23:22
  1040. description:
  1041. example: bug browser
  1042. qc:
  1043. example: mita
  1044. dev:
  1045. example: agus
  1046. platform:
  1047. example: mobile
  1048. goodday_url:
  1049. example: goodday.com
  1050. image_url:
  1051. example: image.com
  1052. level:
  1053. example: minor
  1054. status:
  1055. example: onprogress
  1056. dev_status:
  1057. example: notstart
  1058. getArrayBug:
  1059. description: successful operation
  1060. content:
  1061. application/json:
  1062. schema:
  1063. type: object
  1064. allOf:
  1065. - $ref: '#/components/schemas/paginatedResult'
  1066. - type: object
  1067. properties:
  1068. results:
  1069. type: array
  1070. items:
  1071. properties:
  1072. id:
  1073. type: integer
  1074. example: 1
  1075. created:
  1076. type: string
  1077. example: 01-Jan-2023 11:23:22
  1078. description:
  1079. example: error button
  1080. qc:
  1081. example: irma
  1082. dev:
  1083. example: dama
  1084. platform:
  1085. example: mobile
  1086. goodday_url:
  1087. example: goodday.com
  1088. image_url:
  1089. example: image.com
  1090. level:
  1091. example: minor
  1092. status:
  1093. example: onprogress
  1094. dev_status:
  1095. example: done
  1096. getArrayProject:
  1097. description: successful operation
  1098. content:
  1099. application/json:
  1100. schema:
  1101. type: object
  1102. allOf:
  1103. - $ref: '#/components/schemas/paginatedResult'
  1104. - type: object
  1105. properties:
  1106. results:
  1107. type: array
  1108. items:
  1109. properties:
  1110. id:
  1111. type: integer
  1112. example: 1
  1113. name:
  1114. type: string
  1115. example: TM
  1116. description:
  1117. type: string
  1118. example: TelMesengger
  1119. owner:
  1120. properties:
  1121. id:
  1122. type: integer
  1123. example: 1
  1124. username:
  1125. type: string
  1126. example: abi
  1127. name:
  1128. type: string
  1129. example: abidzar
  1130. getSingleProject:
  1131. description: successful operation
  1132. content:
  1133. application/json:
  1134. schema:
  1135. properties:
  1136. id:
  1137. type: integer
  1138. example: 1
  1139. name:
  1140. type: string
  1141. example: TM
  1142. description:
  1143. type: string
  1144. example: TelMesengger
  1145. owner:
  1146. properties:
  1147. id:
  1148. type: integer
  1149. example: 1
  1150. username:
  1151. type: string
  1152. example: abi
  1153. name:
  1154. type: string
  1155. example: abidzar
  1156. successAddProject:
  1157. description: record successfully added
  1158. content:
  1159. application/json:
  1160. schema:
  1161. properties:
  1162. id:
  1163. type: integer
  1164. example: 1
  1165. name:
  1166. type: string
  1167. example: TM
  1168. description:
  1169. type: string
  1170. example: TelMesengger
  1171. owner:
  1172. properties:
  1173. id:
  1174. type: integer
  1175. example: 1
  1176. username:
  1177. type: string
  1178. example: abi
  1179. name:
  1180. type: string
  1181. example: abidzar
  1182. successAddMember:
  1183. description: record successfully added
  1184. content:
  1185. application/json:
  1186. schema:
  1187. properties:
  1188. id:
  1189. type: integer
  1190. example: 1
  1191. project:
  1192. example: TelMessenger
  1193. user:
  1194. example: abidzar
  1195. role:
  1196. type: string
  1197. example: QC
  1198. getArrayPlatform:
  1199. description: successful operation
  1200. content:
  1201. application/json:
  1202. schema:
  1203. type: object
  1204. allOf:
  1205. - $ref: '#/components/schemas/paginatedResult'
  1206. - type: object
  1207. properties:
  1208. results:
  1209. type: array
  1210. items:
  1211. properties:
  1212. id:
  1213. type: integer
  1214. example: 1
  1215. name:
  1216. type: string
  1217. example: mobile
  1218. project:
  1219. example: TelMessenger
  1220. successAddPlatform:
  1221. description: record successfully added
  1222. content:
  1223. application/json:
  1224. schema:
  1225. properties:
  1226. id:
  1227. type: integer
  1228. example: 1
  1229. name:
  1230. type: string
  1231. example: mobile
  1232. project:
  1233. example: TelMessenger
  1234. getSinglePlatform:
  1235. description: successful operation
  1236. content:
  1237. application/json:
  1238. schema:
  1239. properties:
  1240. id:
  1241. type: integer
  1242. example: 1
  1243. name:
  1244. type: string
  1245. example: mobile
  1246. project:
  1247. example: TelMessenger
  1248. getArrayUser:
  1249. description: successful operation
  1250. content:
  1251. application/json:
  1252. schema:
  1253. type: object
  1254. allOf:
  1255. - $ref: '#/components/schemas/paginatedResult'
  1256. - type: object
  1257. properties:
  1258. results:
  1259. type: array
  1260. items:
  1261. properties:
  1262. id:
  1263. type: integer
  1264. example: 1
  1265. username:
  1266. type: string
  1267. example: abi
  1268. name:
  1269. type: string
  1270. example: abidzar
  1271. successAddUser:
  1272. description: record successfully added
  1273. content:
  1274. application/json:
  1275. schema:
  1276. properties:
  1277. id:
  1278. type: integer
  1279. example: 1
  1280. username:
  1281. type: string
  1282. example: abi
  1283. name:
  1284. type: string
  1285. example: abidzar
  1286. getSingleUser:
  1287. description: successful operation
  1288. content:
  1289. application/json:
  1290. schema:
  1291. properties:
  1292. id:
  1293. type: integer
  1294. example: 1
  1295. username:
  1296. type: string
  1297. example: abi
  1298. name:
  1299. type: string
  1300. example: abidzar
  1301. getSingleMember:
  1302. description: successful operation
  1303. content:
  1304. application/json:
  1305. schema:
  1306. properties:
  1307. id:
  1308. example: 1
  1309. project:
  1310. example: TelMessenger
  1311. user:
  1312. example: abidzar
  1313. role:
  1314. example: QC
  1315. getArrayMember:
  1316. description: successful operation
  1317. content:
  1318. application/json:
  1319. schema:
  1320. type: object
  1321. allOf:
  1322. - $ref: '#/components/schemas/paginatedResult'
  1323. - type: object
  1324. properties:
  1325. results:
  1326. type: array
  1327. items:
  1328. properties:
  1329. id:
  1330. example: 1
  1331. project:
  1332. example: TelMessenger
  1333. user:
  1334. example: abidzar
  1335. role:
  1336. example: QC
  1337. 400:
  1338. description: invalid data
  1339. 403:
  1340. description: do not have rights
  1341. UnauthorizedError:
  1342. description: Authentication information is missing or invalid
  1343. 404:
  1344. description: not found
  1345. 409:
  1346. description: duplicate data
  1347. 413:
  1348. description: content too large
  1349. requestBodies:
  1350. Project:
  1351. description: Project object
  1352. required: true
  1353. content:
  1354. application/json:
  1355. schema:
  1356. type: object
  1357. properties:
  1358. name:
  1359. type: string
  1360. example: TM
  1361. description:
  1362. type: string
  1363. example: TelMesengger
  1364. ProjectMember:
  1365. description: project member object | role = QC, Programmer, Admin
  1366. required: true
  1367. content:
  1368. application/json:
  1369. schema:
  1370. type: object
  1371. properties:
  1372. user_id:
  1373. type: integer
  1374. example: 1
  1375. role:
  1376. type: string
  1377. example: qc
  1378. Platform:
  1379. description: Platform object
  1380. required: true
  1381. content:
  1382. application/json:
  1383. schema:
  1384. type: object
  1385. properties:
  1386. name:
  1387. type: string
  1388. example: web
  1389. project_name:
  1390. type: string
  1391. example: TM
  1392. User:
  1393. description: User object
  1394. required: true
  1395. content:
  1396. application/json:
  1397. schema:
  1398. type: object
  1399. properties:
  1400. username:
  1401. type: string
  1402. example: abi
  1403. password:
  1404. type: string
  1405. example: abi123
  1406. name:
  1407. type: string
  1408. example: abidzar
  1409. Bug:
  1410. description: Bug object | level (note, minor, major) status (onprogress, done, hold, cancel) dev_status (notstart, onprogress, done)
  1411. required: true
  1412. content:
  1413. application/json:
  1414. schema:
  1415. type: object
  1416. properties:
  1417. description:
  1418. example: bug button
  1419. qc:
  1420. example: 33
  1421. dev:
  1422. example: 34
  1423. platform:
  1424. example: web
  1425. goodday_url:
  1426. example: goodday.com
  1427. image_url:
  1428. example: image.com
  1429. level:
  1430. example: note
  1431. status:
  1432. example: onprogress
  1433. dev_status:
  1434. example: notstart
  1435. Comment:
  1436. description: Comment object
  1437. required: true
  1438. content:
  1439. application/json:
  1440. schema:
  1441. type: object
  1442. properties:
  1443. content:
  1444. example: error web mulai dikerjakan
  1445. securitySchemes:
  1446. testAuth:
  1447. type: http
  1448. scheme: basic
  1449. description: use `user`/`password` to login