|
@@ -1,8 +1,14 @@
|
|
|
openapi: 3.0.1
|
|
|
info:
|
|
|
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:
|
|
|
- url: http://localhost:8080/api/v1
|
|
|
tags:
|
|
@@ -22,11 +28,11 @@ paths:
|
|
|
operationId: getProject
|
|
|
responses:
|
|
|
200:
|
|
|
- $ref: '#/components/responses/200AP'
|
|
|
+ $ref: '#/components/responses/getArrayProject'
|
|
|
401:
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
security:
|
|
|
- - basicAuth: []
|
|
|
+ - testAuth: []
|
|
|
post:
|
|
|
tags:
|
|
|
- projects
|
|
@@ -37,7 +43,7 @@ paths:
|
|
|
$ref: '#/components/requestBodies/Project'
|
|
|
responses:
|
|
|
201:
|
|
|
- $ref: '#/components/responses/201'
|
|
|
+ $ref: '#/components/responses/successAddProject'
|
|
|
400:
|
|
|
$ref: '#/components/responses/400'
|
|
|
401:
|
|
@@ -47,7 +53,7 @@ paths:
|
|
|
413:
|
|
|
$ref: '#/components/responses/413'
|
|
|
security:
|
|
|
- - basicAuth: []
|
|
|
+ - testAuth: []
|
|
|
/projects/{projectId}:
|
|
|
get:
|
|
|
tags:
|
|
@@ -59,13 +65,13 @@ paths:
|
|
|
- $ref: '#/components/parameters/projectPath'
|
|
|
responses:
|
|
|
200:
|
|
|
- $ref: '#/components/responses/200SP'
|
|
|
+ $ref: '#/components/responses/getSingleProject'
|
|
|
401:
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
404:
|
|
|
$ref: '#/components/responses/404'
|
|
|
security:
|
|
|
- - basicAuth: []
|
|
|
+ - testAuth: []
|
|
|
put:
|
|
|
tags:
|
|
|
- projects
|
|
@@ -78,19 +84,19 @@ paths:
|
|
|
$ref: '#/components/requestBodies/Project'
|
|
|
responses:
|
|
|
200:
|
|
|
- $ref: '#/components/responses/200AP'
|
|
|
+ $ref: '#/components/responses/getSingleProject'
|
|
|
400:
|
|
|
$ref: '#/components/responses/400'
|
|
|
401:
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
- 404:
|
|
|
- $ref: '#/components/responses/404'
|
|
|
+ 403:
|
|
|
+ $ref: '#/components/responses/403'
|
|
|
409:
|
|
|
$ref: '#/components/responses/409'
|
|
|
413:
|
|
|
$ref: '#/components/responses/413'
|
|
|
security:
|
|
|
- - basicAuth: []
|
|
|
+ - testAuth: []
|
|
|
delete:
|
|
|
tags:
|
|
|
- projects
|
|
@@ -106,10 +112,90 @@ paths:
|
|
|
description: Unable to delete. Data is used.
|
|
|
401:
|
|
|
$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:
|
|
|
$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:
|
|
|
- - 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:
|
|
|
get:
|
|
|
tags:
|
|
@@ -121,17 +207,11 @@ paths:
|
|
|
- $ref: '#/components/parameters/projectQuery'
|
|
|
responses:
|
|
|
200:
|
|
|
- description: successful operation
|
|
|
- content:
|
|
|
- application/json:
|
|
|
- schema:
|
|
|
- type: array
|
|
|
- items:
|
|
|
- $ref: '#/components/schemas/Platform'
|
|
|
+ $ref: '#/components/responses/getArrayPlatform'
|
|
|
401:
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
security:
|
|
|
- - basicAuth: []
|
|
|
+ - testAuth: []
|
|
|
post:
|
|
|
tags:
|
|
|
- platforms
|
|
@@ -139,30 +219,16 @@ paths:
|
|
|
description: add new platform for a project
|
|
|
operationId: addPlatformByProjectId
|
|
|
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:
|
|
|
201:
|
|
|
- description: record successfully added
|
|
|
- content:
|
|
|
- application/json:
|
|
|
- schema:
|
|
|
- $ref: '#/components/schemas/Platform'
|
|
|
+ $ref: '#/components/responses/successAddPlatform'
|
|
|
400:
|
|
|
$ref: '#/components/responses/400'
|
|
|
401:
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
+ 403:
|
|
|
+ $ref: '#/components/responses/403'
|
|
|
404:
|
|
|
$ref: '#/components/responses/404'
|
|
|
409:
|
|
@@ -170,7 +236,7 @@ paths:
|
|
|
413:
|
|
|
$ref: '#/components/responses/413'
|
|
|
security:
|
|
|
- - basicAuth: []
|
|
|
+ - testAuth: []
|
|
|
/platforms/{platformId}:
|
|
|
get:
|
|
|
tags:
|
|
@@ -182,17 +248,13 @@ paths:
|
|
|
- $ref: '#/components/parameters/platformPath'
|
|
|
responses:
|
|
|
200:
|
|
|
- description: successful operation
|
|
|
- content:
|
|
|
- application/json:
|
|
|
- schema:
|
|
|
- $ref: '#/components/schemas/Platform'
|
|
|
+ $ref: '#/components/responses/getSinglePlatform'
|
|
|
401:
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
404:
|
|
|
$ref: '#/components/responses/404'
|
|
|
security:
|
|
|
- - basicAuth: []
|
|
|
+ - testAuth: []
|
|
|
put:
|
|
|
tags:
|
|
|
- platforms
|
|
@@ -202,30 +264,16 @@ paths:
|
|
|
parameters:
|
|
|
- $ref: '#/components/parameters/platformPath'
|
|
|
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:
|
|
|
200:
|
|
|
- description: successful operation
|
|
|
- content:
|
|
|
- application/json:
|
|
|
- schema:
|
|
|
- $ref: '#/components/schemas/Platform'
|
|
|
+ $ref: '#/components/responses/getSinglePlatform'
|
|
|
400:
|
|
|
$ref: '#/components/responses/400'
|
|
|
401:
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
+ 403:
|
|
|
+ $ref: '#/components/responses/403'
|
|
|
404:
|
|
|
$ref: '#/components/responses/404'
|
|
|
409:
|
|
@@ -233,7 +281,7 @@ paths:
|
|
|
413:
|
|
|
$ref: '#/components/responses/413'
|
|
|
security:
|
|
|
- - basicAuth: []
|
|
|
+ - testAuth: []
|
|
|
delete:
|
|
|
tags:
|
|
|
- platforms
|
|
@@ -247,10 +295,12 @@ paths:
|
|
|
description: successful operation
|
|
|
401:
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
+ 403:
|
|
|
+ $ref: '#/components/responses/403'
|
|
|
404:
|
|
|
$ref: '#/components/responses/404'
|
|
|
security:
|
|
|
- - basicAuth: []
|
|
|
+ - testAuth: []
|
|
|
/users:
|
|
|
get:
|
|
|
tags:
|
|
@@ -260,26 +310,11 @@ paths:
|
|
|
operationId: getUser
|
|
|
responses:
|
|
|
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:
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
security:
|
|
|
- - basicAuth: []
|
|
|
+ - testAuth: []
|
|
|
post:
|
|
|
tags:
|
|
|
- users
|
|
@@ -287,38 +322,10 @@ paths:
|
|
|
description: add new user
|
|
|
operationId: AddUser
|
|
|
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:
|
|
|
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:
|
|
|
$ref: '#/components/responses/400'
|
|
|
401:
|
|
@@ -328,7 +335,7 @@ paths:
|
|
|
413:
|
|
|
$ref: '#/components/responses/413'
|
|
|
security:
|
|
|
- - basicAuth: []
|
|
|
+ - testAuth: []
|
|
|
/users/{userId}:
|
|
|
get:
|
|
|
tags:
|
|
@@ -340,26 +347,13 @@ paths:
|
|
|
- $ref: '#/components/parameters/UserPath'
|
|
|
responses:
|
|
|
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:
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
404:
|
|
|
$ref: '#/components/responses/404'
|
|
|
security:
|
|
|
- - basicAuth: []
|
|
|
+ - testAuth: []
|
|
|
put:
|
|
|
tags:
|
|
|
- users
|
|
@@ -384,20 +378,7 @@ paths:
|
|
|
example: abidzar
|
|
|
responses:
|
|
|
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:
|
|
|
$ref: '#/components/responses/400'
|
|
|
401:
|
|
@@ -409,7 +390,7 @@ paths:
|
|
|
413:
|
|
|
$ref: '#/components/responses/413'
|
|
|
security:
|
|
|
- - basicAuth: []
|
|
|
+ - testAuth: []
|
|
|
delete:
|
|
|
tags:
|
|
|
- users
|
|
@@ -421,12 +402,14 @@ paths:
|
|
|
responses:
|
|
|
200:
|
|
|
description: successful operation
|
|
|
+ 205:
|
|
|
+ description: Unable to delete. Data is used.
|
|
|
401:
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
404:
|
|
|
$ref: '#/components/responses/404'
|
|
|
security:
|
|
|
- - basicAuth: []
|
|
|
+ - testAuth: []
|
|
|
/users/{userId}/password:
|
|
|
put:
|
|
|
tags:
|
|
@@ -452,20 +435,7 @@ paths:
|
|
|
example: abi456
|
|
|
responses:
|
|
|
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:
|
|
|
$ref: '#/components/responses/400'
|
|
|
401:
|
|
@@ -475,13 +445,14 @@ paths:
|
|
|
404:
|
|
|
$ref: '#/components/responses/404'
|
|
|
security:
|
|
|
- - basicAuth: []
|
|
|
+ - testAuth: []
|
|
|
components:
|
|
|
schemas:
|
|
|
Project:
|
|
|
required:
|
|
|
- id
|
|
|
- name
|
|
|
+ - owner
|
|
|
type: object
|
|
|
properties:
|
|
|
id:
|
|
@@ -497,6 +468,8 @@ components:
|
|
|
type: string
|
|
|
maximum: 255
|
|
|
example: PropInspector
|
|
|
+ owner:
|
|
|
+ $ref: '#/components/schemas/User'
|
|
|
Platform:
|
|
|
type: object
|
|
|
required:
|
|
@@ -539,6 +512,25 @@ components:
|
|
|
type: string
|
|
|
maximum: 255
|
|
|
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:
|
|
|
projectPath:
|
|
|
name: projectId
|
|
@@ -567,35 +559,358 @@ components:
|
|
|
description: Project ID
|
|
|
schema:
|
|
|
type: integer
|
|
|
+ memberPath:
|
|
|
+ name: memberId
|
|
|
+ in: path
|
|
|
+ description: Project Member ID
|
|
|
+ required: true
|
|
|
+ schema:
|
|
|
+ type: integer
|
|
|
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
|
|
|
content:
|
|
|
application/json:
|
|
|
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
|
|
|
content:
|
|
|
application/json:
|
|
|
schema:
|
|
|
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:
|
|
|
application/json:
|
|
|
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:
|
|
|
description: invalid data
|
|
|
+ 403:
|
|
|
+ description: do not have rights
|
|
|
UnauthorizedError:
|
|
|
description: Authentication information is missing or invalid
|
|
|
- headers:
|
|
|
- WWW_Authenticate:
|
|
|
- schema:
|
|
|
- type: string
|
|
|
404:
|
|
|
description: not found
|
|
|
409:
|
|
@@ -617,6 +932,20 @@ components:
|
|
|
description:
|
|
|
type: string
|
|
|
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:
|
|
|
description: Platform object
|
|
|
required: true
|
|
@@ -627,11 +956,29 @@ components:
|
|
|
properties:
|
|
|
name:
|
|
|
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:
|
|
|
- basicAuth:
|
|
|
+ testAuth:
|
|
|
type: http
|
|
|
scheme: basic
|
|
|
- description: Use `user` / `password` as the test credentials
|
|
|
+ description: use `user`/`password` to login
|