Removal of independent definitions objects
MODIFY
versions/3.0.md
versions/3.0.md
@@ -391,17 +391,180 @@ All objects defined within the components object will have no effect on the API
Field Pattern | Type | Description
---|:---:|---
-<a name="componentsDefinitions"></a> definitions | [Definitions Object](#definitionsObject) | An object to hold reusable [schema objects](#schemaObject).
-<a name="componentsResponses"></a> responses | [Responses Definitions Object](#responsesDefinitionsObject) | An object to hold reusable [responses objects](#responseObject).
-<a name="componentsParameters"></a> parameters | [Parameters Definitions Object](#parametersDefinitionsObject) | An object to hold reusable [parameter objects](#parameterObject).
-<a name="componentsRequestBodies"></a> requestBodies | Request Body Definitions Object | An object to hold reusable [request body objects](#requestBodyObject).
-<a name="componentsResponseHeaders"></a> responseHeaders | Response Headers Definitions Object | An object to hold reusable [response headers objects](#headersObject).
-<a name="componentsSecurityDefinitions"></a> securityDefinitions| [Security Definitions Object](#securityDefinitionsObject) | An object to hold reusable [security scheme objects](#securitySchemeObject).
-<a name="componentsLinks"></a> links | Link Definitions Object | An object to hold reusable [link objects](#linkObject).
-<a name="componentsCallbacks"></a> callbacks | Callback Definitions Object | An object to hold reusable [callbacks objects](#callbacksObject).
+<a name="componentsDefinitions"></a> definitions | Map[`string`, [Schema Objects](#schemaObject)] | An object to hold reusable [Schema Objects](#schemaObject).
+<a name="componentsResponses"></a> responses | Map[`string`, [Responses Objects](#responseObject)] | An object to hold reusable [Responses Objects](#responseObject). This does *not* define global operation responses.
+<a name="componentsParameters"></a> parameters | Map[`string`, [Parameter Objects](#parameterObject)] | An object to hold reusable [Parameter Objects](#parameterObject). This does *not* define global operation parameters.
+<a name="componentsExamples"></a> examples | Map[`string`, [Example Objects](#exampleObject)] | An object to hold reusable [Example Objects](#exampleObject).
+<a name="componentsRequestBodies"></a> requestBodies | Map[`string`, [RequestBody objects](#requestBodyObject)] | An object to hold reusable [RequestBody objects](#requestBodyObject).
+<a name="componentsResponseHeaders"></a> responseHeaders | Map[`string`,[Response Headers objects](#headersObject)] | An object to hold reusable [Response Headers objects](#headersObject).
+<a name="componentsSecurityDefinitions"></a> securityDefinitions| Map[`string`, [Security Scheme objects](#securitySchemeObject)] | An object to hold reusable [Security Scheme objects](#securitySchemeObject).
+<a name="componentsLinks"></a> links | Map[`string`, [Link Objects](#linkObject)] | An object to hold reusable [Link Objects](#linkObject).
+<a name="componentsCallbacks"></a> callbacks | Map[`string`, [Callbacks Objects](#callbacksObject)] | An object to hold reusable [Callbacks Objects](#callbacksObject).
All the fixed fields declared above are objects that MUST use keys that match the regular expression: `[a-zA-Z0-9.\-_]+`.
+Examples:
+
+```
+User
+User_1
+User_Name
+user-name
+my.org.User
+my\org\User
+```
+
+##### Definitions Object Example
+
+```json
+"components": {
+ "definitions": {
+ {
+ "Category": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "Tag": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "parameters": {
+ "skipParam": {
+ "name": "skip",
+ "in": "query",
+ "description": "number of items to skip",
+ "required": true,
+ "type": "integer",
+ "format": "int32"
+ },
+ "limitParam": {
+ "name": "limit",
+ "in": "query",
+ "description": "max records to return",
+ "required": true,
+ "type": "integer",
+ "format": "int32"
+ }
+ },
+ "responses": {
+ "NotFound": {
+ "description": "Entity not found."
+ },
+ "IllegalInput": {
+ "description": "Illegal input for operation."
+ },
+ "GeneralError": {
+ "description": "General Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/definitions/GeneralError"
+ }
+ }
+ }
+ }
+ },
+ "securityDefinitions": {
+ "api_key": {
+ "type": "apiKey",
+ "name": "api_key",
+ "in": "header"
+ },
+ "petstore_auth": {
+ "type": "oauth2",
+ "flow": {
+ "implicit": {
+ "authorizationUrl": "http://swagger.io/api/oauth/dialog",
+ "scopes": {
+ "write:pets": "modify pets in your account",
+ "read:pets": "read your pets"
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+```yaml
+components:
+ definitions:
+ Category:
+ type: object
+ properties:
+ id:
+ type: integer
+ format: int64
+ name:
+ type: string
+ Tag:
+ type: object
+ properties:
+ id:
+ type: integer
+ format: int64
+ name:
+ type: string
+ parameters:
+ skipParam:
+ name: skip
+ in: query
+ description: number of items to skip
+ required: true
+ type: integer
+ format: int32
+ limitParam:
+ name: limit
+ in: query
+ description: max records to return
+ required: true
+ type: integer
+ format: int32
+ responses:
+ NotFound:
+ description: Entity not found.
+ IllegalInput:
+ description: Illegal input for operation.
+ GeneralError:
+ description: General Error
+ content:
+ application/json
+ schema:
+ $ref: '#/definitions/GeneralError'
+ securityDefinitions:
+ api_key:
+ type: apiKey
+ name: api_key
+ in: header
+ petstore_auth:
+ type: oauth2
+ flow:
+ implicit:
+ authorizationUrl: http://swagger.io/api/oauth/dialog
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
+```
+
+
#### <a name="pathsObject"></a>Paths Object
Holds the relative paths to the individual endpoints and their operations.
@@ -3064,224 +3227,6 @@ animals:
</aliens>
```
-#### <a name="definitionsObject"></a>Definitions Object
-
-An object to hold schemas for data types that can be consumed and produced by operations.
-These data types can be primitives, arrays or models.
-
-##### Patterned Fields
-
-Field Pattern | Type | Description
----|:---:|---
-<a name="definitionsName"></a>{name} | [Schema Object](#schemaObject) | A single definition, mapping a "name" to the schema it defines.
-
-Examples:
-
-```
-User
-User_1
-User_Name
-user-name
-my.org.User
-my\org\User
-```
-
-##### Definitions Object Example
-
-```json
-{
- "Category": {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "format": "int64"
- },
- "name": {
- "type": "string"
- }
- }
- },
- "Tag": {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "format": "int64"
- },
- "name": {
- "type": "string"
- }
- }
- }
-}
-```
-
-```yaml
-Category:
- type: object
- properties:
- id:
- type: integer
- format: int64
- name:
- type: string
-Tag:
- type: object
- properties:
- id:
- type: integer
- format: int64
- name:
- type: string
-```
-
-#### <a name="parametersDefinitionsObject"></a>Parameters Definitions Object
-
-An object to hold parameters to be reused across operations.
-Parameter definitions can be referenced to the ones defined here.
-
-This does *not* define global operation parameters.
-
-##### Patterned Fields
-
-Field Pattern | Type | Description
----|:---:|---
-<a name="pdName"></a>{name} | [Parameter Object](#parameterObject) | A single parameter definition, mapping a "name" to the parameter it defines.
-
-##### Parameters Definition Object Example
-
-```json
-{
- "skipParam": {
- "name": "skip",
- "in": "query",
- "description": "number of items to skip",
- "required": true,
- "type": "integer",
- "format": "int32"
- },
- "limitParam": {
- "name": "limit",
- "in": "query",
- "description": "max records to return",
- "required": true,
- "type": "integer",
- "format": "int32"
- }
-}
-```
-
-```yaml
-skipParam:
- name: skip
- in: query
- description: number of items to skip
- required: true
- type: integer
- format: int32
-limitParam:
- name: limit
- in: query
- description: max records to return
- required: true
- type: integer
- format: int32
-```
-
-
-#### <a name="responsesDefinitionsObject"></a>Responses Definitions Object
-
-An object to hold responses to be reused across operations.
-Response definitions can be referenced to the ones defined here.
-
-This does *not* define global operation responses.
-
-##### Patterned Fields
-
-Field Pattern | Type | Description
----|:---:|---
-<a name="rdName"></a>{name} | [Response Object](#responseObject) | A single response definition, mapping a "name" to the response it defines.
-
-##### Responses Definitions Object Example
-
-```json
-{
- "NotFound": {
- "description": "Entity not found."
- },
- "IllegalInput": {
- "description": "Illegal input for operation."
- },
- "GeneralError": {
- "description": "General Error",
- "schema": {
- "$ref": "#/definitions/GeneralError"
- }
- }
-}
-```
-
-```yaml
-NotFound:
- description: Entity not found.
-IllegalInput:
- description: Illegal input for operation.
-GeneralError:
- description: General Error
- schema:
- $ref: '#/definitions/GeneralError'
-```
-
-#### <a name="securityDefinitionsObject"></a>Security Definitions Object
-
-A declaration of the security schemes available to be used in the specification.
-This does not enforce the security schemes on the operations and only serves to provide the relevant details for each scheme.
-
-##### Patterned Fields
-Field Pattern | Type | Description
----|:---:|---
-<a name="sdName"></a>{name} | [Security Scheme Object](#securitySchemeObject) | A single security scheme definition, mapping a "name" to the scheme it defines.
-
-##### Security Definitions Object Example
-
-```json
-{
- "api_key": {
- "type": "apiKey",
- "name": "api_key",
- "in": "header"
- },
- "petstore_auth": {
- "type": "oauth2",
- "flow": {
- "implicit": {
- "authorizationUrl": "http://swagger.io/api/oauth/dialog",
- "scopes": {
- "write:pets": "modify pets in your account",
- "read:pets": "read your pets"
- }
- }
- }
- }
-}
-```
-
-```yaml
-api_key:
- type: apiKey
- name: api_key
- in: header
-petstore_auth:
- type: oauth2
- flow:
- implicit:
- authorizationUrl: http://swagger.io/api/oauth/dialog
- scopes:
- write:pets: modify pets in your account
- read:pets: read your pets
-```
-
#### <a name="securitySchemeObject"></a>Security Scheme Object
Allows the definition of a security scheme that can be used by the operations.
@@ -3474,7 +3419,7 @@ read:pets: read your pets
#### <a name="securityRequirementObject"></a>Security Requirement Object
Lists the required security schemes to execute this operation.
-The name used for each property MUST correspond to a security scheme declared in the [Security Definitions](#securityDefinitionsObject).
+The name used for each property MUST correspond to a security scheme declared in the [Security Definitions](#componentsSecurityDefinitions) under the [Components Object](#componentsObject).
Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized.
This enables support for scenarios where there multiple query parameters or HTTP headers are required to convey security information.

Removal of independent definitions objects