diff options
author | puthuparambil.aditya <aditya.puthuparambil@bell.ca> | 2021-01-13 12:06:20 +0000 |
---|---|---|
committer | Rishi Chail <rishi.chail@est.tech> | 2021-01-15 06:52:13 +0000 |
commit | 001e7738f4968ec390ea8af36de019aa87e3c2f2 (patch) | |
tree | 13347974f001bdf596dca49a0c64924aa70e1703 /cps-rest/docs/api/swagger/cpsData.yml | |
parent | d45b2dc0ec3bb7d56ef1eee784a887459f609832 (diff) |
Split OpenAPI yaml file
1. components like schema, parameters, responses, requestBodies all moved to components.yml (https://swagger.io/docs/specification/components/)
2. CpAdmin.yml includes the configuration details for cpsAdmin APIs
3. CpsData.yml includes the API configuration details for cpsData
Issue-ID: CPS-155
Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca>
Change-Id: I18fb9b8a2be85d180d4625657aca399dbf60b7bc
Diffstat (limited to 'cps-rest/docs/api/swagger/cpsData.yml')
-rw-r--r-- | cps-rest/docs/api/swagger/cpsData.yml | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/cps-rest/docs/api/swagger/cpsData.yml b/cps-rest/docs/api/swagger/cpsData.yml new file mode 100644 index 0000000000..c33cf168e2 --- /dev/null +++ b/cps-rest/docs/api/swagger/cpsData.yml @@ -0,0 +1,65 @@ +nodesByDataspaceAndAnchor: + get: + tags: + - cps-data + summary: Get a node given an anchor for the given dataspace - DRAFT + operationId: getNodeByDataspaceAndAnchor + parameters: + - $ref: 'components.yaml#/components/parameters/dataspaceNameInPath' + - $ref: 'components.yaml#/components/parameters/anchorNameInPath' + 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' + 404: + $ref: 'components.yaml#/components/responses/NotFound' + x-codegen-request-body-name: xpath + +nodesByDataspace: + get: + tags: + - cps-data + summary: Get all nodes for a given dataspace using an xpath or schema node identifier - DRAFT + operationId: getNode + parameters: + - $ref: 'components.yaml#/components/parameters/dataspaceNameInPath' + 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' + 404: + $ref: 'components.yaml#/components/responses/NotFound' + x-codegen-request-body-name: requestBody + + post: + tags: + - cps-data + summary: Create a node for a given anchor for the given dataspace - DRAFT + operationId: createNode + parameters: + - $ref: 'components.yaml#/components/parameters/dataspaceNameInPath' + requestBody: + content: + multipart/form-data: + schema: + $ref: 'components.yaml#/components/schemas/MultipartFile' + required: true + responses: + 201: + $ref: 'components.yaml#/components/responses/Created' + 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 |