Skip to content

Commit 27e889f

Browse files
authored
Merge pull request #1224 from MikeRalphson/introduction
Update intro wording, OAS definition [file] fixup
2 parents e2c1160 + f2ccf07 commit 27e889f

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

versions/3.0.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,22 @@ This document is licensed under [The Apache License, Version 2.0](http://www.apa
88

99
## Introduction
1010

11-
The OpenAPI Specification (OAS) is a project that provides mechanisms to describe and document a RESTful API.
11+
The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to RESTful 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-
14-
The OpenAPI Specification defines a set of files required to describe such APIs.
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.
16-
17-
Additional utilities, such as testing tools, can also use the files.
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.
1814

1915
## Table of Contents
2016
<!-- TOC depthFrom:1 depthTo:3 withLinks:1 updateOnSave:1 orderedList:0 -->
2117

2218
- [Definitions](#definitions)
23-
- [OpenAPI Definition File](#oasDefinitionFile)
19+
- [OpenAPI Definition](#oasDefinition)
2420
- [Path Templating](#pathTemplating)
2521
- [Media Types](#mediaTypes)
2622
- [HTTP Status Codes](#httpCodes)
2723
- [Specification](#specification)
2824
- [Versions](#versions)
2925
- [Format](#format)
30-
- [File Structure](#fileStructure)
26+
- [Document Structure](#documentStructure)
3127
- [Data Types](#dataTypes)
3228
- [Rich Text Formatting](#richText)
3329
- [Relative References In URLs](#relativeReferences)
@@ -70,8 +66,8 @@ Additional utilities, such as testing tools, can also use the files.
7066

7167
## Definitions
7268

73-
##### <a name="oasDefinitionFile"></a>OpenAPI Definition File
74-
A file or set of files which defines an API. The OpenAPI definition file uses and conforms to the OpenAPI Specification.
69+
##### <a name="oasDefinition"></a>OpenAPI Definition
70+
A document or set of documents which defines an API. An OpenAPI definition uses and conforms to the OpenAPI Specification.
7571

7672
##### <a name="pathTemplating"></a>Path Templating
7773
Path templating refers to the usage of curly braces ({}) to mark a section of a URL path as replaceable using path parameters.
@@ -107,7 +103,7 @@ The `major`.`minor` portion of the semver (for example `3.0`) SHALL designate th
107103

108104
Subsequent minor version releases of the OpenAPI Specification (incrementing the `minor` version number) SHOULD NOT interfere with tooling developed to a lower minor version and same major version. Thus a hypothetical `3.1.0` specification SHOULD be usable with tooling designed for `3.0.0`.
109105

110-
An OpenAPI definition file compatible with OAS 3.\*.\* contains a required [`openapi`](#oasVersion) field which designates the semantic version of the OAS that it uses. (OAS 2.0 definition document contain a top-level version field named [`swagger`](http://swagger.io/specification/#swaggerObject) and value `"2.0"`.)
106+
An OpenAPI definition compatible with OAS 3.\*.\* contains a required [`openapi`](#oasVersion) field which designates the semantic version of the OAS that it uses. (OAS 2.0 definition documents contain a top-level version field named [`swagger`](http://swagger.io/specification/#swaggerObject) and value `"2.0"`.)
111107

112108
### Format
113109

@@ -133,13 +129,13 @@ In order to preserve the ability to round-trip between YAML and JSON formats, YA
133129

134130
**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.
135131

136-
### <a name="fileStructure"></a>File Structure
132+
### <a name="documentStructure"></a>Document Structure
137133

138-
An OpenAPI definition file is made of a single file.
139-
However, parts of the definitions can be split into separate files, at the discretion of the user.
134+
An OpenAPI definition MAY be made up of a single document.
135+
However, parts of the definitions MAY be split into separate documents, at the discretion of the user.
140136
This is applicable for `$ref` fields in the specification as follows from the [JSON Schema](http://json-schema.org) definitions.
141137

142-
It is RECOMMENDED that the OpenAPI definition file be named following convention: `openapi.json` or `openapi.yaml`.
138+
It is RECOMMENDED that the root OpenAPI definition document be named: `openapi.json` or `openapi.yaml`.
143139

144140
### <a name="dataTypes"></a>Data Types
145141

@@ -187,13 +183,13 @@ In the following description, if a field is not explicitly **REQUIRED** or descr
187183

188184
#### <a name="oasObject"></a>OpenAPI Object
189185

190-
This is the root document object of the [OpenAPI definition file](#oasDefinitionFile).
186+
This is the root document object of the [OpenAPI definition](#oasDefinition).
191187

192188
##### Fixed Fields
193189

194190
Field Name | Type | Description
195191
---|:---:|---
196-
<a name="oasVersion"></a>openapi | `string` | **REQUIRED**. This string MUST be the [semantic version number](http://semver.org/spec/v2.0.0.html) of the [OpenAPI Specification version](#versions) that the OpenAPI definition file uses. The `openapi` field SHOULD be used by tooling specifications and clients to interpret the OpenAPI definition file. This is *not* related to the API [`info.version`](#infoVersion) string.
192+
<a name="oasVersion"></a>openapi | `string` | **REQUIRED**. This string MUST be the [semantic version number](http://semver.org/spec/v2.0.0.html) of the [OpenAPI Specification version](#versions) that the OpenAPI definition uses. The `openapi` field SHOULD be used by tooling specifications and clients to interpret the OpenAPI definition. This is *not* related to the API [`info.version`](#infoVersion) string.
197193
<a name="oasInfo"></a>info | [Info Object](#infoObject) | **REQUIRED**. Provides metadata about the API. The metadata can be used by the clients if needed.
198194
<a name="oasServers"></a>servers | [[Server Object](#serverObject)] | An array of Server Objects, which provide connectivity information to a target server. If the `servers` property is not provided, or is an empty array, the default value would be a [Server Object](#serverObject) with a [url](#serverUrl) value of `/`.
199195
<a name="oasPaths"></a>paths | [Paths Object](#pathsObject) | **REQUIRED**. The available paths and operations for the API.
@@ -2268,7 +2264,7 @@ This object cannot be extended with additional properties and any properties add
22682264
$ref: '#/components/schemas/Pet'
22692265
```
22702266

2271-
##### Relative Schema File Example
2267+
##### Relative Schema Document Example
22722268
```json
22732269
{
22742270
"$ref": "Pet.json"
@@ -2279,7 +2275,7 @@ $ref: '#/components/schemas/Pet'
22792275
$ref: Pet.yaml
22802276
```
22812277

2282-
##### Relative Files With Embedded Schema Example
2278+
##### Relative Documents With Embedded Schema Example
22832279
```json
22842280
{
22852281
"$ref": "definitions.json#/Pet"

0 commit comments

Comments
 (0)