-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
1,440 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
361 changes: 361 additions & 0 deletions
361
backend-manager-student/src/admin_api/v1/Swagger/admin_api/industry_code.swagger.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,361 @@ | ||
#!@author Nguyễn Tiến Tài | ||
#!created_at 08/02/2023 | ||
#!description: General | ||
# Info Swagger Admin APi | ||
info: | ||
title: Document Admin | ||
description: CURD industry-code | ||
version: 1.0.0 | ||
servers: | ||
- url: http://localhost:5000 | ||
description: Local development server admin api | ||
# General | ||
components: | ||
# Parameter | ||
parameters: | ||
X-DEVICE-ID: | ||
in: header | ||
name: X-DEVICE-ID | ||
required: true | ||
schema: | ||
type: string | ||
X-OS-TYPE: | ||
in: header | ||
name: X-OS-TYPE | ||
required: true | ||
schema: | ||
type: string | ||
X-OS-VERSION: | ||
in: header | ||
name: X-OS-VERSION | ||
required: true | ||
schema: | ||
type: string | ||
X-APP-VERSION: | ||
in: header | ||
name: X-APP-VERSION | ||
required: true | ||
schema: | ||
type: string | ||
X-DEVICE-NAME: | ||
in: header | ||
name: X-DEVICE-NAME | ||
required: true | ||
schema: | ||
type: string | ||
TOKEN: | ||
in: header | ||
name: Authorization | ||
type: string | ||
description: Bearer Token | ||
required: true | ||
schema: | ||
type: bearerToken | ||
# Unauthorized | ||
responses: | ||
UnauthorizedError: | ||
description: Access token is missing or invalid, or the user does not have access to perform the action,or or Device Invalid | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
example: 400 | ||
message: | ||
type: string | ||
example: 'Unauthorized' | ||
# Fail CURD Fail | ||
ServerCURDFail: | ||
description: CURD Fail !!! | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
example: 500 | ||
message: | ||
type: string | ||
example: Service Unavailable | ||
element: | ||
type: object | ||
example: Internal Server Error | ||
ServerFail: | ||
description: Service die | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
example: 503 | ||
message: | ||
type: string | ||
example: Service Unavailable | ||
element: | ||
type: object | ||
example: Out Of Service | ||
#!@author Nguyễn Tiến Tài | ||
#!created_at 24/04/2023 | ||
#!description: create IndustryCode | ||
paths: | ||
/v1/admin/private/industry-code/create: | ||
post: | ||
summary: Create industryCode | ||
tags: [Create industryCode] | ||
operationId: createIndustryCode | ||
parameters: | ||
- $ref: '#/components/parameters/COOKIE-CLIENT' | ||
- $ref: '#/components/parameters/X-DEVICE-ID' | ||
- $ref: '#/components/parameters/X-OS-TYPE' | ||
- $ref: '#/components/parameters/X-OS-VERSION' | ||
- $ref: '#/components/parameters/X-APP-VERSION' | ||
- $ref: '#/components/parameters/X-DEVICE-NAME' | ||
- $ref: '#/components/parameters/TOKEN' | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
input: | ||
type: object | ||
properties: | ||
industry_input: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
example: Tai | ||
required: | ||
- name | ||
responses: | ||
200: | ||
description: Create success | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
example: 200 | ||
message: | ||
type: string | ||
example: Success | ||
400: | ||
description: Invalid input | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
example: 400 | ||
message: | ||
type: string | ||
example: Bad Request | ||
503: | ||
$ref: '#/components/responses/ServerFail' | ||
|
||
#!@author Nguyễn Tiến Tài | ||
#!created_at 24/04/2023 | ||
#!description: update IndustryCode | ||
/v1/admin/private/industry-code/update: | ||
post: | ||
summary: Update IndustryCode | ||
tags: [Update IndustryCode] | ||
operationId: updateIndustryCode | ||
parameters: | ||
- $ref: '#/components/parameters/COOKIE-CLIENT' | ||
- $ref: '#/components/parameters/X-DEVICE-ID' | ||
- $ref: '#/components/parameters/X-OS-TYPE' | ||
- $ref: '#/components/parameters/X-OS-VERSION' | ||
- $ref: '#/components/parameters/X-APP-VERSION' | ||
- $ref: '#/components/parameters/X-DEVICE-NAME' | ||
- $ref: '#/components/parameters/TOKEN' | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
input: | ||
type: object | ||
properties: | ||
industry_input: | ||
type: object | ||
properties: | ||
industry_code_id: | ||
type: string | ||
example: 1475825111725506562 | ||
name: | ||
type: string | ||
example: Tai | ||
required: | ||
- industry_code_id | ||
- name | ||
responses: | ||
200: | ||
description: update success | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
example: 200 | ||
message: | ||
type: string | ||
example: Success | ||
400: | ||
description: Invalid input | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
example: 400 | ||
message: | ||
type: string | ||
example: Bad Request | ||
503: | ||
$ref: '#/components/responses/ServerFail' | ||
|
||
#!@author Nguyễn Tiến Tài | ||
#!created_at 24/04/2023 | ||
#!description: delete IndustryCode | ||
/v1/admin/private/industry-code/delete: | ||
post: | ||
summary: Delete IndustryCode | ||
tags: [Delete IndustryCode] | ||
operationId: deleteIndustryCode | ||
parameters: | ||
- $ref: '#/components/parameters/COOKIE-CLIENT' | ||
- $ref: '#/components/parameters/X-DEVICE-ID' | ||
- $ref: '#/components/parameters/X-OS-TYPE' | ||
- $ref: '#/components/parameters/X-OS-VERSION' | ||
- $ref: '#/components/parameters/X-APP-VERSION' | ||
- $ref: '#/components/parameters/X-DEVICE-NAME' | ||
- $ref: '#/components/parameters/TOKEN' | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
input: | ||
type: object | ||
properties: | ||
industry_input: | ||
type: object | ||
properties: | ||
industry_code_id: | ||
type: string | ||
example: 1474830717476143106 | ||
required: | ||
- industry_code_id | ||
responses: | ||
200: | ||
description: Delete success | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
example: 200 | ||
message: | ||
type: string | ||
example: Success | ||
400: | ||
description: Invalid input | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
example: 400 | ||
message: | ||
type: string | ||
example: Bad Request | ||
503: | ||
$ref: '#/components/responses/ServerFail' | ||
#!@author Nguyễn Tiến Tài | ||
#!created_at 24/04/2023 | ||
#!description: Detail IndustryCode | ||
/v1/admin/private/industry-code/detail/:industry_code_id: | ||
get: | ||
summary: Detail IndustryCode | ||
tags: [Detail IndustryCode] | ||
operationId: detailIndustryCode | ||
parameters: | ||
- $ref: '#/components/parameters/COOKIE-CLIENT' | ||
- $ref: '#/components/parameters/X-DEVICE-ID' | ||
- $ref: '#/components/parameters/X-OS-TYPE' | ||
- $ref: '#/components/parameters/X-OS-VERSION' | ||
- $ref: '#/components/parameters/X-APP-VERSION' | ||
- $ref: '#/components/parameters/X-DEVICE-NAME' | ||
- $ref: '#/components/parameters/TOKEN' | ||
responses: | ||
200: | ||
description: Detail success | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
example: 200 | ||
message: | ||
type: string | ||
example: Success | ||
503: | ||
$ref: '#/components/responses/ServerFail' | ||
#!@author Nguyễn Tiến Tài | ||
#!created_at 24/04/2023 | ||
#!description: Get all IndustryCode | ||
/v1/admin/private/industry-code/all: | ||
get: | ||
summary: Get all IndustryCode | ||
tags: [Get all IndustryCode] | ||
operationId: getAllIndustryCode | ||
parameters: | ||
- $ref: '#/components/parameters/COOKIE-CLIENT' | ||
- $ref: '#/components/parameters/X-DEVICE-ID' | ||
- $ref: '#/components/parameters/X-OS-TYPE' | ||
- $ref: '#/components/parameters/X-OS-VERSION' | ||
- $ref: '#/components/parameters/X-APP-VERSION' | ||
- $ref: '#/components/parameters/X-DEVICE-NAME' | ||
- $ref: '#/components/parameters/TOKEN' | ||
responses: | ||
200: | ||
description: success | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
example: 200 | ||
message: | ||
type: string | ||
example: Success | ||
503: | ||
$ref: '#/components/responses/ServerFail' |
Oops, something went wrong.