swagger3 project.yml 40 KB

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