diff --git a/examples/v3.1/webhook-example.json b/examples/v3.1/webhook-example.json index 4af0289112..712a42f120 100644 --- a/examples/v3.1/webhook-example.json +++ b/examples/v3.1/webhook-example.json @@ -4,38 +4,6 @@ "title": "Webhook Example", "version": "1.0.0" }, - "paths": { - "/pets": { - "get": { - "summary": "List all pets", - "operationId": "listPets", - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "How many items to return at one time (max 100)", - "required": false, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "A paged array of pets", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pets" - } - } - } - } - } - } - } - }, "webhooks": { "newPet": { "post": { @@ -76,12 +44,6 @@ "type": "string" } } - }, - "Pets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Pet" - } } } } diff --git a/examples/v3.1/webhook-example.yaml b/examples/v3.1/webhook-example.yaml index 664966a35a..2ac1cda985 100644 --- a/examples/v3.1/webhook-example.yaml +++ b/examples/v3.1/webhook-example.yaml @@ -2,28 +2,7 @@ openapi: 3.1.0 info: title: Webhook Example version: 1.0.0 -paths: - # OpenAPI documents all need a paths element - /pets: - get: - summary: List all pets - operationId: listPets - parameters: - - name: limit - in: query - description: How many items to return at one time (max 100) - required: false - schema: - type: integer - format: int32 - responses: - '200': - description: A paged array of pets - content: - application/json: - schema: - $ref: "#/components/schemas/Pets" - +# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components webhooks: # Each webhook needs a name newPet: @@ -53,9 +32,4 @@ components: type: string tag: type: string - Pets: - type: array - items: - $ref: "#/components/schemas/Pet" -