From e7e3e9b943101d2b41e77d992ca597b5b58dfe10 Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Fri, 8 Apr 2016 06:05:49 -0700 Subject: [PATCH 1/5] moved reusable definitions under a single element --- versions/3.0.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/versions/3.0.md b/versions/3.0.md index 1d6a2d02a9..8841fcb5f0 100644 --- a/versions/3.0.md +++ b/versions/3.0.md @@ -113,12 +113,14 @@ Field Name | Type | Description schemes | [`string`] | The transfer protocol of the API. Values MUST be from the list: `"http"`, `"https"`, `"ws"`, `"wss"`. If the `schemes` is not included, the default scheme to be used is the one used to access the OpenAPI definition itself. consumes | [`string`] | A list of MIME types the APIs can consume. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under [Mime Types](#mimeTypes). produces | [`string`] | A list of MIME types the APIs can produce. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under [Mime Types](#mimeTypes). +responses | [Responses] paths | [Paths Object](#pathsObject) | **Required.** The available paths and operations for the API. -definitions | [Definitions Object](#definitionsObject) | An object to hold data types produced and consumed by operations. +schemas | [Schemas Object](#schemasObject) | An element to hold various schemas for the specification. +~~definitions | [Definitions Object](#definitionsObject) | An object to hold data types produced and consumed by operations. parameters | [Parameters Definitions Object](#parametersDefinitionsObject) | An object to hold parameters that can be used across operations. This property *does not* define global parameters for all operations. responses | [Responses Definitions Object](#responsesDefinitionsObject) | An object to hold responses that can be used across operations. This property *does not* define global responses for all operations. securityDefinitions | [Security Definitions Object](#securityDefinitionsObject) | Security scheme definitions that can be used across the specification. -security | [[Security Requirement Object](#securityRequirementObject)] | A declaration of which security schemes are applied for the API as a whole. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). Individual operations can override this definition. +security | [[Security Requirement Object](#securityRequirementObject)] | A declaration of which security schemes are applied for the API as a whole. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). Individual operations can override this definition.~~ tags | [[Tag Object](#tagObject)] | A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the [Operation Object](#operationObject) must be declared. The tags that are not declared may be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique. externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation. @@ -248,6 +250,21 @@ name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html ``` +#### Schemas Object + +Holds a set of schemas for different aspects of the OAS. The intention is to put reusable components into a single location, allowing reuse from this and other OAS documents. + +##### Fixed Fields + +Field Pattern | Type | Description + | [Definitions Object](#definitionsObject) | A hash containing payload definitions for the specification. +Responses Definitions Object | Reusable responses objects. + | [Parameters Definitions Object](#parametersDefinitionsObject) | +An object to hold parameters to be reused across operations. Parameter definitions can be referenced to the ones defined here. + | [Response Headers Definitions Object](#responseHeadersDefinitionsObject) | Response headers to reuse across the specification. +[Security Definitions Object](#securityDefinitionsObject) | Security definitions to reuse across the specification. + + #### Paths Object Holds the relative paths to the individual endpoints. The path is appended to the [`basePath`](#oasBasePath) in order to construct the full URL. From ed4f8ad73d8b6960b58d608e77eebecc5351658e Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Tue, 19 Apr 2016 23:48:33 -0700 Subject: [PATCH 2/5] updated from schemas to components --- versions/3.0.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/versions/3.0.md b/versions/3.0.md index 8841fcb5f0..67d460c443 100644 --- a/versions/3.0.md +++ b/versions/3.0.md @@ -115,12 +115,8 @@ Field Name | Type | Description produces | [`string`] | A list of MIME types the APIs can produce. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under [Mime Types](#mimeTypes). responses | [Responses] paths | [Paths Object](#pathsObject) | **Required.** The available paths and operations for the API. -schemas | [Schemas Object](#schemasObject) | An element to hold various schemas for the specification. -~~definitions | [Definitions Object](#definitionsObject) | An object to hold data types produced and consumed by operations. -parameters | [Parameters Definitions Object](#parametersDefinitionsObject) | An object to hold parameters that can be used across operations. This property *does not* define global parameters for all operations. -responses | [Responses Definitions Object](#responsesDefinitionsObject) | An object to hold responses that can be used across operations. This property *does not* define global responses for all operations. -securityDefinitions | [Security Definitions Object](#securityDefinitionsObject) | Security scheme definitions that can be used across the specification. -security | [[Security Requirement Object](#securityRequirementObject)] | A declaration of which security schemes are applied for the API as a whole. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). Individual operations can override this definition.~~ +components | [Components Object](#componentsObject) | An element to hold various schemas for the specification. +security | [[Security Requirement Object](#securityRequirementObject)] | A declaration of which security schemes are applied for the API as a whole. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). Individual operations can override this definition. tags | [[Tag Object](#tagObject)] | A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the [Operation Object](#operationObject) must be declared. The tags that are not declared may be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique. externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation. @@ -250,7 +246,7 @@ name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html ``` -#### Schemas Object +#### Components Object Holds a set of schemas for different aspects of the OAS. The intention is to put reusable components into a single location, allowing reuse from this and other OAS documents. From 6c1415fd3bea6b6e6d8fc30bf6203f627d664a0f Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Tue, 19 Apr 2016 23:53:47 -0700 Subject: [PATCH 3/5] updated from schemas to components --- versions/3.0.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/versions/3.0.md b/versions/3.0.md index 67d460c443..44a4ad3eb4 100644 --- a/versions/3.0.md +++ b/versions/3.0.md @@ -255,8 +255,7 @@ Holds a set of schemas for different aspects of the OAS. The intention is to pu Field Pattern | Type | Description | [Definitions Object](#definitionsObject) | A hash containing payload definitions for the specification. Responses Definitions Object | Reusable responses objects. - | [Parameters Definitions Object](#parametersDefinitionsObject) | -An object to hold parameters to be reused across operations. Parameter definitions can be referenced to the ones defined here. + | [Parameters Definitions Object](#parametersDefinitionsObject) | An object to hold parameters to be reused across operations. Parameter definitions can be referenced to the ones defined here. | [Response Headers Definitions Object](#responseHeadersDefinitionsObject) | Response headers to reuse across the specification. [Security Definitions Object](#securityDefinitionsObject) | Security definitions to reuse across the specification. From 2047542bcd069f49a54ef8eda1d8b5373034941d Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Tue, 19 Apr 2016 23:54:42 -0700 Subject: [PATCH 4/5] updated from schemas to components --- versions/3.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versions/3.0.md b/versions/3.0.md index 44a4ad3eb4..6b710ec2e4 100644 --- a/versions/3.0.md +++ b/versions/3.0.md @@ -254,10 +254,10 @@ Holds a set of schemas for different aspects of the OAS. The intention is to pu Field Pattern | Type | Description | [Definitions Object](#definitionsObject) | A hash containing payload definitions for the specification. -Responses Definitions Object | Reusable responses objects. + | Responses Definitions Object | Reusable responses objects. | [Parameters Definitions Object](#parametersDefinitionsObject) | An object to hold parameters to be reused across operations. Parameter definitions can be referenced to the ones defined here. | [Response Headers Definitions Object](#responseHeadersDefinitionsObject) | Response headers to reuse across the specification. -[Security Definitions Object](#securityDefinitionsObject) | Security definitions to reuse across the specification. + | [Security Definitions Object](#securityDefinitionsObject) | Security definitions to reuse across the specification. #### Paths Object From e1c51086108af295cb9d58cbb9f9734db2eb4eb2 Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Tue, 19 Apr 2016 23:56:08 -0700 Subject: [PATCH 5/5] updated from schemas to components --- versions/3.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/versions/3.0.md b/versions/3.0.md index 6b710ec2e4..c0fe16d045 100644 --- a/versions/3.0.md +++ b/versions/3.0.md @@ -253,6 +253,7 @@ Holds a set of schemas for different aspects of the OAS. The intention is to pu ##### Fixed Fields Field Pattern | Type | Description +---|:---:|--- | [Definitions Object](#definitionsObject) | A hash containing payload definitions for the specification. | Responses Definitions Object | Reusable responses objects. | [Parameters Definitions Object](#parametersDefinitionsObject) | An object to hold parameters to be reused across operations. Parameter definitions can be referenced to the ones defined here.