Releases: OAI/OpenAPI-Specification
OAS 3.2.0 Released!
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.
OAS 3.1.2 Released!
Version 3.1.2 has no material changes but does contain editorial fixes, additional examples, and clarifications.
- Clarify that
$refin a Schema Object is a JSON Schema$refkeyword. - Detailed explanation of percent-encoding and -decoding, updated examples and references to match, including the Style Examples table.
- 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 no response will have a body.
- How to handle
nullin XML as an advisory note; since the functionality cannot be changed it is implementation-defined for 3.1 tooling. - Clarify that the root schema of an XML object should use the component name.
OAS 3.1.1 Released!
Release Notes
While the 3.1.1 release makes no changes to requirements of the OpenAPI 3.1.0 specification, it does introduce a number of notable improvements, including:
- Expands and clarifies a number of explanations, including several new appendices with supplementary details
- Focuses on technical specifics by moving examples and additional documentation now published at learn.openapis.org
- Declares that the HTML specifications at spec.openapis.org are now the authoritative versions (formerly it was the Markdown source on GitHub)
OpenAPI Description writers should mark their OpenAPI Descriptions with the version of the OpenAPI specification they used to write their specification, updating where possible.
Tooling maintainers should expect minimal work to support 3.1.1; however, we recommend checking the list of changes below.
Clearer Definitions
Introduce consistent language around OpenAPI Document/Description/Definition:
- OpenAPI Description means the OpenAPI description of an API, whether it is in one or many files.
- A document means a single file.
- An "entry document" is where the OpenAPI Description for an API starts; it may reference other documents.
Improved language regarding schemas, explaining the difference between the OpenAPI schema, the schemas used within the OpenAPI schema, and the use of a non-authoritative JSON Schema to supplement the written spec.
Added guidance around use of schema dialects.
References
Additional guidance for resolving references and parsing documents was added, resolving component names, tags, and operationIds are clarified.
The adoption of JSON Schema in 3.1.x changed the parsing and referencing, and a new section was added to cover the changes in more depth than in 3.1.0.
Improved explanation of URLs and URIs, and made clear which to use for each URL/URI field.
Clarified that Markdown links are resolved in relation to their rendered context.
Data Types
Extensive clarifications on data types and encoding.
Added a section on handling binary data.
Security
Added a note that a security array that is empty or missing does not indicate that no security arrangements exist for this API.
Updated references to other standards where newer versions are available, and added more explanation for OpenIDConnect.
Added a "Security Concerns" section containing advice for implementers and users of OpenAPI.
Request Data
Extensive refactoring of the parameters section
Examples were updated, improved, and explanations added.
Headers have their own section with examples and specific information.
Improves and expands on OpenAPI example and examples and adds a "Working with Examples" section with a clearer description and examples.
Clarifies and expands on file uploads, form-urlencoded request bodies, and multipart content, and moves them to a refactored Encoding Object section to provide better coverage of edge cases and more examples.
OAS 3.0.4 Released!
Release Notes
While the 3.0.4 release makes no changes to requirements of the OpenAPI 3.0.3 specification, it does introduce a number of notable improvements, including:
- Expands and clarifies a number of explanations, including several new appendices with supplementary details
- Focuses on technical specifics by moving examples and additional documentation now published at learn.openapis.org
- Declares that the HTML specifications at spec.openapis.org are now the authoritative versions (formerly it was the Markdown source on GitHub)
OpenAPI Description writers should mark their OpenAPI Descriptions with the version of the OpenAPI specification they used to write their specification, updating where possible.
Tooling maintainers should expect minimal work to support 3.0.4; however, we recommend checking the list of changes below.
Clearer Definitions
Introduce consistent language around OpenAPI Document/Description/Definition:
- OpenAPI Description means the OpenAPI description of an API, whether it is in one or many files.
- A document means a single file.
- An "entry document" is where the OpenAPI Description for an API starts; it may reference other documents.
Improved language regarding schemas, explaining the difference between the OpenAPI schema, the schemas used within the OpenAPI schema, and the use of a non-authoritative JSON Schema to supplement the written spec.
References
Additional guidance for resolving references and parsing documents was added, resolving component names, tags, and operationIds are clarified.
Clarified that Markdown links are resolved in relation to their rendered context.
Data Types
Extensive clarifications on data types and encoding.
Added a section on handling binary data.
Security
Added a note that a security array that is empty or missing does not indicate that no security arrangements exist for this API.
Updated references to other standards where newer versions are available, and added more explanation for OpenIDConnect.
Added a "Security Concerns" section containing advice for implementers and users of OpenAPI.
Request Data
Extensive refactoring of the parameters section
Examples were updated, improved, and explanations added.
Headers have their own section with examples and specific information.
Improves and expands on OpenAPI example and examples and adds a "Working with Examples" section with a clearer description and examples.
Clarifies and expands on file uploads, form-urlencoded request bodies, and multipart content, and moves them to a refactored Encoding Object section to provide better coverage of edge cases and more examples.
OAS 3.1.0 Released!
The OAI is pleased to announce the official release of the OpenAPI Specification 3.1.0!
Changelog
See 3.1.0-rc1 for previous changes in 3.1.0, including the explanation of why there are breaking changes.
Additions
- Added the
jsonSchemaDialecttop-level field to allow the definition of a default $schema value for Schema Objects.
Updates
- Updated some links to more accurate locations.
- Updates JSON Schema support to the latest 2020-12 draft.
- Revamped relative reference resolution under both URIs and URLs.
- Reworked file upload description to take into account new JSON Schema capabilities. This contains breaking changes.
- Both
x-oai-andx-oas-prefixes for Specification Extensions are now reserved to be defined by the OpenAPI Initiative.
Clarifications
- Path parameter values cannot contain the unescaped characters
/,?or#. - Further explanation of where Reference Object and JSON Schema's reference should be used.
- Unified wording when values are URLs/URIs.
- Reworded Path Item's
$refto take into account reference and component changes. - Fixed some examples.
- Minor text changes to improve consistency and readability.
- The description of the Reference Object has been updated to further clarify its behavior.
- Further updated Schema Object's description to take into account the latest draft, and the default use of https://spec.openapis.org/oas/3.1/dialect/base as the default OAS dialect.
- Reworded "Schema Vocabularies" to "Schema dialects"
OAS 3.1.0-rc1 Released!
Changelog
See 3.1.0-rc0 for previous changes in 3.1.0, including the explanation of why there are breaking changes.
Breaking changes
- Server Variable's
enumnow MUST not be empty (changed from SHOULD). - Server Variable's
defaultnow MUST exist in theenumvalues, if such values are defined (changed from SHOULD). responsesare no longer required to be defined under the Operation Object.
Clarifications
- It is now clarified when path template expression may not have a corresponding path parameter.
- Data types (and just primitive data types) now correspond to JSON Schema.
- Various cosmetic fixes.
- A new section was added to address how to handle the
$schemakeyword (implicitly and explicitly).
OAS 3.1.0-rc0 Released!
Changelog
As part of this release, we have decided to not follow SemVer anymore, and as such introduce breaking changes. These changes are documented as part of the release notes.
Additions
- Introduced a new top-level field -
webhooks. This allows describing out-of-band webhooks that are available as part of the API. - The Info Object has a new
summaryfield. - The License Object now has a new
identifierfield for SPDX licenses. - Components Object now has a new entry
pathItems, to allow for reusablePath Item Objects to be defined within a valid OpenAPI document.
Extended Functionality
- Updated primitive types to be based on JSON Schema Specification Draft 2019-09. This now includes type
null. - Lifted the restriction of allowing Request Body only in HTTP methods where the HTTP 1.1 specification RFC7231 has explicitly defined semantics for. While allowed in other methods, it is not recommended.
- Added support to
objecttypeforspaceDelimitedandpipeDelimitedstylevalues. - The Encoding Object now supports
style,explodeandallowReservedformultipart/form-datamedia type as well. - To enable better
webhookssupport, expressions in theCallback Objectcan now also referencePath Item Objects. - When using the Reference Object,
summaryanddescriptionfields can now be overridden. - The Schema Object is now fully compliant with JSON Schema draft 2019-09 (see JSON Schema Core and JSON Schema Validation). See also,
Breaking Changes - The Discriminator Object can now be extended with Specification Extensions.
- Added support for mutual TLS (
mutualTLS) as a security scheme. - Used security requirements can now define an array of roles that are required for execution (and not only scopes for OAuth 2.0 security schemes).
Changes
- An OpenAPI Document now requires at least one of
paths,componentsorwebhooksto exist at the top level. While previous versions requiredpaths, now a valid OpenAPI Document can describe only webhooks, or even only reusable components. Thus, an OpenAPI Document no longer necessarily describes an API. - Anywhere in the 3.0.0 Specification that had a type of Schema Object | Reference Object has been replaced to be Schema Object only. With the move to full JSON Schema support,
$refis inherently part of theSchema Objectand has its own defined behavior. - Extensions prefixed with
x-oas-are now reserved for the OpenAPI Initiative. formatis now not validated by default.
Breaking changes
- The specification versioning no longer follows SemVer.
- The
nullablekeyword has been removed from theSchema Object(nullcan be used as a type value). exclusiveMaximumandexclusiveMinimumcannot acceptbooleanvalues (following JSON Schema).- Due to the compliance with JSON Schema, there is no longer interaction between
requiredandreadOnly/writeOnlyin relation to requests and responses. format(whetherbyte,binary, orbase64) is no longer used to describe file payloads. As part of JSON Schema compliance, nowcontentEncodingandcontentMediaTypecan be used for such specification.
Clarifications
- Reworded the definition of OpenAPI Document to reflect that a document no longer must describe paths, but can describe either paths, webhooks, components or any combination of them.
- Dropped the term RESTful APIs in favor of HTTP APIs
- Resolution of relative references has been redefined and clarified. Note there's a difference in resolution between Schema Object References and all others.
- Modification of examples to improve them and provide context for new fields/objects.
OAS 3.0.3 Released!
OAS 3.0.3 Change Log
The OAI is pleased to announce the official release of the OpenAPI Specification 3.0.3!
As a patch release, the following changes were made to improve the specification in terms of readability and accuracy. None of these modifications change the behavior of the spec.
- Clarified how Path Templating works.
- Clarified the meaning of Semantic Versioning as it applies to the OpenAPI Specification (note, this is the
openapifield, not theversionfield). - Changed some hyperlinks from
httptohttps. - Clarified add the notion of optional security on operations.
- Added an explanation that the
Server Variable Object'senumshould not be empty. This is not a breaking change but should be considered as guidance for a more explicit restriction in the next major version. - Clarified paths under the
Paths Objectshould start with a forward slash. - Clarified
Path Item Object's$refbehavior with sibling fields. - Fixed a few examples.
- Clarified the map structure of
callbacksunder theOperation Object. - Clarified how path parameters are being matched.
- Clarified
example/examplesvalue(s) in theParameter Object. - Fixed example for
pipeDelimitedobjectvalue. - Fixed
Callback Objectdescription. - Clarified
Link Object'soperationDef's description. - Improved ABNF for
Runtime Expressions. - Clarified valid regex for
patternunderSchema Object. - Clarified the behavior of
nullableunderSchema Object. - Fixed names of OAuth2 flows in the description of
Security Scheme Object. - Improved description of
Security Filteringsection.
OAS 3.0.2 Released!
OAS 3.0.2 Change Log
The OAI is pleased to announce the official release of the OpenAPI Specification 3.0.2!
As a patch release, the following changes were made to improve the specification in terms of readability and accuracy. None of these modifications change the behavior of the spec.
- Added clarification to case sensitivity of keys in maps.
- Reworked the Data Type table, removing the
Common Nameto reduce potential confusion. - Clarified the description of the
Server Variable Object'sdefaultfield. - Fixed various examples.
- Clarified
operationIdis case sensitive. - Clarified the default value of the
Parameter Object'sdeprecatedfield isfalse. - Added recommendation to not use the
Parameter Object'sallowEmptyValuefield as it will be removed in a future version. - Fixed the description of the
Media Type Object'sschemafield. - Clarified the description of the
Responses Object's response codes field description. - Clarified that the
Schema Object'sadditionalPropertiesfield has a default value oftrue. - Fixed a small wording issue in the
Discriminator Objectdescription. - Fixed the
Security Scheme Objectdescription to include reference to the use of API Keys in cookies. - Fixed the description of the
Security Requirement Object.
OAS 3.0.1 Released!
OAS 3.0.1 Change Log
The OAI is pleased to announce the official release of the OpenAPI Specification 3.0.1!
This our first patch release since 3.0.0, containing the following updates:
Specification Changes
- Updated document links to HTTPS where applicable.
exampleandexamplesfields descriptions were updated to reference them as 'fields' and not 'objects'.- Fixed various examples (indentation, field names, comments).
- Removed the Examples Object as it was left over during editing of v3.0.0. It was not used or referenced to by any other object in the specification.
- Various typo fixes.
Additional Changes
- Clarified the roles and processes in the Technical Steering Committee (TSC, formerly the TDC).
- Improvements to the development guidelines.