diff --git a/.spectral.yaml b/.spectral.yaml index 27a0be51..32c07d77 100644 --- a/.spectral.yaml +++ b/.spectral.yaml @@ -81,7 +81,7 @@ rules: message: "Use $ref for request body schema instead of inline definition. See openapi/README.md#avoid-inline-schemas-in-request-and-response-definitions" severity: error resolved: false - given: "$.paths[*][get,post,put,patch,delete].requestBody.content[application/json].schema" + given: "$.paths[*][get,post,put,patch,delete].requestBody.content.*.schema" then: field: "$ref" function: truthy @@ -92,7 +92,7 @@ rules: message: "Use $ref for response schema instead of inline definition. See openapi/README.md#avoid-inline-schemas-in-request-and-response-definitions" severity: error resolved: false - given: "$.paths[*][get,post,put,patch,delete].responses[*].content[application/json].schema" + given: "$.paths[*][get,post,put,patch,delete].responses[*].content.*.schema" then: field: "$ref" function: truthy diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index ca78efe5..c3e779d6 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -3002,14 +3002,7 @@ paths: content: multipart/form-data: schema: - type: object - required: - - file - properties: - file: - type: string - format: binary - description: CSV file containing customer information + $ref: '#/components/schemas/BulkCustomerImportRequest' responses: '202': description: CSV upload accepted for processing @@ -16699,6 +16692,15 @@ components: response_body: type: string description: The raw body content returned by the webhook endpoint in response to the request + BulkCustomerImportRequest: + type: object + required: + - file + properties: + file: + type: string + format: binary + description: CSV file containing customer information BulkCustomerImportJobAccepted: type: object required: diff --git a/openapi.yaml b/openapi.yaml index ca78efe5..c3e779d6 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3002,14 +3002,7 @@ paths: content: multipart/form-data: schema: - type: object - required: - - file - properties: - file: - type: string - format: binary - description: CSV file containing customer information + $ref: '#/components/schemas/BulkCustomerImportRequest' responses: '202': description: CSV upload accepted for processing @@ -16699,6 +16692,15 @@ components: response_body: type: string description: The raw body content returned by the webhook endpoint in response to the request + BulkCustomerImportRequest: + type: object + required: + - file + properties: + file: + type: string + format: binary + description: CSV file containing customer information BulkCustomerImportJobAccepted: type: object required: diff --git a/openapi/components/schemas/customers/BulkCustomerImportRequest.yaml b/openapi/components/schemas/customers/BulkCustomerImportRequest.yaml new file mode 100644 index 00000000..5d482cbc --- /dev/null +++ b/openapi/components/schemas/customers/BulkCustomerImportRequest.yaml @@ -0,0 +1,8 @@ +type: object +required: + - file +properties: + file: + type: string + format: binary + description: CSV file containing customer information diff --git a/openapi/paths/customers/customers_bulk_csv.yaml b/openapi/paths/customers/customers_bulk_csv.yaml index f65539a7..85084c80 100644 --- a/openapi/paths/customers/customers_bulk_csv.yaml +++ b/openapi/paths/customers/customers_bulk_csv.yaml @@ -104,14 +104,7 @@ post: content: multipart/form-data: schema: - type: object - required: - - file - properties: - file: - type: string - format: binary - description: CSV file containing customer information + $ref: ../../components/schemas/customers/BulkCustomerImportRequest.yaml responses: '202': description: CSV upload accepted for processing