Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions versions/3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ The available status codes are defined by [RFC7231](http://tools.ietf.org/html/r

### Format

The files describing the RESTful API in accordance with this specification consist of JSON objects and conform to the JSON standards. An OAS file written in
YAML, a superset of JSON, also complies with this specification.
An API description that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we adopt my suggestion on #1154 then this would be "An OpenAPI definition that conforms to the OpenAPI Specification...." (rather than An API description)


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

Expand All @@ -106,20 +105,19 @@ For example, if a field has an array value, the JSON array representation will b
"field": [...]
}
```

While the API is described using JSON, input to and output from the API is not required to be JSON.

All field names in the specification are **case sensitive**.

The schema exposes two types of fields: Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for the field name.

Multiple occurrences of patterned fields need to have unique names.
Patterned fields MUST have unique names within the containing object.

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:

- Tags MUST be limited to those allowed by the [JSON Schema ruleset](http://www.yaml.org/spec/1.2/spec.html#id2803231).
- Keys used in YAML maps MUST be limited to a scalar string, as defined by the [YAML Failsafe schema ruleset](http://yaml.org/spec/1.2/spec.html#id2802346).

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

### <a name="fileStructure"></a>File Structure

The OAS representation of the API is made of a single file.
Expand Down