Skip to content

v3.1.0-rc1 Release #2370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 51 commits into from
Oct 9, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
7a5b183
3.1.0 prep
webron Oct 8, 2018
77f86eb
Update README
webron Oct 8, 2018
e985f13
Allow specification extensions in discriminator object
MikeRalphson Oct 18, 2018
eb92123
Note that specification extensions beginning x-oas- are reserved
MikeRalphson Oct 18, 2018
3083f1a
Merge pull request #1715 from MikeRalphson/specext-oas
Oct 18, 2018
334cf53
Merge pull request #1714 from MikeRalphson/discrim-ext
Oct 18, 2018
d27bb1c
security; add mutualTLS securityScheme type
MikeRalphson Nov 27, 2018
a76dad5
Merge pull request #1764 from MikeRalphson/v3.1-mutualTLS
Feb 7, 2019
5f6a25a
832 add info.summary (#1779)
ioggstream Feb 28, 2019
5044418
fix OIDC url and OAuth2 requirements
AxelNennker Jun 21, 2019
192aafe
Merge pull request #1959 from AxelNennker/fix_OICD_and_OAuth2
MikeRalphson Aug 6, 2019
ac236d1
Update Schema Object to proper JSON Schema
Jun 21, 2019
f8f92ed
update vocab and arbitrary props
Oct 25, 2019
e121405
another go at arbitrary keywords
Oct 28, 2019
5905f45
feedback from @handrews
Oct 29, 2019
0ec2c73
Support style, explode, allowReserved encoding for multipart/form-dat…
Nov 27, 2019
4822592
default should match json schema
Jan 9, 2020
d67f350
removed json schema keyworld list, its just all of em.
Jan 9, 2020
bb9a6f2
redundant $ref reference
Jan 9, 2020
e3c236a
Merge pull request #1977 from philsturgeon/json-schema-update
Jan 9, 2020
fd39bcd
Correct Styles Values for spaceDelimited and pipeDelimited, as based …
Arhimenrius Jan 10, 2020
61f9d7e
Add support for webhooks as a top-level element (#2103)
lornajane Jan 16, 2020
3cb92bd
Align the OAS 3.1 nullable language with the 3.0.3 (#2115)
handrews Feb 6, 2020
c37a305
allow, but discourage, requestBody for GET, HEAD, DELETE (#2117)
n2ygk Feb 6, 2020
92a9104
Reference Object and Schema Object use of $ref updates for 2019-09 / …
handrews Feb 6, 2020
c376bef
Fix table cell formatting containing `nullable` description (#2152)
hkosova Feb 21, 2020
70ecce7
Add SPDX identifier field to license object, fixes #1599 (#2105)
MikeRalphson Feb 27, 2020
c6415fe
Add information about objects to the description too
Arhimenrius Mar 11, 2020
a6b99bc
Make paths object optional (#1781)
MikeRalphson Mar 19, 2020
b5a15df
Fwd port v3.0.3 dev to v3.1.0 dev (#2163)
MikeRalphson Mar 19, 2020
b45d0d8
security; widen use of scopes array to other securityScheme types (#1…
MikeRalphson Mar 19, 2020
cafadc9
Allow summary and description as $ref siblings (#2181)
MikeRalphson Mar 26, 2020
6abda3b
Merge pull request #2101 from Arhimenrius/correct-style-values-types
earth2marsh Apr 9, 2020
1a8d44f
HTTP not REST (#1946)
philsturgeon Apr 9, 2020
d5b65bb
Missing updates
May 6, 2020
3678d30
Merge pull request #2224 from OAI/Missing-updates
MikeRalphson May 7, 2020
ece5497
Remove boolean compatibility for exclusive* (#2226)
handrews May 14, 2020
69662e4
Update "format" and "content*" for new JSON Schema (#2200)
handrews May 28, 2020
835a18f
[3.1.0-dev] drop OAS semver requirement (#2243)
MikeRalphson May 28, 2020
ee77d2d
Remove "nullable" entirely (#2246)
handrews May 28, 2020
3a96dfe
Update version for release (#2269)
Jun 18, 2020
df7f5f9
$schema Guidance (#2266)
philsturgeon Jul 23, 2020
912ef8d
v3.1.0: rephrase data-type section because `format` keyword can be us…
sebastien-rosset Aug 27, 2020
437b407
Added change to address #2287 (#2328)
darrelmiller Sep 3, 2020
280ae0e
Make Server Variable Object's properties more strict (#2335)
Sep 3, 2020
99ceb0b
docs(Components): fix typo in schemas field type (#2337)
char0n Sep 4, 2020
4ad45ad
Fix indentation of a YAML comment
hkosova Sep 17, 2020
7fc06e0
Removed required constraint on responses object (#2329)
darrelmiller Oct 1, 2020
0e91fe8
Merge pull request #2352 from hkosova/comment-indent-fix
MikeRalphson Oct 7, 2020
8da2c2a
3.1.0-rc1 Release prep (#2369)
Oct 8, 2020
9d59a51
Merge branch 'master' into v3.1.0-dev
webron Oct 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add support for webhooks as a top-level element (#2103)
* Add webhooks as a top-level element to the spec

* Add the changes from #2048 and signpost webhooks

* Add an example of webhooks

* Relocate and expand on webhooks section following feedback

* Better wording to describe expectations on API consumers

* Clearer wording for why the paths element is here

* Update language to make callbacks clearer
  • Loading branch information
lornajane authored and darrelmiller committed Jan 16, 2020
commit 61f9d7e2398dfb1c1211ca30af3a5331cd3863d2
61 changes: 61 additions & 0 deletions examples/v3.1/webhook-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
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"

webhooks:
# Each webhook needs a name
newPet:
# This is a Path Item Object, the only difference is that the request is initiated by the API provider
post:
requestBody:
description: Information about a new pet in the system
content:
application/json:
schema:
$ref: "#/components/schemas/Pet"
responses:
"200":
description: Return a 200 status to indicate that the data was received successfully

components:
schemas:
Pet:
required:
- id
- name
properties:
id:
type: integer
format: int64
name:
type: string
tag:
type: string
Pets:
type: array
items:
$ref: "#/components/schemas/Pet"


32 changes: 26 additions & 6 deletions versions/3.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,13 @@ Field Name | Type | Description
<a name="oasInfo"></a>info | [Info Object](#infoObject) | **REQUIRED**. Provides metadata about the API. The metadata MAY be used by tooling as required.
<a name="oasServers"></a>servers | [[Server Object](#serverObject)] | An array of Server Objects, which provide connectivity information to a target server. If the `servers` property is not provided, or is an empty array, the default value would be a [Server Object](#serverObject) with a [url](#serverUrl) value of `/`.
<a name="oasPaths"></a>paths | [Paths Object](#pathsObject) | **REQUIRED**. The available paths and operations for the API.
<a name="oasWebhooks"></a>webhooks | Map[`string`, [Path Item Object](#pathItemObject)] | The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement. Closely related to the `callbacks` feature, this section describes requests initiated other than by an API call, for example by an out of band registration. The key name is a unique string to refer to each webhook, while the Path Item Object describes a request that may be initiated by the API provider and the expected responses. An [example](../examples/v3.1/webhook-example.yaml) is available.
<a name="oasComponents"></a>components | [Components Object](#componentsObject) | An element to hold various schemas for the specification.
<a name="oasSecurity"></a>security | [[Security Requirement Object](#securityRequirementObject)] | A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition.
<a name="oasTags"></a>tags | [[Tag Object](#tagObject)] | A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the [Operation Object](#operationObject) must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique.
<a name="oasExternalDocs"></a>externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation.


This object MAY be extended with [Specification Extensions](#specificationExtensions).

#### <a name="infoObject"></a>Info Object
Expand Down Expand Up @@ -1844,6 +1846,8 @@ A map of possible out-of band callbacks related to the parent operation.
Each value in the map is a [Path Item Object](#pathItemObject) that describes a set of requests that may be initiated by the API provider and the expected responses.
The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.

To describe incoming requests from the API provider independent from another API call, use the [`webhooks`](#oasWebhooks) field.

##### Patterned Fields
Field Pattern | Type | Description
---|:---:|---
Expand Down Expand Up @@ -1893,25 +1897,41 @@ $request.body#/successUrls/2 | https://clientdomain.com/medium
$response.header.Location | https://example.org/subscription/1


##### Callback Object Example
##### Callback Object Examples

The following example shows a callback to the URL specified by the `id` and `email` property in the request body.
The following example uses the user provided `queryUrl` query string parameter to define the callback URL. This is an example of how to use a callback object to describe a callback that goes with the subscription operation to enable registering for the callback.

```yaml
myWebhook:
'https://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
myCallback:
'{$request.query.queryUrl}':
post:
requestBody:
description: Callback payload
content:
content:
'application/json':
schema:
$ref: '#/components/schemas/SomePayload'
responses:
'200':
description: webhook successfully processed and no retries will be performed
description: callback successfully processed
```

The following example shows a callback where the server is hard-coded, but the query string parameters are populated from the `id` and `email` property in the request body.

```yaml
transactionCallback:
'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
post:
requestBody:
description: Callback payload
content:
'application/json':
schema:
$ref: '#/components/schemas/SomePayload'
responses:
'200':
description: callback successfully processed
```

#### <a name="exampleObject"></a>Example Object

Expand Down