Skip to content

Commit c29425a

Browse files
committed
Use document/description/definition consistently (3.1.1 port of 3908)
This tries to be consistent about using "describe" rather than "define" and using "description" for the entire potentially-multi-document thing, and "document" (or sometimes "description document") to refer to individual documents in the description.
1 parent 909091f commit c29425a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

versions/3.1.1.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This document is licensed under [The Apache License, Version 2.0](https://www.ap
1010

1111
The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to HTTP APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined, a consumer can understand and interact with the remote service with a minimal amount of implementation logic.
1212

13-
An OpenAPI definition can then be used by documentation generation tools to display the API, code generation tools to generate servers and clients in various programming languages, testing tools, and many other use cases.
13+
An OpenAPI description can then be used by documentation generation tools to display the API, code generation tools to generate servers and clients in various programming languages, testing tools, and many other use cases.
1414

1515
For examples of OpenAPI usage and additional documentation, please visit [learn.openapis.org](https://learn.openapis.org/).
1616

@@ -129,11 +129,11 @@ The OpenAPI Specification is versioned using a `major`.`minor`.`patch` versionin
129129

130130
Occasionally, non-backwards compatible changes may be made in `minor` versions of the OAS where impact is believed to be low relative to the benefit provided.
131131

132-
An OpenAPI document compatible with OAS 3.\*.\* contains a required [`openapi`](#oasVersion) field which designates the version of the OAS that it uses.
132+
An OpenAPI description document compatible with OAS 3.\*.\* contains a required [`openapi`](#oasVersion) field which designates the version of the OAS that it uses.
133133

134134
### Format
135135

136-
An OpenAPI document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format.
136+
An OpenAPI description document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format.
137137

138138
For example, if a field has an array value, the JSON array representation will be used:
139139

@@ -154,7 +154,7 @@ In order to preserve the ability to round-trip between YAML and JSON formats, YA
154154
- Tags MUST be limited to those allowed by [YAML's JSON schema ruleset](https://yaml.org/spec/1.2/spec.html#id2803231), which defines a subset of the YAML syntax and is unrelated to [JSON Schema](https://tools.ietf.org/html/draft-bhutton-json-schema-00).
155155
- Keys used in YAML maps MUST be limited to a scalar string, as defined by the [YAML Failsafe schema ruleset](https://yaml.org/spec/1.2/spec.html#id2802346).
156156

157-
**Note:** While APIs may be defined by OpenAPI documents in either YAML or JSON format, the API request and response bodies and other content are not required to be JSON or YAML.
157+
**Note:** While APIs may be described by OpenAPI documents in either YAML or JSON format, the API request and response bodies and other content are not required to be JSON or YAML.
158158

159159
### <a name="documentStructure"></a>OpenAPI Description Structure
160160

@@ -2385,7 +2385,7 @@ For computing links, and providing instructions to execute them, a [runtime expr
23852385

23862386
Field Name | Type | Description
23872387
---|:---:|---
2388-
<a name="linkOperationRef"></a>operationRef | `string` | A URI identifying an OAS operation. This field is mutually exclusive of the `operationId` field, and MUST point to an [Operation Object](#operationObject). Relative `operationRef` values MAY be used to locate an existing [Operation Object](#operationObject) in the OpenAPI definition. See the rules for resolving [Relative References](#relativeReferencesURI).
2388+
<a name="linkOperationRef"></a>operationRef | `string` | A URI identifying an OAS operation. This field is mutually exclusive of the `operationId` field, and MUST point to an [Operation Object](#operationObject). Relative `operationRef` values MAY be used to locate an existing [Operation Object](#operationObject) in the OpenAPI description. See the rules for resolving [Relative References](#relativeReferencesURI).
23892389
<a name="linkOperationId"></a>operationId | `string` | The name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually exclusive of the `operationRef` field.
23902390
<a name="linkParameters"></a>parameters | Map[`string`, Any \| [{expression}](#runtimeExpression)] | A map representing parameters to pass to an operation as specified with `operationId` or identified via `operationRef`. The key is the parameter name to be used (optionally qualified with the parameter location, e.g. `path.id` for an `id` parameter in the path), whereas the value can be a constant or an expression to be evaluated and passed to the linked operation.
23912391
<a name="linkRequestBody"></a>requestBody | Any \| [{expression}](#runtimeExpression) | A literal value or [{expression}](#runtimeExpression) to use as a request body when calling the target operation.
@@ -2395,9 +2395,9 @@ Field Name | Type | Description
23952395
This object MAY be extended with [Specification Extensions](#specificationExtensions).
23962396

23972397
A linked operation MUST be identified using either an `operationRef` or `operationId`.
2398-
In the case of an `operationId`, it MUST be unique and resolved in the scope of the OAS document.
2398+
In the case of an `operationId`, it MUST be unique and resolved in the scope of the OpenAPI description.
23992399
Because of the potential for name clashes, the `operationRef` syntax is preferred
2400-
for OpenAPI documents with external references.
2400+
for multi-document OpenAPI descriptions.
24012401

24022402
Note that it is not possible to provide a constant value to `parameters` that matches the syntax of a runtime expression.
24032403
It is possible to have ambiguous parameter names, e.g. `name: id, in: path` and `name: path.id, in: query`; this is NOT RECOMMENDED and the behavior is implementation-defined, however implementations SHOULD prefer the qualified interpretation (`path.id` as a path parameter), as the names can always be qualified to disambiguate them (e.g. using `query.path.id` for the query paramter).
@@ -3303,7 +3303,7 @@ MyResponseType:
33033303
propertyName: petType
33043304
```
33053305

3306-
The expectation now is that a property with name `petType` _MUST_ be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:
3306+
The expectation now is that a property with name `petType` _MUST_ be present in the response payload, and the value will correspond to the name of a schema defined in the OpenAPI description. Thus the response payload:
33073307

33083308
```json
33093309
{
@@ -4138,23 +4138,23 @@ Two examples of this:
41384138

41394139
### OpenAPI Document Formats
41404140

4141-
OpenAPI documents use JSON, YAML, and JSON Schema, and therefore share their security considerations:
4141+
OpenAPI description documents use JSON, YAML, and JSON Schema, and therefore share their security considerations:
41424142
- [JSON](https://www.iana.org/assignments/media-types/application/json)
41434143
- [YAML](https://www.iana.org/assignments/media-types/application/yaml)
41444144
- [JSON Schema Core](https://json-schema.org/draft/2020-12/json-schema-core#section-13)
41454145
- [JSON Schema Validation](https://json-schema.org/draft/2020-12/json-schema-validation#name-security-considerations)
41464146

41474147
### Tooling and Usage Scenarios
41484148

4149-
In addition, OpenAPI documents are processed by a wide variety of tooling for numerous different purposes, such as client code generation, documentation generation, server side routing, and API testing. OpenAPI document authors must consider the risks of the scenarios where the OpenAPI document may be used.
4149+
In addition, OpenAPI description documents are processed by a wide variety of tooling for numerous different purposes, such as client code generation, documentation generation, server side routing, and API testing. OpenAPI description authors must consider the risks of the scenarios where the OpenAPI description may be used.
41504150

41514151
### Security Schemes
41524152

4153-
An OpenAPI document describes the security schemes used to protect the resources it defines. The security schemes available offer varying degrees of protection. Factors such as the sensitivity of the data and the potential impact of a security breach should guide the selection of security schemes for the API resources. Some security schemes, such as basic auth and OAuth Implicit flow, are supported for compatibility with existing APIs. However, their inclusion in OpenAPI does not constitute an endorsement of their use, particularly for highly sensitive data or operations.
4153+
An OpenAPI description describes the security schemes used to protect the resources it defines. The security schemes available offer varying degrees of protection. Factors such as the sensitivity of the data and the potential impact of a security breach should guide the selection of security schemes for the API resources. Some security schemes, such as basic auth and OAuth Implicit flow, are supported for compatibility with existing APIs. However, their inclusion in OpenAPI does not constitute an endorsement of their use, particularly for highly sensitive data or operations.
41544154

41554155
### Handling External Resources
41564156

4157-
OpenAPI documents may contain references to external resources that may be dereferenced automatically by consuming tools. External resources may be hosted on different domains that may be untrusted. References in an OpenAPI document, or across OpenAPI documents may cause a cycle. Tooling must detect and handle cycles to prevent resource exhaustion.
4157+
OpenAPI description documents may contain references to external resources that may be dereferenced automatically by consuming tools. External resources may be hosted on different domains that may be untrusted. References in an OpenAPI document, or across OpenAPI documents within a multi-document OpenAPI description, may cause a cycle. Tooling must detect and handle cycles to prevent resource exhaustion.
41584158

41594159
### Markdown and HTML Sanitization
41604160

0 commit comments

Comments
 (0)