From 862872fc5f994de93b0ae0982126855b1ee5062e Mon Sep 17 00:00:00 2001 From: hemantagogoi-infy Date: Tue, 16 Jun 2026 22:41:43 +0530 Subject: [PATCH] Use common CAMARA refs for components Replace local component definitions with $ref pointers to ../common/CAMARA_common.yaml to centralize shared items. --- code/API_definitions/multi-point-vpn.yaml | 178 +--------------------- 1 file changed, 8 insertions(+), 170 deletions(-) diff --git a/code/API_definitions/multi-point-vpn.yaml b/code/API_definitions/multi-point-vpn.yaml index a309103..43a5ac1 100644 --- a/code/API_definitions/multi-point-vpn.yaml +++ b/code/API_definitions/multi-point-vpn.yaml @@ -280,23 +280,13 @@ paths: components: securitySchemes: openId: - description: OpenIdConnect security scheme - type: openIdConnect - openIdConnectUrl: https://example.com/.well-known/openid-configuration + $ref: "../common/CAMARA_common.yaml#/components/securitySchemes/openId" headers: x-correlator: - description: Correlation id for the different services - required: false - schema: - $ref: "#/components/schemas/XCorrelator" + $ref: "../common/CAMARA_common.yaml#/components/headers/x-correlator" parameters: x-correlator: - name: x-correlator - in: header - description: Correlation id for the different services - required: false - schema: - $ref: "#/components/schemas/XCorrelator" + $ref: "../common/CAMARA_common.yaml#/components/parameters/x-correlator" serviceId: name: serviceId required: true @@ -393,28 +383,6 @@ components: - days - months - years - ErrorInfo: - description: Common schema for errors - type: object - required: - - status - - code - - message - properties: - status: - type: integer - format: int32 - minimum: 100 - maximum: 599 - description: HTTP status code returned along with this error response - code: - type: string - maxLength: 255 - description: Code given to this error - message: - type: string - maxLength: 2048 - description: Detailed error description EdgeConnection: description: Edge connection details type: object @@ -591,12 +559,6 @@ components: - A - AA - AAA - XCorrelator: - type: string - description: Correlation id for the different services - maxLength: 256 - pattern: ^[a-zA-Z0-9-_:;.\/<>{}]{0,256}$ - example: "b4333c46-49c0-4f62-80d7-f0ef930f1c46" examples: siteToCloudVPNFeasibilityAssessmentRequest: summary: Assessment Sample 1 @@ -696,136 +658,12 @@ components: sla: A responses: Generic400: - description: Bad Request - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 400 - code: - enum: - - INVALID_ARGUMENT - - OUT_OF_RANGE - examples: - GENERIC_400_INVALID_ARGUMENT: - description: Invalid Argument. Generic Syntax Exception - value: - status: 400 - code: INVALID_ARGUMENT - message: Client specified an invalid argument, request body or query param. - GENERIC_400_OUT_OF_RANGE: - description: Out of Range. Specific Syntax Exception used when a given field has a pre-defined range or a invalid filter criteria combination is requested - value: - status: 400 - code: OUT_OF_RANGE - message: Client specified an invalid range. - + $ref: "../common/CAMARA_common.yaml#/components/responses/Generic400" Generic401: - description: Unauthorized - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 401 - code: - enum: - - UNAUTHENTICATED - examples: - GENERIC_401_UNAUTHENTICATED: - description: Request cannot be authenticated - value: - status: 401 - code: UNAUTHENTICATED - message: Request not authenticated due to missing, invalid, or expired credentials. - + $ref: "../common/CAMARA_common.yaml#/components/responses/Generic401" Generic403: - description: Forbidden - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 403 - code: - enum: - - PERMISSION_DENIED - examples: - GENERIC_403_PERMISSION_DENIED: - description: Permission denied. OAuth2 token access does not have the required scope or when the user fails operational security - value: - status: 403 - code: PERMISSION_DENIED - message: Client does not have sufficient permissions to perform this action. + $ref: "../common/CAMARA_common.yaml#/components/responses/Generic403" Generic404: - description: Not Found - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 404 - code: - enum: - - NOT_FOUND - examples: - GENERIC_404_NOT_FOUND: - description: Resource not found - value: - status: 404 - code: NOT_FOUND - message: The specified resource was not found. + $ref: "../common/CAMARA_common.yaml#/components/responses/Generic404" Generic500: - description: Internal Server Error - headers: - x-correlator: - $ref: "#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 500 - code: - enum: - - INTERNAL - examples: - GENERIC_500_INTERNAL: - description: Internal server error - value: - status: 500 - code: INTERNAL - message: Internal server error while processing request. + $ref: "../common/CAMARA_common.yaml#/components/responses/Generic500"