From 567334fad3ba99007b5095cc9d6041915549db45 Mon Sep 17 00:00:00 2001 From: Stephan Jaensch Date: Fri, 10 May 2019 12:49:07 +0200 Subject: [PATCH 1/2] Fix missing schema type in YAML example spec --- examples/v2.0/yaml/petstore-expanded.yaml | 3 +++ examples/v2.0/yaml/petstore.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/examples/v2.0/yaml/petstore-expanded.yaml b/examples/v2.0/yaml/petstore-expanded.yaml index e415dae654..3c1641f176 100644 --- a/examples/v2.0/yaml/petstore-expanded.yaml +++ b/examples/v2.0/yaml/petstore-expanded.yaml @@ -109,6 +109,7 @@ paths: $ref: '#/definitions/Error' definitions: Pet: + type: "object" allOf: - $ref: '#/definitions/NewPet' - required: @@ -119,6 +120,7 @@ definitions: format: int64 NewPet: + type: "object" required: - name properties: @@ -128,6 +130,7 @@ definitions: type: string Error: + type: "object" required: - code - message diff --git a/examples/v2.0/yaml/petstore.yaml b/examples/v2.0/yaml/petstore.yaml index 4003794e83..5f41fe091f 100644 --- a/examples/v2.0/yaml/petstore.yaml +++ b/examples/v2.0/yaml/petstore.yaml @@ -74,6 +74,7 @@ paths: $ref: '#/definitions/Error' definitions: Pet: + type: "object" required: - id - name @@ -90,6 +91,7 @@ definitions: items: $ref: '#/definitions/Pet' Error: + type: "object" required: - code - message From fc424d88448bee1f016a4d481ed9e5fdeffe1f12 Mon Sep 17 00:00:00 2001 From: Darrel Date: Thu, 16 May 2019 12:28:41 -0400 Subject: [PATCH 2/2] Moved type: object into allOf --- examples/v2.0/yaml/petstore-expanded.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/v2.0/yaml/petstore-expanded.yaml b/examples/v2.0/yaml/petstore-expanded.yaml index 3c1641f176..de93377412 100644 --- a/examples/v2.0/yaml/petstore-expanded.yaml +++ b/examples/v2.0/yaml/petstore-expanded.yaml @@ -109,11 +109,11 @@ paths: $ref: '#/definitions/Error' definitions: Pet: - type: "object" allOf: - $ref: '#/definitions/NewPet' - required: - id + type: "object" properties: id: type: integer