diff options
author | Ruslan Kashapov <ruslan.kashapov@pantheon.tech> | 2021-01-22 12:53:01 +0200 |
---|---|---|
committer | Ruslan Kashapov <ruslan.kashapov@pantheon.tech> | 2021-01-26 07:53:27 +0200 |
commit | 9f52f60a2e70f2344c671af28e62fe2315ee8e02 (patch) | |
tree | e02fff6a25ad49e177522e14ed3cc646d7ffd06f /cps-nf-proxy-rest/docs | |
parent | a2f384de843c3c3f68d2d371d185c71a900e9810 (diff) |
Initial cps-nf-proxy-rest module setup in CPS project
Issue-ID: CPS-171
Change-Id: I8998dc2818b6bc07fc4fe25a2d735b4ab8b4b817
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Diffstat (limited to 'cps-nf-proxy-rest/docs')
-rw-r--r-- | cps-nf-proxy-rest/docs/openapi/components.yaml | 70 | ||||
-rwxr-xr-x | cps-nf-proxy-rest/docs/openapi/openapi.yml | 13 | ||||
-rw-r--r-- | cps-nf-proxy-rest/docs/openapi/xnfProxy.yml | 31 |
3 files changed, 114 insertions, 0 deletions
diff --git a/cps-nf-proxy-rest/docs/openapi/components.yaml b/cps-nf-proxy-rest/docs/openapi/components.yaml new file mode 100644 index 0000000000..5352199834 --- /dev/null +++ b/cps-nf-proxy-rest/docs/openapi/components.yaml @@ -0,0 +1,70 @@ +components: + schemas: + ErrorMessage: + type: object + title: Error + properties: + status: + type: string + message: + type: string + details: + type: string + MultipartFile: + required: + - file + properties: + multipartFile: + type: string + description: multipartFile + format: binary + + parameters: + + + responses: + NotFound: + description: The specified resource was not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + Unauthorized: + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + Forbidden: + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + BadRequest: + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + Conflict: + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + Ok: + description: OK + content: + application/json: + schema: + type: object + Created: + description: Created + content: + text/plain: + schema: + type: string + NoContent: + description: No Content + content: {} diff --git a/cps-nf-proxy-rest/docs/openapi/openapi.yml b/cps-nf-proxy-rest/docs/openapi/openapi.yml new file mode 100755 index 0000000000..0dbab34eef --- /dev/null +++ b/cps-nf-proxy-rest/docs/openapi/openapi.yml @@ -0,0 +1,13 @@ +openapi: 3.0.1 +info: + title: xNF to CPS Proxy API + description: xNF to CPS Proxy API + version: "1.0" +servers: + - url: //localhost:8088/ +paths: + /v1/hello-world: + $ref: 'xnfProxy.yml#/helloWorld' + /v1/hello-error: + $ref: 'xnfProxy.yml#/helloError' + diff --git a/cps-nf-proxy-rest/docs/openapi/xnfProxy.yml b/cps-nf-proxy-rest/docs/openapi/xnfProxy.yml new file mode 100644 index 0000000000..0bb673ac3d --- /dev/null +++ b/cps-nf-proxy-rest/docs/openapi/xnfProxy.yml @@ -0,0 +1,31 @@ +helloWorld: + get: + tags: + - nf-proxy + summary: rest interface validation + operationId: helloWorld + responses: + 200: + $ref: 'components.yaml#/components/responses/Ok' + 400: + $ref: 'components.yaml#/components/responses/BadRequest' + 401: + $ref: 'components.yaml#/components/responses/Unauthorized' + 403: + $ref: 'components.yaml#/components/responses/Forbidden' + +helloError: + get: + tags: + - nf-proxy + summary: error handler validation + operationId: helloError + responses: + 200: + $ref: 'components.yaml#/components/responses/Ok' + 400: + $ref: 'components.yaml#/components/responses/BadRequest' + 401: + $ref: 'components.yaml#/components/responses/Unauthorized' + 403: + $ref: 'components.yaml#/components/responses/Forbidden'
\ No newline at end of file |