From 093796ef3d1371c50c594e4934be525e3de665cf Mon Sep 17 00:00:00 2001 From: Talisson Galho Date: Wed, 10 Apr 2024 10:09:48 -0300 Subject: [PATCH] fix: domains endpoint - missing and incorrect fields (#205) --- domains.yaml | 167 ++++++++++++++++++--------------------------------- 1 file changed, 59 insertions(+), 108 deletions(-) diff --git a/domains.yaml b/domains.yaml index 6eef8b3d..f3d7dc8d 100644 --- a/domains.yaml +++ b/domains.yaml @@ -58,7 +58,7 @@ paths: "200": description: Successful response content: - application/json; version=3: + 'application/json; version=3': schema: $ref: "#/components/schemas/DomainResponseWithResults" "400": @@ -79,7 +79,7 @@ paths: description: It enables you to include a new domain into an account. requestBody: content: - application/json; version=3: + 'application/json; version=3': schema: $ref: "#/components/schemas/CreateDomainRequest" operationId: createDomain @@ -98,7 +98,7 @@ paths: "200": description: Successful response content: - application/json; version=3: + 'application/json; version=3': schema: $ref: "#/components/schemas/DomainResponseWithResult" "400": @@ -136,7 +136,7 @@ paths: "200": description: Successful response content: - application/json; version=3: + 'application/json; version=3': schema: $ref: "#/components/schemas/DomainResponseWithResult" "400": @@ -193,7 +193,7 @@ paths: instead of PUT. requestBody: content: - application/json; version=3: + 'application/json; version=3': schema: $ref: "#/components/schemas/PutDomainRequest" operationId: putDomain @@ -217,7 +217,7 @@ paths: "200": description: Successful response content: - application/json; version=3: + 'application/json; version=3': schema: $ref: "#/components/schemas/DomainResponseWithResult" "400": @@ -241,7 +241,7 @@ paths: fields not informed. requestBody: content: - application/json; version=3: + 'application/json; version=3': schema: $ref: "#/components/schemas/UpdateDomainRequest" operationId: updateDomain @@ -265,7 +265,7 @@ paths: "200": description: Successful response content: - application/json; version=3: + 'application/json; version=3': schema: $ref: "#/components/schemas/DomainResponseWithResult" "400": @@ -282,83 +282,82 @@ paths: description: Internal Server Error components: schemas: - CreateDomainRequest: - additionalProperties: false + DomainData: + type: object properties: - cnames: - type: array - items: - type: string - cname_access_only: - type: boolean name: type: string - is_active: - type: boolean - edge_application_id: - format: int64 - type: integer - digital_certificate_id: - format: int64 - type: integer - nullable: true - required: - - name - - edge_application_id - - cname_access_only - - cnames - - is_active - - digital_certificate_id - type: object - UpdateDomainRequest: - additionalProperties: false - properties: + minLength: 1 + maxLength: 100 + pattern: "[a-zA-Z0-9$%^&*()-+=\\[\\]{};:?><,|/]+" cnames: type: array items: type: string cname_access_only: type: boolean - name: - type: string is_active: type: boolean edge_application_id: format: int64 type: integer + minimum: 1 + maximum: 10000000000000000000 digital_certificate_id: format: int64 type: integer nullable: true - type: object - PutDomainRequest: - additionalProperties: false - properties: - cnames: - type: array - items: - type: string - cname_access_only: - type: boolean - name: + environment: type: string - is_active: + enum: + - production + - preview + is_mtls_enabled: type: boolean - edge_application_id: - format: int64 + mtls_trusted_ca_certificate_id: type: integer - digital_certificate_id: format: int64 - type: integer nullable: true + mtls_verification: + type: string + enum: + - enforce + - permissive + crl_list: + nullable: true + type: array + items: + type: integer + format: int64 + DomainEntity: + allOf: + - type: object + properties: + id: + type: integer + format: int64 + domain_name: + type: string + - $ref: "#/components/schemas/DomainData" + CreateDomainRequest: + allOf: + - $ref: "#/components/schemas/DomainData" + additionalProperties: false + required: + - name + - edge_application_id + - cnames + UpdateDomainRequest: + allOf: + - $ref: "#/components/schemas/DomainData" + PutDomainRequest: + allOf: + - $ref: "#/components/schemas/DomainData" + additionalProperties: false required: - name - edge_application_id - - cname_access_only - cnames - - is_active - - digital_certificate_id - type: object DomainLinks: additionalProperties: false properties: @@ -388,7 +387,7 @@ components: $ref: "#/components/schemas/DomainLinks" results: items: - $ref: "#/components/schemas/DomainResults" + $ref: "#/components/schemas/DomainEntity" required: - count - total_pages @@ -405,7 +404,7 @@ components: links: $ref: "#/components/schemas/DomainLinks" results: - $ref: "#/components/schemas/DomainResults" + $ref: "#/components/schemas/DomainEntity" total_pages: format: int64 type: integer @@ -416,54 +415,6 @@ components: - schema_version - results type: object - DomainResults: - additionalProperties: false - properties: - id: - format: int64 - type: integer - name: - type: string - cnames: - type: array - items: - type: string - cname_access_only: - type: boolean - is_active: - type: boolean - edge_application_id: - format: int64 - type: integer - digital_certificate_id: - format: int64 - type: integer - nullable: true - domain_name: - type: string - environment: - type: string - is_mtls_enabled: - type: boolean - mtls_trusted_ca_certificate_id: - type: string - nullable: true - mtls_verification: - type: string - nullable: true - required: - - id - - name - - cnames - - cname_access_only - - digital_certificate_id - - edge_application_id - - is_active - - domain_name - - is_mtls_enabled - - mtls_verification - - mtls_trusted_ca_certificate_id - type: object securitySchemes: tokenAuth: type: apiKey