- New top-level field - `webhooks`. This allows describing out-of-band webhooks that are available as part of the API. - New top-level field - `jsonSchemaDialect`. This allows defining of a default `$schema` value for Schema Objects - The Info Object has a new `summary` field. - The License Object now has a new `identifier` field for SPDX licenses. This `identifier` field is mutually exclusive with the `url` field. Either can be used in OpenAPI 3.1 definitions. - Components Object now has a new entry `pathItems`, to allow for reusable Path Item Objects to be defined within a valid OpenAPI document. - `License` and `Contact` components are now exported and available via `getComponent` - New version predicates and selectors for `isOpenAPI30` and `isOpenAPI31`. This avoids needing to change the usage of `isOAS3` selector. - New OAS3 components: `Webhooks` - New OAS3 wrapped components: `Info`, `License`
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
openapi: 3.1.0
|
|
info:
|
|
title: OpenAPI 3.1 Webhooks
|
|
version: 1.0.0
|
|
summary: a new 3.1.x specific field for summary
|
|
description: This is a sample server for a pet store.
|
|
termsOfService: https://example.com/terms/
|
|
license:
|
|
name: Apache 2.0
|
|
identifier: Apache-2.0
|
|
webhooks:
|
|
newPet:
|
|
post:
|
|
summary: summary for newPet--post
|
|
requestBody:
|
|
description: Information about a new pet in the system
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/foo"
|
|
responses:
|
|
"200":
|
|
description: Return a 200 status to indicate that the data was received successfully
|
|
put:
|
|
summary: summary for newPet--put
|
|
requestBody:
|
|
description: Information about a new pet in the system
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/foo"
|
|
responses:
|
|
"200":
|
|
description: Return a 200 status to indicate that the data was received successfully
|
|
oldPet:
|
|
post:
|
|
summary: summary for oldPet--post
|
|
requestBody:
|
|
description: Information about a new pet in the system
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/foo"
|
|
responses:
|
|
"200":
|
|
description: Return a 200 status to indicate that the data was received successfully
|
|
components:
|
|
schemas:
|
|
foo:
|
|
type: string
|