swagger3 project.yml 42 KB

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