X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=cps-rest%2Fdocs%2Fopenapi%2FcpsAdmin.yml;h=f60a9be6ff5e74990bf2b3185a0278ed632eb13f;hb=482b6745fea99c6af3a776bc8660ac914aa5c2b8;hp=a25f81eafc95e7cff4aa3f1031a1d379fa7d62e2;hpb=f5cad5a6d75d0072fb3be7347cccd50ecfa120ae;p=cps.git diff --git a/cps-rest/docs/openapi/cpsAdmin.yml b/cps-rest/docs/openapi/cpsAdmin.yml index a25f81eaf..f60a9be6f 100644 --- a/cps-rest/docs/openapi/cpsAdmin.yml +++ b/cps-rest/docs/openapi/cpsAdmin.yml @@ -1,6 +1,7 @@ # ============LICENSE_START======================================================= # Copyright (c) 2021 Bell Canada. # Modifications Copyright (C) 2021-2022 Nordix Foundation +# Modifications Copyright (C) 2022 TechMahindra Ltd. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,25 +19,6 @@ # ============LICENSE_END========================================================= dataspaces: - post: - description: Create a new dataspace - tags: - - cps-admin - summary: Create a dataspace - operationId: createDataspace - parameters: - - $ref: 'components.yml#/components/parameters/dataspaceNameInQuery' - responses: - '201': - $ref: 'components.yml#/components/responses/Created' - '401': - $ref: 'components.yml#/components/responses/Unauthorized' - '403': - $ref: 'components.yml#/components/responses/Forbidden' - '409': - $ref: 'components.yml#/components/responses/Conflict' - '500': - $ref: 'components.yml#/components/responses/InternalServerError' delete: description: Delete a dataspace tags: @@ -44,6 +26,7 @@ dataspaces: summary: Delete a dataspace operationId: deleteDataspace parameters: + - $ref: 'components.yml#/components/parameters/apiVersionInPath' - $ref: 'components.yml#/components/parameters/dataspaceNameInQuery' responses: '204': @@ -60,32 +43,30 @@ dataspaces: $ref: 'components.yml#/components/responses/InternalServerError' schemaSet: - post: - description: Create a new schema set in the given dataspace + get: + description: Read all schema sets, given a dataspace tags: - cps-admin - summary: Create a schema set - operationId: createSchemaSet + summary: Get schema sets + operationId: getSchemaSets parameters: + - $ref: 'components.yml#/components/parameters/apiVersionInPath' - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' - - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery' - requestBody: - required: true - content: - multipart/form-data: - schema: - $ref: 'components.yml#/components/schemas/MultipartFile' responses: - '201': - $ref: 'components.yml#/components/responses/Created' + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: 'components.yml#/components/schemas/SchemaSetDetails' '400': $ref: 'components.yml#/components/responses/BadRequest' '401': $ref: 'components.yml#/components/responses/Unauthorized' '403': $ref: 'components.yml#/components/responses/Forbidden' - '409': - $ref: 'components.yml#/components/responses/Conflict' '500': $ref: 'components.yml#/components/responses/InternalServerError' @@ -97,6 +78,7 @@ schemaSetBySchemaSetName: summary: Get a schema set operationId: getSchemaSet parameters: + - $ref: 'components.yml#/components/parameters/apiVersionInPath' - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' - $ref: 'components.yml#/components/parameters/schemaSetNameInPath' responses: @@ -121,6 +103,7 @@ schemaSetBySchemaSetName: summary: Delete a schema set operationId: deleteSchemaSet parameters: + - $ref: 'components.yml#/components/parameters/apiVersionInPath' - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' - $ref: 'components.yml#/components/parameters/schemaSetNameInPath' responses: @@ -145,6 +128,7 @@ anchorsByDataspace: summary: Get anchors operationId: getAnchors parameters: + - $ref: 'components.yml#/components/parameters/apiVersionInPath' - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' responses: '200': @@ -163,29 +147,6 @@ anchorsByDataspace: $ref: 'components.yml#/components/responses/Forbidden' '500': $ref: 'components.yml#/components/responses/InternalServerError' - post: - description: Create a new anchor in the given dataspace - tags: - - cps-admin - summary: Create an anchor - operationId: createAnchor - parameters: - - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' - - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery' - - $ref: 'components.yml#/components/parameters/anchorNameInQuery' - responses: - '201': - $ref: 'components.yml#/components/responses/Created' - '400': - $ref: 'components.yml#/components/responses/BadRequest' - '401': - $ref: 'components.yml#/components/responses/Unauthorized' - '403': - $ref: 'components.yml#/components/responses/Forbidden' - '409': - $ref: 'components.yml#/components/responses/Conflict' - '500': - $ref: 'components.yml#/components/responses/InternalServerError' anchorByDataspaceAndAnchorName: get: @@ -195,6 +156,7 @@ anchorByDataspaceAndAnchorName: summary: Get an anchor operationId: getAnchor parameters: + - $ref: 'components.yml#/components/parameters/apiVersionInPath' - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' - $ref: 'components.yml#/components/parameters/anchorNameInPath' responses: @@ -219,6 +181,7 @@ anchorByDataspaceAndAnchorName: summary: Delete an anchor operationId: deleteAnchor parameters: + - $ref: 'components.yml#/components/parameters/apiVersionInPath' - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' - $ref: 'components.yml#/components/parameters/anchorNameInPath' responses: @@ -231,4 +194,57 @@ anchorByDataspaceAndAnchorName: '403': $ref: 'components.yml#/components/responses/Forbidden' '500': - $ref: 'components.yml#/components/responses/InternalServerError' \ No newline at end of file + $ref: 'components.yml#/components/responses/InternalServerError' + +adminDataspaces: + get: + description: Read all dataspaces + tags: + - cps-admin + summary: Get all dataspaces + operationId: getAllDataspaces + parameters: + - $ref: 'components.yml#/components/parameters/apiVersionInPath' + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: 'components.yml#/components/schemas/DataspaceDetails' + '400': + $ref: 'components.yml#/components/responses/BadRequest' + '401': + $ref: 'components.yml#/components/responses/Unauthorized' + '403': + $ref: 'components.yml#/components/responses/Forbidden' + '500': + $ref: 'components.yml#/components/responses/InternalServerError' + +adminDataspace: + get: + description: Read a dataspace given a dataspace name + tags: + - cps-admin + summary: Get a dataspace + operationId: getDataspace + parameters: + - $ref: 'components.yml#/components/parameters/apiVersionInPath' + - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: 'components.yml#/components/schemas/DataspaceDetails' + '400': + $ref: 'components.yml#/components/responses/BadRequest' + '401': + $ref: 'components.yml#/components/responses/Unauthorized' + '403': + $ref: 'components.yml#/components/responses/Forbidden' + '500': + $ref: 'components.yml#/components/responses/InternalServerError'