From 96ff99457ed22b6c2b41484bc6949d2cfc4d71a0 Mon Sep 17 00:00:00 2001 From: Pravin Ranjan Date: Mon, 27 Dec 2021 23:56:51 +0530 Subject: [PATCH 1/3] Swagger Update --- openapi-spec/swagger.yaml | 297 +++++++++++++++++++++++++++++++++----- 1 file changed, 264 insertions(+), 33 deletions(-) diff --git a/openapi-spec/swagger.yaml b/openapi-spec/swagger.yaml index a32217750..13230d305 100644 --- a/openapi-spec/swagger.yaml +++ b/openapi-spec/swagger.yaml @@ -23,6 +23,9 @@ # openapi: 3.0.0 servers: + # Added by API Auto Mocking Plugin + - description: SwaggerHub API Auto Mocking + url: https://virtserver.swaggerhub.com/opensdscommon/OpensdsAPI3.0/1.0.0 - description: SwaggerHub API Auto Mocking url: 'https://virtserver.swaggerhub.com/open83/multi-cloud/1.0.0' - url: 'http://virtserver.swaggerhub.com/opensds.io/OpenSDS-Multi-Cloud/1.0.0' @@ -288,7 +291,7 @@ paths: backends: type: array items: - $ref: '#/components/schemas/Backend' + $ref: '#/components/schemas/Backend_List' next: type: integer example: 1 @@ -319,7 +322,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Backend' + $ref: '#/components/schemas/Backend_List' '401': description: Unauthorized. Token not found in header '404': @@ -346,11 +349,11 @@ paths: schema: type: object properties: - Access: + access: description: Updated the specified backend access Id type: string example: 'AMIKJGNJLHUEBWTNDL6X' - Security: + security: description: Updated the specified backend security Id type: string example: 'Fsgs5KHAcs12420yGHNDGne8x8i5naHvdf/xZbTH' @@ -403,10 +406,28 @@ paths: backends: type: array items: - $ref: '#/components/schemas/Type' + oneOf: + - $ref: '#/components/schemas/AWS_Type' + - $ref: '#/components/schemas/Huawei_Type' + - $ref: '#/components/schemas/Azure_Type' + - $ref: '#/components/schemas/Ceph_Type' + - $ref: '#/components/schemas/GCP_Type' + - $ref: '#/components/schemas/FS_Type' + - $ref: '#/components/schemas/IBM_Type' + - $ref: '#/components/schemas/YIG_Type' + - $ref: '#/components/schemas/Alibaba_Type' + - $ref: '#/components/schemas/AWS_File_Type' + - $ref: '#/components/schemas/Azure_File_Type' + - $ref: '#/components/schemas/GCP_File_Type' + - $ref: '#/components/schemas/AWS_Block_Type' + - $ref: '#/components/schemas/Hw_Block_Type' + - $ref: '#/components/schemas/Hw_File_Type' + - $ref: '#/components/schemas/Sony_Oda_Type' + + next: type: integer - example: 1 + example: 16 '401': description: Unauthorized. Token not found in header '/v1/{tenantId}/plans': @@ -807,11 +828,7 @@ paths: operationId: bucketPut responses: '200': - description: successful create bucket - content: - application/xml: - schema: - $ref: '#/components/schemas/BaseResponse' + description: No Content, i.e Bucket created successfully '403': description: Forbidden; Access Denied, InvalidAccessKey, SignatureDoesNotMatch '500': @@ -844,11 +861,7 @@ paths: operationId: bucketdelete responses: '204': - description: No Content i.e. Successful Delete Bucket - content: - application/xml: - schema: - $ref: '#/components/schemas/BaseResponse' + description: No Content, i.e Bucket deleted successfully '403': description: Forbidden; Access Denied, InvalidAccessKey, SignatureDoesNotMatch '404': @@ -1487,46 +1500,97 @@ components: description: 'Valid User ID' type: string example: 558057c4256545bd8a307c37464003c9 - Backend: + Backend_Request: type: object properties: - Id: + name: + description: The backend name specified by user. + type: string + example: backend001 + type: + description: The backend type. + type: string + example: aws-s3 + enum: *CLOUD_BACKENDS + region: + type: string + example: ap-south-1 + endpoint: + type: string + example: s3.ap-south-1.amazonaws.com + access: + type: string + example: '4X7JQDFTCYUNWFBRYZVC' + security: + type: string + example: '9hr0ekZgg0vZHulEekTVfWuu1lnPFvpVAJQNHXdn' + Backend_List: + type: object + properties: + id: description: The backend ID, generated by server type: string example: '5ea809d2553b0f000116be32' - TenantId: + tenantId: description: The tenant UUID in a multi-tenancy environment. type: string example: '94b280022d0c4401bcf3b0ea85870519' - UserId: + userId: description: The user UUID in a multi-tenancy environment. type: string example: '558057c4256545bd8a307c37464003c9' - Name: + name: description: The backend name specified by user. type: string example: backend001 - Type: + type: description: The backend type. type: string example: aws-s3 enum: *CLOUD_BACKENDS - Region: + region: type: string example: ap-south-1 - Endpoint: + endpoint: type: string - example: s3.amazonaws.com - BucketName: + example: s3.ap-south-1.amazonaws.com + Backend: + type: object + properties: + id: + description: The backend ID, generated by server type: string - example: bucket001 - Access: + example: '5ea809d2553b0f000116be32' + tenantId: + description: The tenant UUID in a multi-tenancy environment. + type: string + example: '94b280022d0c4401bcf3b0ea85870519' + userId: + description: The user UUID in a multi-tenancy environment. + type: string + example: '558057c4256545bd8a307c37464003c9' + name: + description: The backend name specified by user. + type: string + example: backend001 + type: + description: The backend type. + type: string + example: aws-s3 + enum: *CLOUD_BACKENDS + region: + type: string + example: ap-south-1 + endpoint: + type: string + example: s3.ap-south-1.amazonaws.com + access: type: string example: '4X7JQDFTCYUNWFBRYZVC' - Security: + security: type: string example: '9hr0ekZgg0vZHulEekTVfWuu1lnPFvpVAJQNHXdn' - Type: + AWS_Type: type: object properties: name: @@ -1537,6 +1601,171 @@ components: description: The backend type description. type: string example: AWS Simple Cloud Storage Service(S3) + Huawei_Type: + type: object + properties: + name: + description: The backend type name. + type: string + example: hw-obs + description: + description: The backend type description. + type: string + example: Huawei Storage Object Service(OBS) + Azure_Type: + type: object + properties: + name: + description: The backend type name. + type: string + example: azure-blob + description: + description: The backend type description. + type: string + example: Azure Blob Storage + Ceph_Type: + type: object + properties: + name: + description: The backend type name. + type: string + example: ceph-s3 + description: + description: The backend type description. + type: string + example: Ceph Object Storage + GCP_Type: + type: object + properties: + name: + description: The backend type name. + type: string + example: gcp-s3 + description: + description: The backend type description. + type: string + example: GCP Storage + FS_Type: + type: object + properties: + name: + description: The backend type name. + type: string + example: fusionstorage-object + description: + description: The backend type description. + type: string + example: Huawei Fusionstorage Object Storage + IBM_Type: + type: object + properties: + name: + description: The backend type name. + type: string + example: ibm-cos + description: + description: The backend type description. + type: string + example: IBM Cloud Object Storage + YIG_Type: + type: object + properties: + name: + description: The backend type name. + type: string + example: yig + description: + description: The backend type description. + type: string + example: YIG Storage + Alibaba_Type: + type: object + properties: + name: + description: The backend type name. + type: string + example: alibaba-oss + description: + description: The backend type description. + type: string + example: Alibaba Object Storage Service(OSS) + AWS_File_Type: + type: object + properties: + name: + description: The backend type name. + type: string + example: aws-file + description: + description: The backend type description. + type: string + example: AWS File Service + Azure_File_Type: + type: object + properties: + name: + description: The backend type name. + type: string + example: azure-file + description: + description: The backend type description. + type: string + example: Azure File Service + GCP_File_Type: + type: object + properties: + name: + description: The backend type name. + type: string + example: gcp-file + description: + description: The backend type description. + type: string + example: GCP File Service + AWS_Block_Type: + type: object + properties: + name: + description: The backend type name. + type: string + example: aws-block + description: + description: The backend type description. + type: string + example: AWS Block Service + Hw_File_Type: + type: object + properties: + name: + description: The backend type name. + type: string + example: hw-file + description: + description: The backend type description. + type: string + example: Huawei File Service + Hw_Block_Type: + type: object + properties: + name: + description: The backend type name. + type: string + example: hw-block + description: + description: The backend type description. + type: string + example: Hw Block Service + Sony_Oda_Type: + type: object + properties: + name: + description: The backend type name. + type: string + example: sony-oda + description: + description: The backend type description. + type: string + example: Sony-ODA Object Storage KV: type: object properties: @@ -2304,12 +2533,14 @@ components: BaseResponse: type: object properties: - ErrorCode: + ReturnCode: description: error code - type: string + type: integer + example: 200 Message: description: sucessfully or failure type: string + example: 1 CreateBucketConfiguration: type: object xml: @@ -2712,7 +2943,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/Backend' + $ref: '#/components/schemas/Backend_Request' description: Cloud Backend configurations required: true Plan: From ac451b666dd4d12943bfeae34e6d23d3902fc2d6 Mon Sep 17 00:00:00 2001 From: Pravin Ranjan Date: Tue, 28 Dec 2021 00:02:02 +0530 Subject: [PATCH 2/3] Swagger Update --- openapi-spec/swagger.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/openapi-spec/swagger.yaml b/openapi-spec/swagger.yaml index 13230d305..09b82cb1a 100644 --- a/openapi-spec/swagger.yaml +++ b/openapi-spec/swagger.yaml @@ -23,9 +23,6 @@ # openapi: 3.0.0 servers: - # Added by API Auto Mocking Plugin - - description: SwaggerHub API Auto Mocking - url: https://virtserver.swaggerhub.com/opensdscommon/OpensdsAPI3.0/1.0.0 - description: SwaggerHub API Auto Mocking url: 'https://virtserver.swaggerhub.com/open83/multi-cloud/1.0.0' - url: 'http://virtserver.swaggerhub.com/opensds.io/OpenSDS-Multi-Cloud/1.0.0' From d01696c21a2b6aa2ac2cb15230c85e9b0a6a775d Mon Sep 17 00:00:00 2001 From: Pravin Ranjan Date: Fri, 31 Dec 2021 15:55:40 +0530 Subject: [PATCH 3/3] Swagger Update --- openapi-spec/swagger.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/openapi-spec/swagger.yaml b/openapi-spec/swagger.yaml index 09b82cb1a..895e36cc0 100644 --- a/openapi-spec/swagger.yaml +++ b/openapi-spec/swagger.yaml @@ -1591,7 +1591,7 @@ components: type: object properties: name: - description: The backend type name. + description: The backend type. type: string example: aws-s3 description: @@ -1602,7 +1602,7 @@ components: type: object properties: name: - description: The backend type name. + description: The backend type. type: string example: hw-obs description: @@ -1613,7 +1613,7 @@ components: type: object properties: name: - description: The backend type name. + description: The backend type. type: string example: azure-blob description: @@ -1624,7 +1624,7 @@ components: type: object properties: name: - description: The backend type name. + description: The backend type. type: string example: ceph-s3 description: @@ -1635,7 +1635,7 @@ components: type: object properties: name: - description: The backend type name. + description: The backend type. type: string example: gcp-s3 description: @@ -1646,7 +1646,7 @@ components: type: object properties: name: - description: The backend type name. + description: The backend type. type: string example: fusionstorage-object description: @@ -1657,7 +1657,7 @@ components: type: object properties: name: - description: The backend type name. + description: The backend type. type: string example: ibm-cos description: @@ -1668,7 +1668,7 @@ components: type: object properties: name: - description: The backend type name. + description: The backend type. type: string example: yig description: @@ -1679,7 +1679,7 @@ components: type: object properties: name: - description: The backend type name. + description: The backend type. type: string example: alibaba-oss description: @@ -1690,7 +1690,7 @@ components: type: object properties: name: - description: The backend type name. + description: The backend type. type: string example: aws-file description: @@ -1701,7 +1701,7 @@ components: type: object properties: name: - description: The backend type name. + description: The backend type. type: string example: azure-file description: @@ -1712,7 +1712,7 @@ components: type: object properties: name: - description: The backend type name. + description: The backend type. type: string example: gcp-file description: @@ -1723,7 +1723,7 @@ components: type: object properties: name: - description: The backend type name. + description: The backend type. type: string example: aws-block description: @@ -1734,7 +1734,7 @@ components: type: object properties: name: - description: The backend type name. + description: The backend type. type: string example: hw-file description: @@ -1745,7 +1745,7 @@ components: type: object properties: name: - description: The backend type name. + description: The backend type. type: string example: hw-block description: @@ -1756,7 +1756,7 @@ components: type: object properties: name: - description: The backend type name. + description: The backend type. type: string example: sony-oda description: