From 9f52f60a2e70f2344c671af28e62fe2315ee8e02 Mon Sep 17 00:00:00 2001 From: Ruslan Kashapov Date: Fri, 22 Jan 2021 12:53:01 +0200 Subject: Initial cps-nf-proxy-rest module setup in CPS project Issue-ID: CPS-171 Change-Id: I8998dc2818b6bc07fc4fe25a2d735b4ab8b4b817 Signed-off-by: Ruslan Kashapov --- cps-nf-proxy-rest/docs/openapi/components.yaml | 70 ++++++++++++++++++++++++++ cps-nf-proxy-rest/docs/openapi/openapi.yml | 13 +++++ cps-nf-proxy-rest/docs/openapi/xnfProxy.yml | 31 ++++++++++++ 3 files changed, 114 insertions(+) create mode 100644 cps-nf-proxy-rest/docs/openapi/components.yaml create mode 100755 cps-nf-proxy-rest/docs/openapi/openapi.yml create mode 100644 cps-nf-proxy-rest/docs/openapi/xnfProxy.yml (limited to 'cps-nf-proxy-rest/docs/openapi') 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 -- cgit 1.2.3-korg