|
@@ -1,8 +1,14 @@
|
|
openapi: 3.0.1
|
|
openapi: 3.0.1
|
|
info:
|
|
info:
|
|
title: Project API
|
|
title: Project API
|
|
- description: Latihan Project API
|
|
|
|
- version: 3.0.0
|
|
|
|
|
|
+ description: |
|
|
|
|
+ Latihan Project API
|
|
|
|
+
|
|
|
|
+ - CRUD Project
|
|
|
|
+ - Platform Relationship
|
|
|
|
+ - Auth
|
|
|
|
+ - Membership & Ownership
|
|
|
|
+ version: 4.0.0
|
|
servers:
|
|
servers:
|
|
- url: http://localhost:8080/api/v1
|
|
- url: http://localhost:8080/api/v1
|
|
tags:
|
|
tags:
|
|
@@ -22,11 +28,11 @@ paths:
|
|
operationId: getProject
|
|
operationId: getProject
|
|
responses:
|
|
responses:
|
|
200:
|
|
200:
|
|
- $ref: '#/components/responses/200AP'
|
|
|
|
|
|
+ $ref: '#/components/responses/getArrayProject'
|
|
401:
|
|
401:
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
security:
|
|
security:
|
|
- - basicAuth: []
|
|
|
|
|
|
+ - testAuth: []
|
|
post:
|
|
post:
|
|
tags:
|
|
tags:
|
|
- projects
|
|
- projects
|
|
@@ -37,7 +43,7 @@ paths:
|
|
$ref: '#/components/requestBodies/Project'
|
|
$ref: '#/components/requestBodies/Project'
|
|
responses:
|
|
responses:
|
|
201:
|
|
201:
|
|
- $ref: '#/components/responses/201'
|
|
|
|
|
|
+ $ref: '#/components/responses/successAddProject'
|
|
400:
|
|
400:
|
|
$ref: '#/components/responses/400'
|
|
$ref: '#/components/responses/400'
|
|
401:
|
|
401:
|
|
@@ -47,7 +53,7 @@ paths:
|
|
413:
|
|
413:
|
|
$ref: '#/components/responses/413'
|
|
$ref: '#/components/responses/413'
|
|
security:
|
|
security:
|
|
- - basicAuth: []
|
|
|
|
|
|
+ - testAuth: []
|
|
/projects/{projectId}:
|
|
/projects/{projectId}:
|
|
get:
|
|
get:
|
|
tags:
|
|
tags:
|
|
@@ -59,13 +65,13 @@ paths:
|
|
- $ref: '#/components/parameters/projectPath'
|
|
- $ref: '#/components/parameters/projectPath'
|
|
responses:
|
|
responses:
|
|
200:
|
|
200:
|
|
- $ref: '#/components/responses/200SP'
|
|
|
|
|
|
+ $ref: '#/components/responses/getSingleProject'
|
|
401:
|
|
401:
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
404:
|
|
404:
|
|
$ref: '#/components/responses/404'
|
|
$ref: '#/components/responses/404'
|
|
security:
|
|
security:
|
|
- - basicAuth: []
|
|
|
|
|
|
+ - testAuth: []
|
|
put:
|
|
put:
|
|
tags:
|
|
tags:
|
|
- projects
|
|
- projects
|
|
@@ -78,19 +84,19 @@ paths:
|
|
$ref: '#/components/requestBodies/Project'
|
|
$ref: '#/components/requestBodies/Project'
|
|
responses:
|
|
responses:
|
|
200:
|
|
200:
|
|
- $ref: '#/components/responses/200AP'
|
|
|
|
|
|
+ $ref: '#/components/responses/getSingleProject'
|
|
400:
|
|
400:
|
|
$ref: '#/components/responses/400'
|
|
$ref: '#/components/responses/400'
|
|
401:
|
|
401:
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
- 404:
|
|
|
|
- $ref: '#/components/responses/404'
|
|
|
|
|
|
+ 403:
|
|
|
|
+ $ref: '#/components/responses/403'
|
|
409:
|
|
409:
|
|
$ref: '#/components/responses/409'
|
|
$ref: '#/components/responses/409'
|
|
413:
|
|
413:
|
|
$ref: '#/components/responses/413'
|
|
$ref: '#/components/responses/413'
|
|
security:
|
|
security:
|
|
- - basicAuth: []
|
|
|
|
|
|
+ - testAuth: []
|
|
delete:
|
|
delete:
|
|
tags:
|
|
tags:
|
|
- projects
|
|
- projects
|
|
@@ -106,10 +112,90 @@ paths:
|
|
description: Unable to delete. Data is used.
|
|
description: Unable to delete. Data is used.
|
|
401:
|
|
401:
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
+ 403:
|
|
|
|
+ $ref: '#/components/responses/403'
|
|
|
|
+ security:
|
|
|
|
+ - testAuth: []
|
|
|
|
+ /projects/{projectId}/member:
|
|
|
|
+ get:
|
|
|
|
+ tags:
|
|
|
|
+ - projects
|
|
|
|
+ summary: find all member by project
|
|
|
|
+ description: return all member by project
|
|
|
|
+ operationId: getMemberByProject
|
|
|
|
+ parameters:
|
|
|
|
+ - $ref: '#/components/parameters/projectPath'
|
|
|
|
+ responses:
|
|
|
|
+ 200:
|
|
|
|
+ $ref: '#/components/responses/getArrayMember'
|
|
|
|
+ 401:
|
|
|
|
+ $ref: '#/components/responses/UnauthorizedError'
|
|
404:
|
|
404:
|
|
$ref: '#/components/responses/404'
|
|
$ref: '#/components/responses/404'
|
|
|
|
+ security:
|
|
|
|
+ - testAuth: []
|
|
|
|
+ post:
|
|
|
|
+ tags:
|
|
|
|
+ - projects
|
|
|
|
+ summary: add project member
|
|
|
|
+ description: add project member
|
|
|
|
+ operationId: addProjectMember
|
|
|
|
+ parameters:
|
|
|
|
+ - $ref: '#/components/parameters/projectPath'
|
|
|
|
+ requestBody:
|
|
|
|
+ $ref: '#/components/requestBodies/ProjectMember'
|
|
|
|
+ responses:
|
|
|
|
+ 201:
|
|
|
|
+ $ref: '#/components/responses/successAddMember'
|
|
|
|
+ 400:
|
|
|
|
+ $ref: '#/components/responses/400'
|
|
|
|
+ 401:
|
|
|
|
+ $ref: '#/components/responses/UnauthorizedError'
|
|
|
|
+ 403:
|
|
|
|
+ $ref: '#/components/responses/403'
|
|
|
|
+ 404:
|
|
|
|
+ $ref: '#/components/responses/404'
|
|
|
|
+ 409:
|
|
|
|
+ $ref: '#/components/responses/409'
|
|
security:
|
|
security:
|
|
- - basicAuth: []
|
|
|
|
|
|
+ - testAuth: []
|
|
|
|
+ /projects/member/{memberId}:
|
|
|
|
+ get:
|
|
|
|
+ tags:
|
|
|
|
+ - projects
|
|
|
|
+ summary: find member by ID
|
|
|
|
+ description: return member by ID
|
|
|
|
+ operationId: getMemberProject
|
|
|
|
+ parameters:
|
|
|
|
+ - $ref: '#/components/parameters/memberPath'
|
|
|
|
+ responses:
|
|
|
|
+ 200:
|
|
|
|
+ $ref: '#/components/responses/getSingleMember'
|
|
|
|
+ 401:
|
|
|
|
+ $ref: '#/components/responses/UnauthorizedError'
|
|
|
|
+ 404:
|
|
|
|
+ $ref: '#/components/responses/404'
|
|
|
|
+ security:
|
|
|
|
+ - testAuth: []
|
|
|
|
+ delete:
|
|
|
|
+ tags:
|
|
|
|
+ - projects
|
|
|
|
+ summary: delete project member
|
|
|
|
+ description: delete project member
|
|
|
|
+ operationId: deleteProjectMember
|
|
|
|
+ parameters:
|
|
|
|
+ - $ref: '#/components/parameters/memberPath'
|
|
|
|
+ responses:
|
|
|
|
+ 200:
|
|
|
|
+ description: successful operation
|
|
|
|
+ 401:
|
|
|
|
+ $ref: '#/components/responses/UnauthorizedError'
|
|
|
|
+ 403:
|
|
|
|
+ $ref: '#/components/responses/403'
|
|
|
|
+ 404:
|
|
|
|
+ $ref: '#/components/responses/404'
|
|
|
|
+ security:
|
|
|
|
+ - testAuth: []
|
|
/platforms:
|
|
/platforms:
|
|
get:
|
|
get:
|
|
tags:
|
|
tags:
|
|
@@ -121,17 +207,11 @@ paths:
|
|
- $ref: '#/components/parameters/projectQuery'
|
|
- $ref: '#/components/parameters/projectQuery'
|
|
responses:
|
|
responses:
|
|
200:
|
|
200:
|
|
- description: successful operation
|
|
|
|
- content:
|
|
|
|
- application/json:
|
|
|
|
- schema:
|
|
|
|
- type: array
|
|
|
|
- items:
|
|
|
|
- $ref: '#/components/schemas/Platform'
|
|
|
|
|
|
+ $ref: '#/components/responses/getArrayPlatform'
|
|
401:
|
|
401:
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
security:
|
|
security:
|
|
- - basicAuth: []
|
|
|
|
|
|
+ - testAuth: []
|
|
post:
|
|
post:
|
|
tags:
|
|
tags:
|
|
- platforms
|
|
- platforms
|
|
@@ -139,30 +219,16 @@ paths:
|
|
description: add new platform for a project
|
|
description: add new platform for a project
|
|
operationId: addPlatformByProjectId
|
|
operationId: addPlatformByProjectId
|
|
requestBody:
|
|
requestBody:
|
|
- description: Platform object
|
|
|
|
- required: true
|
|
|
|
- content:
|
|
|
|
- application/json:
|
|
|
|
- schema:
|
|
|
|
- type: object
|
|
|
|
- properties:
|
|
|
|
- name:
|
|
|
|
- type: string
|
|
|
|
- example: web
|
|
|
|
- project_id:
|
|
|
|
- type: integer
|
|
|
|
- example: 1
|
|
|
|
|
|
+ $ref: '#/components/requestBodies/Platform'
|
|
responses:
|
|
responses:
|
|
201:
|
|
201:
|
|
- description: record successfully added
|
|
|
|
- content:
|
|
|
|
- application/json:
|
|
|
|
- schema:
|
|
|
|
- $ref: '#/components/schemas/Platform'
|
|
|
|
|
|
+ $ref: '#/components/responses/successAddPlatform'
|
|
400:
|
|
400:
|
|
$ref: '#/components/responses/400'
|
|
$ref: '#/components/responses/400'
|
|
401:
|
|
401:
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
+ 403:
|
|
|
|
+ $ref: '#/components/responses/403'
|
|
404:
|
|
404:
|
|
$ref: '#/components/responses/404'
|
|
$ref: '#/components/responses/404'
|
|
409:
|
|
409:
|
|
@@ -170,7 +236,7 @@ paths:
|
|
413:
|
|
413:
|
|
$ref: '#/components/responses/413'
|
|
$ref: '#/components/responses/413'
|
|
security:
|
|
security:
|
|
- - basicAuth: []
|
|
|
|
|
|
+ - testAuth: []
|
|
/platforms/{platformId}:
|
|
/platforms/{platformId}:
|
|
get:
|
|
get:
|
|
tags:
|
|
tags:
|
|
@@ -182,17 +248,13 @@ paths:
|
|
- $ref: '#/components/parameters/platformPath'
|
|
- $ref: '#/components/parameters/platformPath'
|
|
responses:
|
|
responses:
|
|
200:
|
|
200:
|
|
- description: successful operation
|
|
|
|
- content:
|
|
|
|
- application/json:
|
|
|
|
- schema:
|
|
|
|
- $ref: '#/components/schemas/Platform'
|
|
|
|
|
|
+ $ref: '#/components/responses/getSinglePlatform'
|
|
401:
|
|
401:
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
404:
|
|
404:
|
|
$ref: '#/components/responses/404'
|
|
$ref: '#/components/responses/404'
|
|
security:
|
|
security:
|
|
- - basicAuth: []
|
|
|
|
|
|
+ - testAuth: []
|
|
put:
|
|
put:
|
|
tags:
|
|
tags:
|
|
- platforms
|
|
- platforms
|
|
@@ -202,30 +264,16 @@ paths:
|
|
parameters:
|
|
parameters:
|
|
- $ref: '#/components/parameters/platformPath'
|
|
- $ref: '#/components/parameters/platformPath'
|
|
requestBody:
|
|
requestBody:
|
|
- description: Platform object
|
|
|
|
- required: true
|
|
|
|
- content:
|
|
|
|
- application/json:
|
|
|
|
- schema:
|
|
|
|
- type: object
|
|
|
|
- properties:
|
|
|
|
- name:
|
|
|
|
- type: string
|
|
|
|
- example: web
|
|
|
|
- project_id:
|
|
|
|
- type: integer
|
|
|
|
- example: 1
|
|
|
|
|
|
+ $ref: '#/components/requestBodies/Platform'
|
|
responses:
|
|
responses:
|
|
200:
|
|
200:
|
|
- description: successful operation
|
|
|
|
- content:
|
|
|
|
- application/json:
|
|
|
|
- schema:
|
|
|
|
- $ref: '#/components/schemas/Platform'
|
|
|
|
|
|
+ $ref: '#/components/responses/getSinglePlatform'
|
|
400:
|
|
400:
|
|
$ref: '#/components/responses/400'
|
|
$ref: '#/components/responses/400'
|
|
401:
|
|
401:
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
+ 403:
|
|
|
|
+ $ref: '#/components/responses/403'
|
|
404:
|
|
404:
|
|
$ref: '#/components/responses/404'
|
|
$ref: '#/components/responses/404'
|
|
409:
|
|
409:
|
|
@@ -233,7 +281,7 @@ paths:
|
|
413:
|
|
413:
|
|
$ref: '#/components/responses/413'
|
|
$ref: '#/components/responses/413'
|
|
security:
|
|
security:
|
|
- - basicAuth: []
|
|
|
|
|
|
+ - testAuth: []
|
|
delete:
|
|
delete:
|
|
tags:
|
|
tags:
|
|
- platforms
|
|
- platforms
|
|
@@ -247,10 +295,12 @@ paths:
|
|
description: successful operation
|
|
description: successful operation
|
|
401:
|
|
401:
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
+ 403:
|
|
|
|
+ $ref: '#/components/responses/403'
|
|
404:
|
|
404:
|
|
$ref: '#/components/responses/404'
|
|
$ref: '#/components/responses/404'
|
|
security:
|
|
security:
|
|
- - basicAuth: []
|
|
|
|
|
|
+ - testAuth: []
|
|
/users:
|
|
/users:
|
|
get:
|
|
get:
|
|
tags:
|
|
tags:
|
|
@@ -260,26 +310,11 @@ paths:
|
|
operationId: getUser
|
|
operationId: getUser
|
|
responses:
|
|
responses:
|
|
200:
|
|
200:
|
|
- description: successful operation
|
|
|
|
- content:
|
|
|
|
- application/json:
|
|
|
|
- schema:
|
|
|
|
- type: array
|
|
|
|
- items:
|
|
|
|
- properties:
|
|
|
|
- id:
|
|
|
|
- type: integer
|
|
|
|
- example: 1
|
|
|
|
- username:
|
|
|
|
- type: string
|
|
|
|
- example: abi
|
|
|
|
- name:
|
|
|
|
- type: string
|
|
|
|
- example: abidzar
|
|
|
|
|
|
+ $ref: '#/components/responses/getArrayUser'
|
|
401:
|
|
401:
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
security:
|
|
security:
|
|
- - basicAuth: []
|
|
|
|
|
|
+ - testAuth: []
|
|
post:
|
|
post:
|
|
tags:
|
|
tags:
|
|
- users
|
|
- users
|
|
@@ -287,38 +322,10 @@ paths:
|
|
description: add new user
|
|
description: add new user
|
|
operationId: AddUser
|
|
operationId: AddUser
|
|
requestBody:
|
|
requestBody:
|
|
- description: User object
|
|
|
|
- required: true
|
|
|
|
- content:
|
|
|
|
- application/json:
|
|
|
|
- schema:
|
|
|
|
- type: object
|
|
|
|
- properties:
|
|
|
|
- username:
|
|
|
|
- type: string
|
|
|
|
- example: abi
|
|
|
|
- password:
|
|
|
|
- type: string
|
|
|
|
- example: abi123
|
|
|
|
- name:
|
|
|
|
- type: string
|
|
|
|
- example: abidzar
|
|
|
|
|
|
+ $ref: '#/components/requestBodies/User'
|
|
responses:
|
|
responses:
|
|
201:
|
|
201:
|
|
- description: record successfully added
|
|
|
|
- content:
|
|
|
|
- application/json:
|
|
|
|
- schema:
|
|
|
|
- properties:
|
|
|
|
- id:
|
|
|
|
- type: integer
|
|
|
|
- example: 1
|
|
|
|
- username:
|
|
|
|
- type: string
|
|
|
|
- example: abi
|
|
|
|
- name:
|
|
|
|
- type: string
|
|
|
|
- example: abidzar
|
|
|
|
|
|
+ $ref: '#/components/responses/successAddUser'
|
|
400:
|
|
400:
|
|
$ref: '#/components/responses/400'
|
|
$ref: '#/components/responses/400'
|
|
401:
|
|
401:
|
|
@@ -328,7 +335,7 @@ paths:
|
|
413:
|
|
413:
|
|
$ref: '#/components/responses/413'
|
|
$ref: '#/components/responses/413'
|
|
security:
|
|
security:
|
|
- - basicAuth: []
|
|
|
|
|
|
+ - testAuth: []
|
|
/users/{userId}:
|
|
/users/{userId}:
|
|
get:
|
|
get:
|
|
tags:
|
|
tags:
|
|
@@ -340,26 +347,13 @@ paths:
|
|
- $ref: '#/components/parameters/UserPath'
|
|
- $ref: '#/components/parameters/UserPath'
|
|
responses:
|
|
responses:
|
|
200:
|
|
200:
|
|
- description: successful operation
|
|
|
|
- content:
|
|
|
|
- application/json:
|
|
|
|
- schema:
|
|
|
|
- properties:
|
|
|
|
- id:
|
|
|
|
- type: integer
|
|
|
|
- example: 1
|
|
|
|
- username:
|
|
|
|
- type: string
|
|
|
|
- example: abi
|
|
|
|
- name:
|
|
|
|
- type: string
|
|
|
|
- example: abidzar
|
|
|
|
|
|
+ $ref: '#/components/responses/getSingleUser'
|
|
401:
|
|
401:
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
404:
|
|
404:
|
|
$ref: '#/components/responses/404'
|
|
$ref: '#/components/responses/404'
|
|
security:
|
|
security:
|
|
- - basicAuth: []
|
|
|
|
|
|
+ - testAuth: []
|
|
put:
|
|
put:
|
|
tags:
|
|
tags:
|
|
- users
|
|
- users
|
|
@@ -384,20 +378,7 @@ paths:
|
|
example: abidzar
|
|
example: abidzar
|
|
responses:
|
|
responses:
|
|
200:
|
|
200:
|
|
- description: successful operation
|
|
|
|
- content:
|
|
|
|
- application/json:
|
|
|
|
- schema:
|
|
|
|
- properties:
|
|
|
|
- id:
|
|
|
|
- type: integer
|
|
|
|
- example: 1
|
|
|
|
- username:
|
|
|
|
- type: string
|
|
|
|
- example: abi
|
|
|
|
- name:
|
|
|
|
- type: string
|
|
|
|
- example: abidzar
|
|
|
|
|
|
+ $ref: '#/components/responses/getSingleUser'
|
|
400:
|
|
400:
|
|
$ref: '#/components/responses/400'
|
|
$ref: '#/components/responses/400'
|
|
401:
|
|
401:
|
|
@@ -409,7 +390,7 @@ paths:
|
|
413:
|
|
413:
|
|
$ref: '#/components/responses/413'
|
|
$ref: '#/components/responses/413'
|
|
security:
|
|
security:
|
|
- - basicAuth: []
|
|
|
|
|
|
+ - testAuth: []
|
|
delete:
|
|
delete:
|
|
tags:
|
|
tags:
|
|
- users
|
|
- users
|
|
@@ -421,12 +402,14 @@ paths:
|
|
responses:
|
|
responses:
|
|
200:
|
|
200:
|
|
description: successful operation
|
|
description: successful operation
|
|
|
|
+ 205:
|
|
|
|
+ description: Unable to delete. Data is used.
|
|
401:
|
|
401:
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
404:
|
|
404:
|
|
$ref: '#/components/responses/404'
|
|
$ref: '#/components/responses/404'
|
|
security:
|
|
security:
|
|
- - basicAuth: []
|
|
|
|
|
|
+ - testAuth: []
|
|
/users/{userId}/password:
|
|
/users/{userId}/password:
|
|
put:
|
|
put:
|
|
tags:
|
|
tags:
|
|
@@ -452,20 +435,7 @@ paths:
|
|
example: abi456
|
|
example: abi456
|
|
responses:
|
|
responses:
|
|
200:
|
|
200:
|
|
- description: successful operation
|
|
|
|
- content:
|
|
|
|
- application/json:
|
|
|
|
- schema:
|
|
|
|
- properties:
|
|
|
|
- id:
|
|
|
|
- type: integer
|
|
|
|
- example: 1
|
|
|
|
- username:
|
|
|
|
- type: string
|
|
|
|
- example: abi
|
|
|
|
- name:
|
|
|
|
- type: string
|
|
|
|
- example: abidzar
|
|
|
|
|
|
+ $ref: '#/components/responses/getSingleUser'
|
|
400:
|
|
400:
|
|
$ref: '#/components/responses/400'
|
|
$ref: '#/components/responses/400'
|
|
401:
|
|
401:
|
|
@@ -475,13 +445,14 @@ paths:
|
|
404:
|
|
404:
|
|
$ref: '#/components/responses/404'
|
|
$ref: '#/components/responses/404'
|
|
security:
|
|
security:
|
|
- - basicAuth: []
|
|
|
|
|
|
+ - testAuth: []
|
|
components:
|
|
components:
|
|
schemas:
|
|
schemas:
|
|
Project:
|
|
Project:
|
|
required:
|
|
required:
|
|
- id
|
|
- id
|
|
- name
|
|
- name
|
|
|
|
+ - owner
|
|
type: object
|
|
type: object
|
|
properties:
|
|
properties:
|
|
id:
|
|
id:
|
|
@@ -497,6 +468,8 @@ components:
|
|
type: string
|
|
type: string
|
|
maximum: 255
|
|
maximum: 255
|
|
example: PropInspector
|
|
example: PropInspector
|
|
|
|
+ owner:
|
|
|
|
+ $ref: '#/components/schemas/User'
|
|
Platform:
|
|
Platform:
|
|
type: object
|
|
type: object
|
|
required:
|
|
required:
|
|
@@ -539,6 +512,25 @@ components:
|
|
type: string
|
|
type: string
|
|
maximum: 255
|
|
maximum: 255
|
|
example: abidzar
|
|
example: abidzar
|
|
|
|
+ project_member:
|
|
|
|
+ type: object
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ uniqueItems: true
|
|
|
|
+ project_id:
|
|
|
|
+ $ref: '#/components/schemas/Project'
|
|
|
|
+ user_id:
|
|
|
|
+ $ref: '#/components/schemas/User'
|
|
|
|
+ role:
|
|
|
|
+ type: number
|
|
|
|
+ format: int32
|
|
|
|
+ description: role = 0.QC, 1. Programmer, 2.Admin
|
|
|
|
+ required:
|
|
|
|
+ - id
|
|
|
|
+ - project_id
|
|
|
|
+ - user_id
|
|
|
|
+ - role
|
|
parameters:
|
|
parameters:
|
|
projectPath:
|
|
projectPath:
|
|
name: projectId
|
|
name: projectId
|
|
@@ -567,35 +559,358 @@ components:
|
|
description: Project ID
|
|
description: Project ID
|
|
schema:
|
|
schema:
|
|
type: integer
|
|
type: integer
|
|
|
|
+ memberPath:
|
|
|
|
+ name: memberId
|
|
|
|
+ in: path
|
|
|
|
+ description: Project Member ID
|
|
|
|
+ required: true
|
|
|
|
+ schema:
|
|
|
|
+ type: integer
|
|
responses:
|
|
responses:
|
|
- 200SP:
|
|
|
|
|
|
+ getArrayProject:
|
|
|
|
+ description: successful operation
|
|
|
|
+ content:
|
|
|
|
+ application/json:
|
|
|
|
+ schema:
|
|
|
|
+ type: array
|
|
|
|
+ items:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: TM
|
|
|
|
+ description:
|
|
|
|
+ type: string
|
|
|
|
+ example: TelMesengger
|
|
|
|
+ owner:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ username:
|
|
|
|
+ type: string
|
|
|
|
+ example: abi
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: abidzar
|
|
|
|
+ getSingleProject:
|
|
description: successful operation
|
|
description: successful operation
|
|
content:
|
|
content:
|
|
application/json:
|
|
application/json:
|
|
schema:
|
|
schema:
|
|
- $ref: '#/components/schemas/Project'
|
|
|
|
- 200AP:
|
|
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: TM
|
|
|
|
+ description:
|
|
|
|
+ type: string
|
|
|
|
+ example: TelMesengger
|
|
|
|
+ owner:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ username:
|
|
|
|
+ type: string
|
|
|
|
+ example: abi
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: abidzar
|
|
|
|
+ successAddProject:
|
|
|
|
+ description: record successfully added
|
|
|
|
+ content:
|
|
|
|
+ application/json:
|
|
|
|
+ schema:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: TM
|
|
|
|
+ description:
|
|
|
|
+ type: string
|
|
|
|
+ example: TelMesengger
|
|
|
|
+ owner:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ username:
|
|
|
|
+ type: string
|
|
|
|
+ example: abi
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: abidzar
|
|
|
|
+ successAddMember:
|
|
|
|
+ description: record successfully added
|
|
|
|
+ content:
|
|
|
|
+ application/json:
|
|
|
|
+ schema:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ project_id:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ example: 1
|
|
|
|
+ name:
|
|
|
|
+ example: TM
|
|
|
|
+ description:
|
|
|
|
+ example: TelMessenger
|
|
|
|
+ owner:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ example: 1
|
|
|
|
+ username:
|
|
|
|
+ example: abi
|
|
|
|
+ name:
|
|
|
|
+ example: abidzar
|
|
|
|
+ user_id:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ example: 1
|
|
|
|
+ username:
|
|
|
|
+ example: abi
|
|
|
|
+ name:
|
|
|
|
+ example: abidzar
|
|
|
|
+ role:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 0
|
|
|
|
+ description: QC
|
|
|
|
+ getArrayPlatform:
|
|
description: successful operation
|
|
description: successful operation
|
|
content:
|
|
content:
|
|
application/json:
|
|
application/json:
|
|
schema:
|
|
schema:
|
|
type: array
|
|
type: array
|
|
- items:
|
|
|
|
- $ref: '#/components/schemas/Project'
|
|
|
|
- 201:
|
|
|
|
- description: Record Successfully added
|
|
|
|
|
|
+ items:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: mobile
|
|
|
|
+ project_id:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: TM
|
|
|
|
+ description:
|
|
|
|
+ type: string
|
|
|
|
+ example: TelMessenger
|
|
|
|
+ owner:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ username:
|
|
|
|
+ type: string
|
|
|
|
+ example: abi
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: abidzar
|
|
|
|
+ successAddPlatform:
|
|
|
|
+ description: record successfully added
|
|
content:
|
|
content:
|
|
application/json:
|
|
application/json:
|
|
schema:
|
|
schema:
|
|
- $ref: '#/components/schemas/Project'
|
|
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: mobile
|
|
|
|
+ project_id:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: TM
|
|
|
|
+ description:
|
|
|
|
+ type: string
|
|
|
|
+ example: TelMessenger
|
|
|
|
+ owner:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ username:
|
|
|
|
+ type: string
|
|
|
|
+ example: abi
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: abidzar
|
|
|
|
+ getSinglePlatform:
|
|
|
|
+ description: successful operation
|
|
|
|
+ content:
|
|
|
|
+ application/json:
|
|
|
|
+ schema:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: mobile
|
|
|
|
+ project_id:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: TM
|
|
|
|
+ description:
|
|
|
|
+ type: string
|
|
|
|
+ example: TelMessenger
|
|
|
|
+ owner:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ username:
|
|
|
|
+ type: string
|
|
|
|
+ example: abi
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: abidzar
|
|
|
|
+ getArrayUser:
|
|
|
|
+ description: successful operation
|
|
|
|
+ content:
|
|
|
|
+ application/json:
|
|
|
|
+ schema:
|
|
|
|
+ type: array
|
|
|
|
+ items:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ username:
|
|
|
|
+ type: string
|
|
|
|
+ example: abi
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: abidzar
|
|
|
|
+ successAddUser:
|
|
|
|
+ description: record successfully added
|
|
|
|
+ content:
|
|
|
|
+ application/json:
|
|
|
|
+ schema:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ username:
|
|
|
|
+ type: string
|
|
|
|
+ example: abi
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: abidzar
|
|
|
|
+ getSingleUser:
|
|
|
|
+ description: successful operation
|
|
|
|
+ content:
|
|
|
|
+ application/json:
|
|
|
|
+ schema:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ username:
|
|
|
|
+ type: string
|
|
|
|
+ example: abi
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: abidzar
|
|
|
|
+ getSingleMember:
|
|
|
|
+ description: successful operation
|
|
|
|
+ content:
|
|
|
|
+ application/json:
|
|
|
|
+ schema:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ example: 1
|
|
|
|
+ project_id:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ example: 1
|
|
|
|
+ name:
|
|
|
|
+ example: TM
|
|
|
|
+ description:
|
|
|
|
+ example: TelMessenger
|
|
|
|
+ owner:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ example: 1
|
|
|
|
+ username:
|
|
|
|
+ example: abi
|
|
|
|
+ name:
|
|
|
|
+ example: abidzar
|
|
|
|
+ user_id:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ example: 1
|
|
|
|
+ username:
|
|
|
|
+ example: abi
|
|
|
|
+ name:
|
|
|
|
+ example: abidzar
|
|
|
|
+ role:
|
|
|
|
+ example: 0
|
|
|
|
+ getArrayMember:
|
|
|
|
+ description: successful operation
|
|
|
|
+ content:
|
|
|
|
+ application/json:
|
|
|
|
+ schema:
|
|
|
|
+ type: array
|
|
|
|
+ items:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ example: 1
|
|
|
|
+ project_id:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ example: 1
|
|
|
|
+ name:
|
|
|
|
+ example: TM
|
|
|
|
+ description:
|
|
|
|
+ example: TelMessenger
|
|
|
|
+ owner:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ example: 1
|
|
|
|
+ username:
|
|
|
|
+ example: abi
|
|
|
|
+ name:
|
|
|
|
+ example: abidzar
|
|
|
|
+ user_id:
|
|
|
|
+ properties:
|
|
|
|
+ id:
|
|
|
|
+ example: 1
|
|
|
|
+ username:
|
|
|
|
+ example: abi
|
|
|
|
+ name:
|
|
|
|
+ example: abidzar
|
|
|
|
+ role:
|
|
|
|
+ example: 0
|
|
400:
|
|
400:
|
|
description: invalid data
|
|
description: invalid data
|
|
|
|
+ 403:
|
|
|
|
+ description: do not have rights
|
|
UnauthorizedError:
|
|
UnauthorizedError:
|
|
description: Authentication information is missing or invalid
|
|
description: Authentication information is missing or invalid
|
|
- headers:
|
|
|
|
- WWW_Authenticate:
|
|
|
|
- schema:
|
|
|
|
- type: string
|
|
|
|
404:
|
|
404:
|
|
description: not found
|
|
description: not found
|
|
409:
|
|
409:
|
|
@@ -617,6 +932,20 @@ components:
|
|
description:
|
|
description:
|
|
type: string
|
|
type: string
|
|
example: TelMesengger
|
|
example: TelMesengger
|
|
|
|
+ ProjectMember:
|
|
|
|
+ description: project member object
|
|
|
|
+ required: true
|
|
|
|
+ content:
|
|
|
|
+ application/json:
|
|
|
|
+ schema:
|
|
|
|
+ type: object
|
|
|
|
+ properties:
|
|
|
|
+ user_id:
|
|
|
|
+ type: integer
|
|
|
|
+ example: 1
|
|
|
|
+ role:
|
|
|
|
+ type: string
|
|
|
|
+ example: qc
|
|
Platform:
|
|
Platform:
|
|
description: Platform object
|
|
description: Platform object
|
|
required: true
|
|
required: true
|
|
@@ -627,11 +956,29 @@ components:
|
|
properties:
|
|
properties:
|
|
name:
|
|
name:
|
|
type: string
|
|
type: string
|
|
- example: mobile
|
|
|
|
- project_id:
|
|
|
|
- $ref: '#/components/schemas/Project'
|
|
|
|
|
|
+ example: web
|
|
|
|
+ project_name:
|
|
|
|
+ type: string
|
|
|
|
+ example: TM
|
|
|
|
+ User:
|
|
|
|
+ description: User object
|
|
|
|
+ required: true
|
|
|
|
+ content:
|
|
|
|
+ application/json:
|
|
|
|
+ schema:
|
|
|
|
+ type: object
|
|
|
|
+ properties:
|
|
|
|
+ username:
|
|
|
|
+ type: string
|
|
|
|
+ example: abi
|
|
|
|
+ password:
|
|
|
|
+ type: string
|
|
|
|
+ example: abi123
|
|
|
|
+ name:
|
|
|
|
+ type: string
|
|
|
|
+ example: abidzar
|
|
securitySchemes:
|
|
securitySchemes:
|
|
- basicAuth:
|
|
|
|
|
|
+ testAuth:
|
|
type: http
|
|
type: http
|
|
scheme: basic
|
|
scheme: basic
|
|
- description: Use `user` / `password` as the test credentials
|
|
|
|
|
|
+ description: use `user`/`password` to login
|