Headline features
-
Multipurpose tags, with nesting
summaryfield to allow short descriptions, used when displaying lists of tags.parentfield to point to the tag that this tag is nested under.kindfield to allow a tag to be classified into a category such as navigation, or audience.
Thekindfield is free-form text, however there are some expected/conventional values such asnav(in line with the most common current usage as grouping for documentation output).- A registry to establish conventions for values used in
kind.
-
Support for additional HTTP methods
- Support the new
querymethod alongside the existingget/post/put/delete/options/head/patch/trace. - Under an
additionalOperationsentry in a Path, use any other methods not listed as keys using the correct capitalization, e.g.LINK. Do NOT addHEADunder this, use the existing siblinghead.
- Support the new
-
Document identity and URL resolution
- Additional top-level field
$selfis added to allow users to define the base URI of the document, used to resolve relative references. - More explanation and examples regarding URL resolution.
- Additional top-level field
Data modeling and representation
-
Streaming support: sequential media types including SSE
- Support for sequential media types such as
text/event-streamfor server-sent events (SSE) andmultipart/mixed,application/jsonl,application/json-seqand others for sequential data. - Responses can be a repeating data structure, and are treated as if they are an array of Schema Objects.
- Use
itemSchemain a mediatype entry to describe each item. - A media types registry is published to give more context for each of the media types.
- Support for sequential media types such as
-
Parameter and header changes
- Additional parameter location
querystring, to allow parsing the entire query string as a single field similar to the way a request body is handled, using thecontentfield. - Parameters can therefore be
inthequerystringas an alternative to the existingheader,cookie,queryandpathvalues. allowReservedfield is now permitted on headers and on parameters with any value ofin, and applies where the combination ofinandstyleautomatically percent-encode the value.
- Additional parameter location
-
New
styleoption for cookies- Additional
styleoptioncookiefor content in a cookie, which uses semicolon as a separator and does not encode data values.
- Additional
-
Additions to support multipart media types
- New
itemSchemafield, for the schema that describes each of the items in a sequential media type. - New fields
prefixEncodinganditemEncodingcan be used instead ofencodingfor multipart media types. - The specification also contains examples of sequential JSON and Server-Sent events that show these fields in use.
- New
-
Improvements for APIs using XML as a content format
- New
nodeTypefield allows mapping schemas to common XML node types:element,attribute,text,cdata, ornone. attribute: trueis now deprecated in favor ofnodeType: attribute.wrapped: trueis now deprecated in favor ofnodeType: element(asnodeTypedefaults tononefor arrays to preserve compatibility).- The
xmlkeyword can be used in any Schema Object. - XML namespaces can be IRIs (rather than URIs).
- Explanation and examples for many use cases including handling
null, handling arrays, replacing the name, and handling ordered elements. - Clarify that the root schema of an XML Object should use the component name.
- New
-
Examples as either structured or serialized values
- The Example Object (used in
examplesfields) gets two new fields:dataValueandserializedValue. dataValuedescribes the example in structured format.serializedValueshows how the example will be formatted when it is sent/received by the API.- The existing
externalValuefield can still be used to give a reference to an example, but this is now clearly documented as being a serialized value.
- The Example Object (used in
Additional features
-
Updated security schemes
- Support for OAuth2 Device Authorization flow with additional
deviceAuthorizationfield in theflowsobject and for the individual flow, a new fielddeviceAuthorizationUrlalongsidetokenUrl. - Additional security scheme field:
oauth2MetadataUrlURL for auth server metadata, as described by the OAuth2 Server Metadata Standard. - Additional
deprecatedfield for security schemes (indicating that the scheme may still be supported, but that it should not be used). - Ability to reference a security scheme by URI rather than declaring it in components.
- Support for OAuth2 Device Authorization flow with additional
-
Improvements to the Server Object
- Clarify that server URLs should not include fragment or query.
- Support new
namefield alongsidedescription,urlandvariables. - Formal ABNF syntax for the allowed variable substitution in server urls, alongside guidance that each variable can only be used once in a URL.
-
Better polymorphic support
- The discriminator
propertyNamecan now be an optional field. - New field
defaultMappingto indicate which schema to use if thepropertyNameis not set, or if the value is unrecognized.
- The discriminator
-
Templates with formal syntax
- The specification now includes ABNF (Augmented Backus–Naur Form) for path templating, server variables, and runtime expressions in the Link Object.
-
Flexible metadata fields in the Response Object
descriptionfield for responses is now optional.- Additional
summaryfield for responses.
-
Additional updates
- A new key
mediaTypesis supported undercomponentsto support re-use of Media Type Objects.
- A new key
-
Updates to referenced standards
- Update to https://www.ietf.org/archive/id/draft-bhutton-json-schema-01.html of JSON Schema Specification.
- Update to https://www.ietf.org/archive/id/draft-bhutton-json-schema-validation-01.html of JSON Schema Validation Specification.
- Use RFC8529 for JSON.
- Use RFC9110 for HTTP.
-
Editorial changes
- Extensive additions around media types, encoding, sequential media types, SSE examples, working with binary data.
- Streamlined to YAML examples (unless something specific to another format) to try to make it easier to follow.
- Better explanation and examples for using Encoding and Serialization, and a note not to apply percent-encoding to headers.
- Clarify that Request Body Objects need to specify at least one media type to be meaningful.
- How to more clearly indicate that responses will not have a body.
- Explanation and examples of headers including
LinkandSet-Cookie. - Detailed explanation of percent-encoding and -decoding, updated examples and references to match, including the Style Examples table.
- Extensive additional notes on parsing and serializing JSON and non-JSON data formats.