Skip to content

Commit 7641485

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/OpenAPI.next' into dm/components
# Conflicts: # versions/3.0.md
2 parents 5f3d9ac + 20452d6 commit 7641485

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

versions/3.0.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The OpenAPI Specification (OAS) is a project used to describe and document RESTf
1212

1313

1414
The OpenAPI Specification defines a set of files required to describe such an API.
15-
These files can then be used by the Swagger-UI project to display the API and Swagger-Codegen to generate clients in various programming languages.
15+
These files can then be used by documentation generation tools to display the API and code generation tools to generate clients in various programming languages.
1616

1717
Additional utilities can also take advantage of the resulting files, such as testing tools.
1818

@@ -131,10 +131,12 @@ By convention, it is RECOMMENDED that the OpenAPI Specification (OAS) file be na
131131

132132
### <a name="dataTypes"></a>Data Types
133133

134-
Primitive data types in the OAS are based on the types supported by the [JSON Schema Specification Wright Draft 00](https://tools.ietf.org/html/draft-wright-json-schema-00#section-4.2). Note that `integer` as a type is also supported and is defined as a JSON number without a fraction or exponent part. `null` is not supported as a value.
134+
Primitive data types in the OAS are based on the types supported by the [JSON Schema Specification Wright Draft 00](https://tools.ietf.org/html/draft-wright-json-schema-00#section-4.2).
135+
Note that `integer` as a type is also supported and is defined as a JSON number without a fraction or exponent part.
136+
`null` is not supported as a value.
135137
Models are described using the [Schema Object](#schemaObject) which is an extended subset of JSON Schema Specification Wright Draft 00.
136138

137-
<a name="dataTypeFormat"></a>Primitives have an optional modifier property `format`.
139+
<a name="dataTypeFormat"></a>Primitives have an optional modifier property: `format`.
138140
OAS uses several known formats to more finely define the data type being used.
139141
However, the `format` property is an open `string`-valued property, and can have any value to support documentation needs.
140142
Formats such as `"email"`, `"uuid"`, etc., can be used even though they are not defined by this specification.
@@ -200,7 +202,7 @@ In subsequent versions of the OpenAPI Specification, care will be given such tha
200202
#### <a name="infoObject"></a>Info Object
201203

202204
The object provides metadata about the API.
203-
The metadata can be used by the clients if needed, and can be presented in the Swagger-UI for convenience.
205+
The metadata can be used by the clients if needed, and can be presented in editing or documentation generation tools for convenience.
204206

205207
##### Fixed Fields
206208

@@ -220,13 +222,13 @@ This object can be extended with [Specification Extensions](#specificationExtens
220222

221223
```json
222224
{
223-
"title": "Swagger Sample App",
225+
"title": "Sample Pet Store App",
224226
"description": "This is a sample server for a pet store.",
225-
"termsOfService": "http://swagger.io/terms/",
227+
"termsOfService": "http://example.com/terms/",
226228
"contact": {
227229
"name": "API Support",
228-
"url": "http://www.swagger.io/support",
229-
"email": "support@swagger.io"
230+
"url": "http://www.example.com/support",
231+
"email": "support@example.com"
230232
},
231233
"license": {
232234
"name": "Apache 2.0",
@@ -237,13 +239,13 @@ This object can be extended with [Specification Extensions](#specificationExtens
237239
```
238240

239241
```yaml
240-
title: Swagger Sample App
242+
title: Sample Pet Store App
241243
description: This is a sample server for a pet store.
242-
termsOfService: http://swagger.io/terms/
244+
termsOfService: http://example.com/terms/
243245
contact:
244246
name: API Support
245-
url: http://www.swagger.io/support
246-
email: support@swagger.io
247+
url: http://www.example.com/support
248+
email: support@example.com
247249
license:
248250
name: Apache 2.0
249251
url: http://www.apache.org/licenses/LICENSE-2.0.html
@@ -269,15 +271,15 @@ This object can be extended with [Specification Extensions](#specificationExtens
269271
```json
270272
{
271273
"name": "API Support",
272-
"url": "http://www.swagger.io/support",
273-
"email": "support@swagger.io"
274+
"url": "http://www.example.com/support",
275+
"email": "support@example.com"
274276
}
275277
```
276278

277279
```yaml
278280
name: API Support
279-
url: http://www.swagger.io/support
280-
email: support@swagger.io
281+
url: http://www.example.com/support
282+
email: support@example.com
281283
```
282284

283285
#### <a name="licenseObject"></a>License Object
@@ -489,7 +491,7 @@ my\org\User
489491
"type": "oauth2",
490492
"flow": {
491493
"implicit": {
492-
"authorizationUrl": "http://swagger.io/api/oauth/dialog",
494+
"authorizationUrl": "http://example.org/api/oauth/dialog",
493495
"scopes": {
494496
"write:pets": "modify pets in your account",
495497
"read:pets": "read your pets"
@@ -555,7 +557,7 @@ components:
555557
type: oauth2
556558
flow:
557559
implicit:
558-
authorizationUrl: http://swagger.io/api/oauth/dialog
560+
authorizationUrl: http://example.org/api/oauth/dialog
559561
scopes:
560562
write:pets: modify pets in your account
561563
read:pets: read your pets
@@ -735,7 +737,7 @@ Describes a single API operation on a path.
735737
Field Name | Type | Description
736738
---|:---:|---
737739
<a name="operationTags"></a>tags | [`string`] | A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
738-
<a name="operationSummary"></a>summary | `string` | A short summary of what the operation does. For maximum readability in the swagger-ui, this field SHOULD be less than 120 characters.
740+
<a name="operationSummary"></a>summary | `string` | A short summary of what the operation does. For maximum readability in editing or documentation generation tools, this field SHOULD be less than 120 characters.
739741
<a name="operationDescription"></a>description | `string` | A verbose explanation of the operation behavior. [CommonMark syntax](http://spec.commonmark.org/) can be used for rich text representation.
740742
<a name="operationExternalDocs"></a>externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation for this operation.
741743
<a name="operationId"></a>operationId | `string` | Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is recommended to follow common programming naming conventions.
@@ -757,7 +759,6 @@ This object can be extended with [Specification Extensions](#specificationExtens
757759
"pet"
758760
],
759761
"summary": "Updates a pet in the store with form data",
760-
"description": "",
761762
"operationId": "updatePetWithForm",
762763
"parameters": [
763764
{
@@ -819,7 +820,6 @@ This object can be extended with [Specification Extensions](#specificationExtens
819820
tags:
820821
- pet
821822
summary: Updates a pet in the store with form data
822-
description: ''
823823
operationId: updatePetWithForm
824824
parameters:
825825
- name: petId
@@ -876,13 +876,13 @@ This object can be extended with [Specification Extensions](#specificationExtens
876876
```json
877877
{
878878
"description": "Find more info here",
879-
"url": "https://swagger.io"
879+
"url": "https://example.com"
880880
}
881881
```
882882

883883
```yaml
884884
description: Find more info here
885-
url: https://swagger.io
885+
url: https://example.com
886886
```
887887

888888
#### <a name="parameterObject"></a>Parameter Object
@@ -2997,7 +2997,7 @@ In this example, a full model definition is shown.
29972997
"name": {
29982998
"type": "string",
29992999
"xml": {
3000-
"namespace": "http://swagger.io/schema/sample",
3000+
"namespace": "http://example.com/schema/sample",
30013001
"prefix": "sample"
30023002
}
30033003
}
@@ -3018,13 +3018,13 @@ Person:
30183018
name:
30193019
type: string
30203020
xml:
3021-
namespace: http://swagger.io/schema/sample
3021+
namespace: http://example.com/schema/sample
30223022
prefix: sample
30233023
```
30243024

30253025
```xml
30263026
<Person id="123">
3027-
<sample:name xmlns:sample="http://swagger.io/schema/sample">example</sample:name>
3027+
<sample:name xmlns:sample="http://example.com/schema/sample">example</sample:name>
30283028
</Person>
30293029
```
30303030

@@ -3311,7 +3311,7 @@ bearerFormat: JWT
33113311
"type": "oauth2",
33123312
"flow": {
33133313
"implicit": {
3314-
"authorizationUrl": "https://swagger.io/api/oauth/dialog",
3314+
"authorizationUrl": "https://example.com/api/oauth/dialog",
33153315
"scopes": {
33163316
"write:pets": "modify pets in your account",
33173317
"read:pets": "read your pets"
@@ -3325,7 +3325,7 @@ bearerFormat: JWT
33253325
type: oauth2
33263326
flow:
33273327
implicit:
3328-
authorizationUrl: https://swagger.io/api/oauth/dialog
3328+
authorizationUrl: https://example.com/api/oauth/dialog
33293329
scopes:
33303330
write:pets: modify pets in your account
33313331
read:pets: read your pets
@@ -3366,15 +3366,15 @@ This object can be extended with [Specification Extensions](#specificationExtens
33663366
"type": "oauth2",
33673367
"flow": {
33683368
"implicit": {
3369-
"authorizationUrl": "https://swagger.io/api/oauth/dialog",
3369+
"authorizationUrl": "https://example.com/api/oauth/dialog",
33703370
"scopes": {
33713371
"write:pets": "modify pets in your account",
33723372
"read:pets": "read your pets"
33733373
}
33743374
},
33753375
"authorizationCode": {
3376-
"authorizationUrl": "https://swagger.io/api/oauth/dialog",
3377-
"tokenUrl": "https://swagger.io/api/oauth/token",
3376+
"authorizationUrl": "https://example.com/api/oauth/dialog",
3377+
"tokenUrl": "https://example.com/api/oauth/token",
33783378
"scopes": {
33793379
"write:pets": "modify pets in your account",
33803380
"read:pets": "read your pets"
@@ -3388,13 +3388,13 @@ This object can be extended with [Specification Extensions](#specificationExtens
33883388
type: oauth2
33893389
flow:
33903390
implicit:
3391-
authorizationUrl: https://swagger.io/api/oauth/dialog
3391+
authorizationUrl: https://example.com/api/oauth/dialog
33923392
scopes:
33933393
write:pets: modify pets in your account
33943394
read:pets: read your pets
33953395
authorizationCode:
3396-
authorizationUrl: https://swagger.io/api/oauth/dialog
3397-
tokenUrl: https://swagger.io/api/oauth/token
3396+
authorizationUrl: https://example.com/api/oauth/dialog
3397+
tokenUrl: https://example.com/api/oauth/token
33983398
scopes:
33993399
write:pets: modify pets in your account
34003400
read:pets: read your pets

0 commit comments

Comments
 (0)