From 379d4f494f20aa41164c9e85f42e367ed0a148d2 Mon Sep 17 00:00:00 2001 From: p1c2u Date: Sat, 10 Jun 2023 08:30:13 +0100 Subject: [PATCH] allow path item ref fix --- .../resources/schemas/v3.1/schema.json | 2 +- tests/integration/data/v3.1/petstore.yaml | 55 ++++++++++--------- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/openapi_spec_validator/resources/schemas/v3.1/schema.json b/openapi_spec_validator/resources/schemas/v3.1/schema.json index b8302d2..6b1105d 100644 --- a/openapi_spec_validator/resources/schemas/v3.1/schema.json +++ b/openapi_spec_validator/resources/schemas/v3.1/schema.json @@ -278,7 +278,7 @@ "type": "object", "patternProperties": { "^/": { - "$ref": "#/$defs/path-item" + "$ref": "#/$defs/path-item-or-reference" } }, "$ref": "#/$defs/specification-extensions", diff --git a/tests/integration/data/v3.1/petstore.yaml b/tests/integration/data/v3.1/petstore.yaml index d4e2ba4..3315706 100644 --- a/tests/integration/data/v3.1/petstore.yaml +++ b/tests/integration/data/v3.1/petstore.yaml @@ -55,31 +55,7 @@ paths: schema: $ref: "#/components/schemas/Error" /pets/{petId}: - get: - summary: Info for a specific pet - operationId: showPetById - tags: - - pets - parameters: - - name: petId - in: path - required: true - description: The id of the pet to retrieve - schema: - type: string - responses: - '200': - description: Expected response to a valid request - content: - application/json: - schema: - $ref: "#/components/schemas/Pets" - default: - description: unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" + $ref: "#/components/pathItems/PetPath" components: schemas: Pet: @@ -109,4 +85,31 @@ components: type: integer format: int32 message: - type: string \ No newline at end of file + type: string + pathItems: + PetPath: + get: + summary: Info for a specific pet + operationId: showPetById + tags: + - pets + parameters: + - name: petId + in: path + required: true + description: The id of the pet to retrieve + schema: + type: string + responses: + '200': + description: Expected response to a valid request + content: + application/json: + schema: + $ref: "#/components/schemas/Pets" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" \ No newline at end of file pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy