You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document how OAS uses semantic versioning (semver).
The specification itself is versioned using semver, so a new top level section
describes specification versioning, what OAS 3.0 means, how patch levels are used,
and how tools use the version.
The `openapi` field in the root object is a semver string that identifies
which OAS the definition file uses and conforms to.
Added a definition of "OpenAPI definition file" to the Definitions section.
Removed the "OpenAPI Version String" section as it is not needed:
info about the `openapi` field is in the table,
and info about the spec version is in the OpenAPI Version section.
A file or set of files which defines an API. The OpenAPI definition file uses and conforms to the OpenAPI Specification.
75
+
71
76
##### <aname="pathTemplating"></a>Path Templating
72
77
Path templating refers to the usage of curly braces ({}) to mark a section of a URL path as replaceable using path parameters.
73
78
@@ -94,6 +99,17 @@ The available status codes are defined by [RFC7231](http://tools.ietf.org/html/r
94
99
95
100
## Specification
96
101
102
+
### Versions
103
+
104
+
The OpenAPI Specification is versioned using [Semantic Versioning 2.0.0](http://semver.org/spec/v2.0.0.html) (semver) and follows the semver specification.
105
+
This document specifies OpenAPI Specification version `3.0.0-rc2`.
106
+
107
+
The `major`.`minor` portion of the semver (for example `3.0`) SHALL designate the OAS feature set. Typically, *`.patch`* versions address errors in this document, not the feature set. Tooling which supports OAS 3.0 SHOULD be compatible with all OAS 3.0.\* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between `3.0.0` and `3.0.1` for example.
108
+
109
+
Subsequent minor version releases of the OpenAPI Specification (incrementing the `minor` version number) SHOULD NOT interfere with tooling developed to a lower minor version and same major version. Thus a hypothetical `3.1.0` specification SHOULD be usable with tooling designed for `3.0.0`.
110
+
111
+
An OpenAPI definition file compatible with OAS 3.\*.\* contains a required [`openapi`](#oasVersion) field which designates the semantic version of the OAS that it uses. (OAS 2.0 definition document contain a top-level version field named [`swagger`](http://swagger.io/specification/#swaggerObject) and value `"2.0"`.)
112
+
97
113
### Format
98
114
99
115
An API description that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format.
@@ -120,7 +136,7 @@ In order to preserve the ability to round-trip between YAML and JSON formats, YA
120
136
121
137
### <aname="fileStructure"></a>File Structure
122
138
123
-
The OAS representation of the API is made of a single file.
139
+
An OpenAPI definition file is made of a single file.
124
140
However, parts of the definitions can be split into separate files, at the discretion of the user.
125
141
This is applicable for `$ref` fields in the specification as follows from the [JSON Schema](http://json-schema.org) definitions.
126
142
@@ -141,7 +157,6 @@ Types that are not accompanied by a `format` property follow the type definition
141
157
142
158
The formats defined by the OAS are:
143
159
144
-
145
160
Common Name | [`type`](#dataTypes) | [`format`](#dataTypeFormat) | Comments
146
161
----------- | ------ | -------- | --------
147
162
integer | `integer` | `int32` | signed 32 bits
@@ -173,13 +188,13 @@ In the following description, if a field is not explicitly **REQUIRED** or descr
173
188
174
189
#### <aname="oasObject"></a>OpenAPI Object
175
190
176
-
This is the root document object for the API specification.
191
+
This is the root document object of the [OpenAPI definition file](#oasDefinitionFile).
177
192
178
193
##### Fixed Fields
179
194
180
195
Field Name | Type | Description
181
196
---|:---:|---
182
-
<aname="oasVersion"></a>openapi | `string` | **REQUIRED**. Specifies the OpenAPI Specification version being used. It can be used by tooling specifications and clients to interpret the version. The structure SHALL be `major`.`minor`.`patch`, where `patch` versions MUST be compatible with the existing `major`.`minor`tooling. Typically patch versions will be introduced to address errors in the documentation, and tooling SHOULD typically be compatible with the corresponding `major`.`minor` (3.0.\*). Patch versions will correspond to patches of this document.
197
+
<aname="oasVersion"></a>openapi | `string` | **REQUIRED**. This string MUST be the [semantic version number](http://semver.org/spec/v2.0.0.html) of the [OpenAPI Specification version](#versions) that the OpenAPI definition file uses. The `openapi` field SHOULD be used by tooling specifications and clients to interpret the OpenAPI definition document. This is *not* related to the API [`info.version`](#infoVersion) string.
183
198
<aname="oasInfo"></a>info | [Info Object](#infoObject) | **REQUIRED**. Provides metadata about the API. The metadata can be used by the clients if needed.
184
199
<aname="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 `/`.
185
200
<aname="oasPaths"></a>paths | [Paths Object](#pathsObject) | **REQUIRED**. The available paths and operations for the API.
@@ -190,15 +205,6 @@ Field Name | Type | Description
190
205
191
206
This object can be extended with [Specification Extensions](#specificationExtensions).
192
207
193
-
#### <aname="oasVersionString"></a>OpenAPI Version String
194
-
195
-
The version string signifies which OpenAPI Specification version the document complies to. The format for this string MUST be `major`.`minor`.`patch`. The `patch` MAY be suffixed by a hyphen and extra alphanumeric characters.
196
-
197
-
A `major`.`minor` SHALL be used to designate the OpenAPI Specification version, and will be considered compatible with the OpenAPI Specification specified by that `major`.`minor` version. The patch version will not be considered by tooling, making no distinction between `3.0.0` and `3.0.1`.
198
-
199
-
In subsequent versions of the OpenAPI Specification, care will be given such that increments of the `minor` version SHOULD NOT interfere with operations of tooling developed to a lower minor version. Thus a hypothetical `3.1.0` specification SHOULD be usable with tooling designed for `3.0.0`.
200
-
201
-
202
208
#### <aname="infoObject"></a>Info Object
203
209
204
210
The object provides metadata about the API.
@@ -213,7 +219,7 @@ Field Name | Type | Description
213
219
<aname="infoTermsOfService"></a>termsOfService | `string` | A URL to the Terms of Service for the API. MUST be in the format of a URL.
214
220
<aname="infoContact"></a>contact | [Contact Object](#contactObject) | The contact information for the exposed API.
215
221
<aname="infoLicense"></a>license | [License Object](#licenseObject) | The license information for the exposed API.
216
-
<aname="infoVersion"></a>version | `string` | **REQUIRED**. The version of the API definition (which is distinct from the OpenAPI Specification version or the API implementation version).
222
+
<aname="infoVersion"></a>version | `string` | **REQUIRED**. The version of the API definition (which is distinct from the [OpenAPI Specification version](#oasVersion) or the API implementation version).
217
223
218
224
219
225
This object can be extended with [Specification Extensions](#specificationExtensions).
0 commit comments