Skip to content

Commit d4938cb

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/OpenAPI.next' into dm/components
# Conflicts: # versions/3.0.md
2 parents 816574d + 5842eda commit d4938cb

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

versions/3.0.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ While the API is described using JSON it does not impose a JSON input/output to
112112
All field names in the specification are **case sensitive**.
113113

114114
The schema exposes two types of fields.
115-
Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for the field name.
115+
Fixed fields, which have a declared name, and Patterned fields, which declare a regular expression pattern for the field name.
116116
Patterned fields can have multiple occurrences as long as each has a unique name.
117117

118118
In order to preserve the ability to round-trip between YAML and JSON formats, YAML version [1.2](http://www.yaml.org/spec/1.2/spec.html) is recommended along with some additional constraints:
@@ -210,7 +210,8 @@ Field Name | Type | Description
210210
<a name="infoTermsOfService"></a>termsOfService | `string` | A URL to the Terms of Service for the API.
211211
<a name="infoContact"></a>contact | [Contact Object](#contactObject) | The contact information for the exposed API.
212212
<a name="infoLicense"></a>license | [License Object](#licenseObject) | The license information for the exposed API.
213-
<a name="infoVersion"></a>version | `string` | **Required** Provides the version of the application API (not to be confused with the specification version). While not required, is it suggested that the `info.version` value correspond to the version of the API definition. In practice, the version of the API _implementation_ MAY evolve at an entirely different rate.
213+
<a name="infoVersion"></a>version | `string` | **Required** The version of the API definition (which is distinct from the OpenAPI specification version or the API implementation version).
214+
214215

215216
This object can be extended with [Specification Extensions](#specificationExtensions).
216217

@@ -1246,6 +1247,7 @@ Field Name | Type | Description
12461247
<a name="contentTypeSchema"></a>schema | [Schema Object](#schemaObject) | The schema defining the type used for the request body.
12471248
<a name="contentTypeExamples"></a>examples | [[Example Object](#exampleObject) <span>&#124;</span> [Reference Object](#referenceObject)] | Examples of the content type. Each example in the Examples array SHOULD be in the correct format as specified in the _content_ type. The `examples` object is mutually exclusive to the `example` object. Furthermore, if referencing a `schema` which contains an example, the `examples` value SHALL _override_ the example provided by the schema.
12481249
<a name="contentTypeExample"></a>example | [Example Object](#exampleObject) <span>&#124;</span> [Reference Object](#referenceObject) | Example of the content type. The example object SHOULD be in the correct format as specified in the _content_ type. The `example` object is mutually exclusive to the `examples` object. Furthermore, if referencing a `schema` which contains an example, the `example` value SHALL _override_ the the example provided by the schema.
1250+
<a name="contentTypeEncoding"></a>encoding | [Encoding Object](#encodingObject) | Encoding of the content type. The encoding object SHOULD only apply to `requestBody` objects when the content type is `multipart`.
12491251

12501252
##### Patterned Fields
12511253
Field Pattern | Type | Description
@@ -1296,7 +1298,7 @@ schema:
12961298
type: string
12971299
format: base64
12981300
1299-
# content transfered in binary (octet-stream):
1301+
# content transferred in binary (octet-stream):
13001302
schema:
13011303
type: string
13021304
format: binary
@@ -1346,16 +1348,16 @@ requestBody:
13461348
type: string
13471349
format: uuid
13481350
address:
1349-
# complex types are stringified to support rfc1866
1351+
# complex types are stringified to support RFC1866
13501352
type: object
13511353
properties: {}
13521354
```
13531355
1354-
Note that in the above example, the contents in the `requestBody` MUST be stringified per RFC1866 when being passed to the server. In addition, the `address` field complex object will be strigified as well.
1356+
Note that in the above example, the contents in the `requestBody` MUST be stringified per RFC1866 when being passed to the server. In addition, the `address` field complex object will be stringified as well.
13551357

13561358
When passing complex objects in the `x-www-form-urlencoded` content type, the default serialization strategy of such properties is described in the `parameterContent` section as `form`.
13571359

1358-
##### Special Considerations for `mutlipart` content
1360+
##### Special Considerations for `multipart` content
13591361

13601362
It is common to use `multipart/form-data` as a `Content-Type` when transferring request bodies to operations. In contrast to 2.0, a `schema` is required to define the input parameters to the operation when using `multipart` content. This allows complex structures as well as supports mechanisms for multiple file uploads.
13611363

@@ -1398,7 +1400,7 @@ requestBody:
13981400
type: '#/definitions/Address'
13991401
```
14001402
1401-
In scenarios where more control is needed over the Content-Type for `multipart` request bodies, an `encoding` attribute is introduced. This attribute is _only_ applicable to `mulitpart/*` and `x-www-form-urlencoded` request bodies.
1403+
In scenarios where more control is needed over the Content-Type for `multipart` request bodies, an `encoding` attribute is introduced. This attribute is _only_ applicable to `multipart/*` and `x-www-form-urlencoded` request bodies.
14021404

14031405
#### <a name="encodingObject"></a>Encoding Object
14041406

@@ -1449,13 +1451,13 @@ requestBody:
14491451
# default is application/octet-stream, need to declare an image type only!
14501452
type: string
14511453
format: binary
1452-
encoding:
1453-
historyMetadata:
1454-
# require XML content-type in utf-8 encoding
1455-
contentType: application/xml; charset=utf-8
1456-
profileImage:
1457-
# only accept png/jpeg
1458-
contentType: image/png, image/jpeg
1454+
encoding:
1455+
historyMetadata:
1456+
# require XML content-type in utf-8 encoding
1457+
contentType: application/xml; charset=utf-8
1458+
profileImage:
1459+
# only accept png/jpeg
1460+
contentType: image/png, image/jpeg
14591461
```
14601462

14611463
#### <a name="responsesObject"></a>Responses Object
@@ -1699,7 +1701,7 @@ This object can be extended with [Specification Extensions](#specificationExtens
16991701

17001702
The key used to identify the Path Item Object is a variable expression that can be evaluated in the context of a runtime HTTP request/response to identify the URL to be used for the callback request.
17011703
A simple example might be `$request.body#/url`.
1702-
However, using [variable substition](#variableSubstition) syntax the complete HTTP message can be accessed.
1704+
However, using [variable substitution](#variableSubstitution) syntax the complete HTTP message can be accessed.
17031705
This includes accessing any part of a body that can be accessed using a JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901).
17041706

17051707
For example, given the following HTTP request:
@@ -1874,7 +1876,7 @@ Because of the potential for name clashes, consider the `href` syntax as the pre
18741876

18751877
#### <a name="responsePayload"></a>Response Payload Values
18761878

1877-
Payload values are only available in parseable response payloads which match the advertised media-type and for media-types that can be referenced using a JSON Pointer fragment Id.
1879+
Payload values are only available in parsable response payloads which match the advertised media-type and for media-types that can be referenced using a JSON Pointer fragment Id.
18781880
In all cases, if a value does _not_ exist, the parameter will be considered a `null` value (as opposed to an empty value) and _not_ passed as a parameter to the linked resource.
18791881
In cases where a value is required, and a parameter is not supplied, the client MAY choose to not follow the link definition.
18801882

@@ -1917,7 +1919,7 @@ color: ["red", "green", "blue"]
19171919
The variables generated can be used in locations prescribed by the definition.
19181920

19191921

1920-
### <a name="variableSubstition"></a>Variable substitution
1922+
### <a name="variableSubstitution"></a>Variable substitution
19211923
In all cases, _variables_ from request and responses may be substituted for link generation.
19221924
The table below provides examples of variable expressions and examples of their use in a value:
19231925

@@ -3337,8 +3339,8 @@ Field Name | Type | Description
33373339
---|:---:|---|---
33383340
<a name="oauthFlowImplicit"></a>implicit| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Implicit flow
33393341
<a name="oauthFlowPassword"></a>password| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Resource Owner Password flow
3340-
<a name="oauthFlowClientCredentials"></a>clientCredentials| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Client Credentials flow. Previously called `application` in OpenApi 2.0.
3341-
<a name="oauthFlowAuthorizationCode"></a>authorizationCode| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenApi 2.0.
3342+
<a name="oauthFlowClientCredentials"></a>clientCredentials| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Client Credentials flow. Previously called `application` in OpenAPI 2.0.
3343+
<a name="oauthFlowAuthorizationCode"></a>authorizationCode| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0.
33423344

33433345
This object can be extended with [Specification Extensions](#specificationExtensions).
33443346

0 commit comments

Comments
 (0)