Skip to content

Commit 3b1d2eb

Browse files
committed
Catch up on the added features
1 parent 2e9fcc2 commit 3b1d2eb

1 file changed

Lines changed: 31 additions & 9 deletions

File tree

draft-release-notes.md

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ What's coming up? Look at `src/oas.md` on the relevant development branch for fu
1616
- `kind` to allow multiple categories of tag. The `kind` field is free-form text, however there are some expected/conventional values such as `nav` (in line with the most common current usage as grouping for documentation output).
1717
- A [registry](https://spec.openapis.org/registry/tag-kind/index.html) to establish conventions for values used in `kind`.
1818

19+
### Document identity and URL resolution
20+
21+
- Additional top-level field `$self` is added to allow users to define the base URI of the document, used to resolve relative references.
22+
If no `$self` field is defined, then the retrieval URI is used - just as it was in previous versions of OpenAPI.
23+
- Other URL/URI handling does not change between 3.1 and 3.2 (but bears a recap in case you're wondering how it all goes together):
24+
- Other URLs, such as to external documentation or a license, are resolved against the base URI.
25+
- Relative links inside `description` fields are resolved relative to their rendered context, such as your published API documentation page.
26+
- API endpoints are resolved against the URL in the Server Object, which itself might be relative and resolved against the base URI.
27+
1928
### Updated security schemes
2029

2130
- Support for OAuth2 Device Authorization flow with additional `deviceAuthorization` field in the `flows` object and for the individual flow, a new field `deviceAuthorizationUrl` alongside `tokenUrl`.
@@ -27,7 +36,7 @@ What's coming up? Look at `src/oas.md` on the relevant development branch for fu
2736

2837
- Clarify that server URLs should not include fragment or query.
2938
- Support new `name` field alongside `description`, `url` and `variables`.
30-
- Formal path templating support for variable substitution in server urls.
39+
- Formal path templating support for variable substitution in server urls, alongside guidance that each variable can only be used once in a URL.
3140

3241
### Better polymorphic support
3342

@@ -37,10 +46,6 @@ What's coming up? Look at `src/oas.md` on the relevant development branch for fu
3746
- No change from previous versions: use `mapping` to link the discriminator property value to the Schema name if they aren't an exact match.
3847
- Implementations now SHOULD (rather than MAY) support templates/generics using `$dynamicRef`.
3948

40-
### Reference resolution
41-
42-
Additional top-level `$self` to be used as a base URI for resolving references in the OpenAPI description. If not present, the existing/earlier behaviour of using the retrieval URL as a base applies.
43-
4449
### Path templating
4550

4651
**ABNF** (Augmented Backus–Naur Form) formalised for path templating, server variables, and runtime expressions in the Links object.
@@ -52,12 +57,12 @@ Additional top-level `$self` to be used as a base URI for resolving references i
5257
- `wrapped: true` deprecated in favor of `nodeType: element` (as `nodeType` defaults to `none` for arrays to preserve compatibility).
5358
- The `xml` keyword can be used in any Schema Object.
5459
- XML namespaces can be IRIs (rather than URIs).
55-
- Explanation and example on how to handle `null` in XML.
60+
- Explanation and examples for many use cases including handling `null`, handling arrays, replacing the name, and handling ordered elements.
5661
- Clarify that the root schema of an XML object should use the component name.
5762

5863
### Support for sequential media types
5964

60-
- Support for sequential media types such as `text/event-stream` for server-sent events (SSE) and `application/jsonl`, `application/json-seq` and others for sequential data.
65+
- Support for sequential media types such as `text/event-stream` for server-sent events (SSE) and `multipart/mixed`, `application/jsonl`, `application/json-seq` and others for sequential data.
6166
- Responses can be a repeating data structure, and are treated as if they are an array of schema objects.
6267
- Use `itemSchema` in a mediatype entry to describe each item.
6368
- Related: a new media types registry is published to give more context for each of the media types.
@@ -69,6 +74,19 @@ Additional top-level `$self` to be used as a base URI for resolving references i
6974
- Parameters can therefore be `in` the `querystring` as an alternative to the existing `header`, `cookie`, `query` and `path` values.
7075
- `allowReserved` field is now permitted on headers and on parameters with any value of `in`.
7176
- Remove incorrect mention of Reference Object in the header `schema` field. The JSONSchema ref would be the correct thing to use in this context.
77+
- The `examples` (and older `example`) field is now supported with `content`.
78+
79+
### Show examples in both structure and serialized forms
80+
81+
- The Example Object (used in `examples` fields) gets two new fields: `dataValue` and `serializedValue`.
82+
- `dataValue` describes the example in structured format.
83+
- `serializedValue` shows how the example will be formatted when it is sent/received by the API.
84+
- The existing `value` field can still be used, which means that you can safely upgrade to 3.2 and then revisit these fields and update them to use either `dataValue` or `serializedValue` as appropriate.
85+
Use the new fields for examples you add after upgrading to 3.2.
86+
- The existing `externalValue` field can still be used to give a reference to an example, but this is now clearly documented as being a serialized value.
87+
- There are lots of examples of the examples (ha!) and clear documentation of how the fields can be combined.
88+
- Summary of what to do: use `examples` over `example`, and use `dataValue` to show a clear, structured example of the data.
89+
If your use case could benefit from an example of how the data will look when it's transmitted, use `serializedValue` as well.
7290

7391
### Flexible response metadata fields
7492

@@ -78,7 +96,9 @@ Additional top-level `$self` to be used as a base URI for resolving references i
7896
### Minor edits that are worth a mention
7997

8098
- Streamlined to YAML examples (unless something specific to another format) to try to make it easier to follow.
81-
- Non-Schema examples no longer "override" Schema examples; tools are free to use the most appropriate example for any given use case
99+
- Non-Schema examples no longer "override" Schema examples; tools are free to use the most appropriate example for any given use case.
100+
- A new key `mediaTypes` is supported under `components` to support re-use of Media Type Objects.
101+
82102
### In-place updates to existing specifications and standards that we reference
83103

84104
- Update to <https://www.ietf.org/archive/id/draft-bhutton-json-schema-01.html> of JSON Schema Specification.
@@ -89,10 +109,12 @@ Additional top-level `$self` to be used as a base URI for resolving references i
89109
### Editorial changes
90110

91111
- Extensive additions around media types, encoding, sequential media types, SSE examples, working with binary data.
92-
- Clarification that Example Objects can be used in Header Objects.
93112
- Better explanation and examples for using Encoding.
94113
- Clarify that Request Body Objects need to specify at least one media type to be meaningful.
95114
- How to more clearly indicate that responses will not have a body.
115+
- Explanation and examples of headers including `Link` and `Set-Cookie`.
116+
- No change but extensive additional notes on parsing and serializing JSON and non-JSON data formats.
117+
Particularly if you are buildling OpenAPI tooling, this section gives much better guidance on some of those tricky edge cases.
96118

97119
## 3.1 Updates
98120

0 commit comments

Comments
 (0)