swagger3 project.yml 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568
  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. schema:
  777. type: object
  778. 400:
  779. $ref: '#/components/responses/400'
  780. 401:
  781. $ref: '#/components/responses/UnauthorizedError'
  782. 403:
  783. $ref: '#/components/responses/403'
  784. security:
  785. - testAuth: []
  786. post:
  787. tags:
  788. - maintenance
  789. summary: restore data
  790. description: import to table
  791. operationId: importFromCSV
  792. parameters:
  793. - name: tableName
  794. in: query
  795. description: table name (bug, comment, project, platform, project_member, user) (multi table gunakan ;)
  796. schema:
  797. type: string
  798. - name: overwrite
  799. in: query
  800. description: overwrite table value
  801. schema:
  802. type: boolean
  803. requestBody:
  804. description: file to import
  805. required: true
  806. content:
  807. multipart/form-data:
  808. schema:
  809. type: object
  810. properties:
  811. file:
  812. type: string
  813. format: binary
  814. responses:
  815. 200:
  816. description: import success
  817. content:
  818. text/csv:
  819. example: string
  820. 400:
  821. $ref: '#/components/responses/400'
  822. 401:
  823. $ref: '#/components/responses/UnauthorizedError'
  824. 403:
  825. $ref: '#/components/responses/403'
  826. security:
  827. - testAuth: []
  828. components:
  829. schemas:
  830. Project:
  831. required:
  832. - id
  833. - name
  834. - owner
  835. type: object
  836. properties:
  837. id:
  838. type: integer
  839. uniqueItems: true
  840. example: 2
  841. name:
  842. type: string
  843. uniqueItems: true
  844. maximum: 100
  845. example: PI
  846. description:
  847. type: string
  848. maximum: 255
  849. example: PropInspector
  850. owner:
  851. $ref: '#/components/schemas/User'
  852. Platform:
  853. type: object
  854. required:
  855. - id
  856. - name
  857. properties:
  858. id:
  859. type: integer
  860. uniqueItems: true
  861. example: 3
  862. name:
  863. type: string
  864. uniqueItems: true
  865. maximum: 100
  866. example: mobile
  867. project_id:
  868. $ref: '#/components/schemas/Project'
  869. User:
  870. type: object
  871. required:
  872. - id
  873. - username
  874. - password
  875. - name
  876. properties:
  877. id:
  878. type: integer
  879. uniqueItems: true
  880. example: 4
  881. username:
  882. type: string
  883. uniqueItems: true
  884. maximum: 100
  885. example: abi
  886. password:
  887. type: string
  888. maximum: 100
  889. example: abi123
  890. name:
  891. type: string
  892. maximum: 255
  893. example: abidzar
  894. Project_member:
  895. type: object
  896. properties:
  897. id:
  898. type: integer
  899. uniqueItems: true
  900. project:
  901. $ref: '#/components/schemas/Project'
  902. user:
  903. $ref: '#/components/schemas/User'
  904. role:
  905. type: number
  906. enum: [0,1,2]
  907. description: role = 0.QC, 1.Programmer, 2.Admin
  908. required:
  909. - id
  910. - project
  911. - user
  912. - role
  913. Bug:
  914. type: object
  915. properties:
  916. id:
  917. type: integer
  918. uniqueItems: true
  919. created:
  920. type: string
  921. format: date-time
  922. description:
  923. type: string
  924. maximum: 500
  925. qc:
  926. $ref: '#/components/schemas/User'
  927. dev:
  928. $ref: '#/components/schemas/User'
  929. platform:
  930. $ref: '#/components/schemas/Platform'
  931. goodday_url:
  932. type: string
  933. format: url
  934. image_url:
  935. type: string
  936. format: url
  937. level:
  938. type: number
  939. enum: [0,1,2]
  940. description: level = 0.Note, 1.Minor, 2.Major
  941. status:
  942. type: number
  943. enum: [0,1,2,3]
  944. description: status = 0.onProgress, 1.done, 2.hold, 3.cancel
  945. dev_status:
  946. type: number
  947. enum: [0,1,2]
  948. description: dev_status = 0.notStart, 1.onProgress, 2.done
  949. required:
  950. - id
  951. - created
  952. - description
  953. - qc
  954. - dev
  955. - platform
  956. - goodday_url
  957. - level
  958. - status
  959. - dev_status
  960. Comment:
  961. type: object
  962. properties:
  963. id:
  964. type: integer
  965. uniqueItems: true
  966. bug:
  967. $ref: '#/components/schemas/Bug'
  968. creator:
  969. $ref: '#/components/schemas/User'
  970. created:
  971. type: string
  972. format: date-time
  973. content:
  974. type: string
  975. maximum: 500
  976. required:
  977. - id
  978. - bug
  979. - creator
  980. - created
  981. - content
  982. paginatedResult:
  983. type: object
  984. properties:
  985. totalPage: { type: number, example: 2 }
  986. currentPage: { type: number, example: 0 }
  987. totalRecord: { type: number, example: 4 }
  988. results: { type: array, items: {} }
  989. parameters:
  990. projectPath:
  991. name: projectId
  992. in: path
  993. description: Project ID
  994. required: true
  995. schema:
  996. type: integer
  997. platformPath:
  998. name: platformId
  999. in: path
  1000. description: Platform ID
  1001. required: true
  1002. schema:
  1003. type: integer
  1004. UserPath:
  1005. name: userId
  1006. in: path
  1007. description: User ID
  1008. required: true
  1009. schema:
  1010. type: integer
  1011. projectQuery:
  1012. name: project
  1013. in: query
  1014. description: Project ID
  1015. schema:
  1016. type: integer
  1017. memberPath:
  1018. name: memberId
  1019. in: path
  1020. description: Project Member ID
  1021. required: true
  1022. schema:
  1023. type: integer
  1024. limit:
  1025. name: limit
  1026. in: query
  1027. description: Number of records to return (default 3)
  1028. schema:
  1029. type: number
  1030. minimum: 1
  1031. page:
  1032. name: page
  1033. in: query
  1034. description: Number of page to return (default 0)
  1035. schema:
  1036. type: number
  1037. minimum: 0
  1038. roleQuery:
  1039. name: role
  1040. in: query
  1041. description: filter role (role = QC, Programmer, Admin)
  1042. schema:
  1043. type: string
  1044. sortQuery:
  1045. name: sort
  1046. in: query
  1047. description: sort direction (default 'id, desc')
  1048. schema:
  1049. type: string
  1050. bugPath:
  1051. name: bugId
  1052. in: path
  1053. description: Bug ID
  1054. required: true
  1055. schema:
  1056. type: integer
  1057. commentPath:
  1058. name: commentId
  1059. in: path
  1060. description: Comment ID
  1061. required: true
  1062. schema:
  1063. type: integer
  1064. responses:
  1065. getSingleComment:
  1066. description: successful operation
  1067. content:
  1068. application/json:
  1069. schema:
  1070. properties:
  1071. id:
  1072. example: 8
  1073. bug:
  1074. example: error mobile
  1075. creator:
  1076. example: irma
  1077. created:
  1078. example: 22-Nov-2023 11:23:22
  1079. content:
  1080. example: qc error mobile done
  1081. successAddComment:
  1082. description: record succesfully added
  1083. content:
  1084. application/json:
  1085. schema:
  1086. properties:
  1087. id:
  1088. example: 15
  1089. bug:
  1090. example: error web
  1091. creator:
  1092. example: arif
  1093. created:
  1094. example: 04-Jul-2023 11:23:22
  1095. content:
  1096. example: error web mulai dikerjakan
  1097. getArrayComment:
  1098. description: successful operation
  1099. content:
  1100. application/json:
  1101. schema:
  1102. type: object
  1103. allOf:
  1104. - $ref: '#/components/schemas/paginatedResult'
  1105. - type: object
  1106. properties:
  1107. results:
  1108. type: array
  1109. items:
  1110. properties:
  1111. id:
  1112. example: 3
  1113. bug:
  1114. example: bug web
  1115. creator:
  1116. example: dama
  1117. created:
  1118. example: 15-Ags-2023 11:23:22
  1119. content:
  1120. example: web sudah done
  1121. getSingleBug:
  1122. description: successful operation
  1123. content:
  1124. application/json:
  1125. schema:
  1126. properties:
  1127. id:
  1128. example: 1
  1129. created:
  1130. example: 01-Feb-2023 11:23:22
  1131. description:
  1132. example: error button
  1133. qc:
  1134. example: irma
  1135. dev:
  1136. example: dama
  1137. platform:
  1138. example: mobile
  1139. goodday_url:
  1140. example: goodday.com
  1141. image_url:
  1142. example: image.com
  1143. level:
  1144. example: MINOR
  1145. status:
  1146. example: ONPROGRESS
  1147. dev_status:
  1148. example: DONE
  1149. successAddBug:
  1150. description: record succesfully added
  1151. content:
  1152. application/json:
  1153. schema:
  1154. properties:
  1155. id:
  1156. example: 2
  1157. created:
  1158. example: 23-Mar-2023 11:23:22
  1159. description:
  1160. example: bug browser
  1161. qc:
  1162. example: mita
  1163. dev:
  1164. example: agus
  1165. platform:
  1166. example: mobile
  1167. goodday_url:
  1168. example: goodday.com
  1169. image_url:
  1170. example: image.com
  1171. level:
  1172. example: MINOR
  1173. status:
  1174. example: ONPROGRESS
  1175. dev_status:
  1176. example: NOTSTART
  1177. getArrayBug:
  1178. description: successful operation
  1179. content:
  1180. application/json:
  1181. schema:
  1182. type: object
  1183. allOf:
  1184. - $ref: '#/components/schemas/paginatedResult'
  1185. - type: object
  1186. properties:
  1187. results:
  1188. type: array
  1189. items:
  1190. properties:
  1191. id:
  1192. type: integer
  1193. example: 1
  1194. created:
  1195. type: string
  1196. example: 01-Jan-2023 11:23:22
  1197. description:
  1198. example: error button
  1199. qc:
  1200. example: irma
  1201. dev:
  1202. example: dama
  1203. platform:
  1204. example: mobile
  1205. goodday_url:
  1206. example: goodday.com
  1207. image_url:
  1208. example: image.com
  1209. level:
  1210. example: MINOR
  1211. status:
  1212. example: ONPROGRESS
  1213. dev_status:
  1214. example: DONE
  1215. getArrayProject:
  1216. description: successful operation
  1217. content:
  1218. application/json:
  1219. schema:
  1220. type: object
  1221. allOf:
  1222. - $ref: '#/components/schemas/paginatedResult'
  1223. - type: object
  1224. properties:
  1225. results:
  1226. type: array
  1227. items:
  1228. properties:
  1229. id:
  1230. type: integer
  1231. example: 1
  1232. name:
  1233. type: string
  1234. example: TM
  1235. description:
  1236. type: string
  1237. example: TelMesengger
  1238. owner:
  1239. properties:
  1240. id:
  1241. type: integer
  1242. example: 1
  1243. username:
  1244. type: string
  1245. example: abi
  1246. name:
  1247. type: string
  1248. example: abidzar
  1249. getSingleProject:
  1250. description: successful operation
  1251. content:
  1252. application/json:
  1253. schema:
  1254. properties:
  1255. id:
  1256. type: integer
  1257. example: 1
  1258. name:
  1259. type: string
  1260. example: TM
  1261. description:
  1262. type: string
  1263. example: TelMesengger
  1264. owner:
  1265. properties:
  1266. id:
  1267. type: integer
  1268. example: 1
  1269. username:
  1270. type: string
  1271. example: abi
  1272. name:
  1273. type: string
  1274. example: abidzar
  1275. successAddProject:
  1276. description: record successfully added
  1277. content:
  1278. application/json:
  1279. schema:
  1280. properties:
  1281. id:
  1282. type: integer
  1283. example: 1
  1284. name:
  1285. type: string
  1286. example: TM
  1287. description:
  1288. type: string
  1289. example: TelMesengger
  1290. owner:
  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. successAddMember:
  1302. description: record successfully added
  1303. content:
  1304. application/json:
  1305. schema:
  1306. properties:
  1307. id:
  1308. type: integer
  1309. example: 1
  1310. project:
  1311. example: TelMessenger
  1312. user:
  1313. example: abidzar
  1314. role:
  1315. type: string
  1316. example: QC
  1317. getArrayPlatform:
  1318. description: successful operation
  1319. content:
  1320. application/json:
  1321. schema:
  1322. type: object
  1323. allOf:
  1324. - $ref: '#/components/schemas/paginatedResult'
  1325. - type: object
  1326. properties:
  1327. results:
  1328. type: array
  1329. items:
  1330. properties:
  1331. id:
  1332. type: integer
  1333. example: 1
  1334. name:
  1335. type: string
  1336. example: mobile
  1337. project:
  1338. example: TelMessenger
  1339. successAddPlatform:
  1340. description: record successfully added
  1341. content:
  1342. application/json:
  1343. schema:
  1344. properties:
  1345. id:
  1346. type: integer
  1347. example: 1
  1348. name:
  1349. type: string
  1350. example: mobile
  1351. project:
  1352. example: TelMessenger
  1353. getSinglePlatform:
  1354. description: successful operation
  1355. content:
  1356. application/json:
  1357. schema:
  1358. properties:
  1359. id:
  1360. type: integer
  1361. example: 1
  1362. name:
  1363. type: string
  1364. example: mobile
  1365. project:
  1366. example: TelMessenger
  1367. getArrayUser:
  1368. description: successful operation
  1369. content:
  1370. application/json:
  1371. schema:
  1372. type: object
  1373. allOf:
  1374. - $ref: '#/components/schemas/paginatedResult'
  1375. - type: object
  1376. properties:
  1377. results:
  1378. type: array
  1379. items:
  1380. properties:
  1381. id:
  1382. type: integer
  1383. example: 1
  1384. username:
  1385. type: string
  1386. example: abi
  1387. name:
  1388. type: string
  1389. example: abidzar
  1390. successAddUser:
  1391. description: record successfully added
  1392. content:
  1393. application/json:
  1394. schema:
  1395. properties:
  1396. id:
  1397. type: integer
  1398. example: 1
  1399. username:
  1400. type: string
  1401. example: abi
  1402. name:
  1403. type: string
  1404. example: abidzar
  1405. getSingleUser:
  1406. description: successful operation
  1407. content:
  1408. application/json:
  1409. schema:
  1410. properties:
  1411. id:
  1412. type: integer
  1413. example: 1
  1414. username:
  1415. type: string
  1416. example: abi
  1417. name:
  1418. type: string
  1419. example: abidzar
  1420. getSingleMember:
  1421. description: successful operation
  1422. content:
  1423. application/json:
  1424. schema:
  1425. properties:
  1426. id:
  1427. example: 1
  1428. project:
  1429. example: TelMessenger
  1430. user:
  1431. example: abidzar
  1432. role:
  1433. example: QC
  1434. getArrayMember:
  1435. description: successful operation
  1436. content:
  1437. application/json:
  1438. schema:
  1439. type: object
  1440. allOf:
  1441. - $ref: '#/components/schemas/paginatedResult'
  1442. - type: object
  1443. properties:
  1444. results:
  1445. type: array
  1446. items:
  1447. properties:
  1448. id:
  1449. example: 1
  1450. project:
  1451. example: TelMessenger
  1452. user:
  1453. example: abidzar
  1454. role:
  1455. example: QC
  1456. 400:
  1457. description: invalid data
  1458. 403:
  1459. description: do not have rights
  1460. UnauthorizedError:
  1461. description: Authentication information is missing or invalid
  1462. 404:
  1463. description: not found
  1464. 409:
  1465. description: duplicate data
  1466. 413:
  1467. description: content too large
  1468. requestBodies:
  1469. Project:
  1470. description: Project object
  1471. required: true
  1472. content:
  1473. application/json:
  1474. schema:
  1475. type: object
  1476. properties:
  1477. name:
  1478. type: string
  1479. example: TM
  1480. description:
  1481. type: string
  1482. example: TelMesengger
  1483. ProjectMember:
  1484. description: project member object | role = QC, Programmer, Admin
  1485. required: true
  1486. content:
  1487. application/json:
  1488. schema:
  1489. type: object
  1490. properties:
  1491. user_id:
  1492. type: integer
  1493. example: 1
  1494. role:
  1495. type: string
  1496. example: qc
  1497. Platform:
  1498. description: Platform object
  1499. required: true
  1500. content:
  1501. application/json:
  1502. schema:
  1503. type: object
  1504. properties:
  1505. name:
  1506. type: string
  1507. example: web
  1508. project_name:
  1509. type: string
  1510. example: TM
  1511. User:
  1512. description: User object
  1513. required: true
  1514. content:
  1515. application/json:
  1516. schema:
  1517. type: object
  1518. properties:
  1519. username:
  1520. type: string
  1521. example: abi
  1522. password:
  1523. type: string
  1524. example: abi123
  1525. name:
  1526. type: string
  1527. example: abidzar
  1528. Bug:
  1529. description: Bug object | level (note, minor, major) status (onprogress, done, hold, cancel) dev_status (notstart, onprogress, done)
  1530. required: true
  1531. content:
  1532. application/json:
  1533. schema:
  1534. type: object
  1535. properties:
  1536. description:
  1537. example: bug button
  1538. qc:
  1539. example: 33
  1540. dev:
  1541. example: 34
  1542. platform:
  1543. example: web
  1544. goodday_url:
  1545. example: goodday.com
  1546. image_url:
  1547. example: image.com
  1548. level:
  1549. example: NOTE
  1550. status:
  1551. example: ONPROGRESS
  1552. dev_status:
  1553. example: NOTSTART
  1554. Comment:
  1555. description: Comment object
  1556. required: true
  1557. content:
  1558. application/json:
  1559. schema:
  1560. type: object
  1561. properties:
  1562. content:
  1563. example: error web mulai dikerjakan
  1564. securitySchemes:
  1565. testAuth:
  1566. type: http
  1567. scheme: basic
  1568. description: use `user`/`password` to login