Skip to content

Commit 9e9faa4

Browse files
authored
Merge pull request #928 from RobDolinMS/patch-7
[ToC] Update to use internal anchors
2 parents 0ec8253 + 2e78582 commit 9e9faa4

File tree

1 file changed

+24
-21
lines changed

1 file changed

+24
-21
lines changed

versions/3.0.md

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,20 @@ Additional utilities can also take advantage of the resulting files, such as tes
1919
## Table of Contents
2020
<!-- TOC depthFrom:1 depthTo:3 withLinks:1 updateOnSave:1 orderedList:0 -->
2121

22-
- [Revision History](#revision-history)
2322
- [Definitions](#definitions)
23+
- [Path Templating](#pathTemplating)
24+
- [Media Types](#mediaTypes)
25+
- [HTTP Status Codes](#httpCodes)
2426
- [Specification](#specification)
2527
- [Format](#format)
26-
- [File Structure](#file-structure)
27-
- [Data Types](#data-types)
28-
- [Relative References In Urls](#relativeReferences)
28+
- [File Structure](#fileStructure)
29+
- [Data Types](#dataTypes)
30+
- [Relative References In Urls](#relativeReferences)
2931
- [Schema](#schema)
30-
- [OpenAPI Object](#openapi-object)
31-
- [Info Object](#info-object)
32-
- [Contact Object](#contact-object)
33-
- [License Object](#license-object)
32+
- [OpenAPI Object](#oasObject)
33+
- [Info Object](#infoObject)
34+
- [Contact Object](#contactObject)
35+
- [License Object](#licenseObject)
3436
- [Server Object](#server-object)
3537
- [Components Object](#components-object)
3638
- [Paths Object](#paths-object)
@@ -64,21 +66,11 @@ Additional utilities can also take advantage of the resulting files, such as tes
6466
- [Security Requirement Object](#security-requirement-object)
6567
- [Specification Extensions](#specification-extensions)
6668
- [Security Filtering](#security-filtering)
69+
- [Appendix A: Revision History](#revisionHistory)
6770

6871

6972
<!-- /TOC -->
7073

71-
## Revision History
72-
73-
Version | Date | Notes
74-
--- | --- | ---
75-
3.0.0-rc0 | 2017-02-28 | Implementor's draft of the 3.0 specification
76-
2.0 | 2015-12-31 | Donation of Swagger 2.0 to the Open API Initiative
77-
2.0 | 2014-09-08 | Release of Swagger 2.0
78-
1.2 | 2014-03-14 | Initial release of the formal document.
79-
1.1 | 2012-08-22 | Release of Swagger 1.1
80-
1.0 | 2011-08-10 | First release of the Swagger Specification
81-
8274
## Definitions
8375

8476
##### <a name="pathTemplating"></a>Path Templating
@@ -132,15 +124,15 @@ In order to preserve the ability to round-trip between YAML and JSON formats, YA
132124
- Tags MUST be limited to those allowed by the [JSON Schema ruleset](http://www.yaml.org/spec/1.2/spec.html#id2803231)
133125
- 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)
134126

135-
### File Structure
127+
### <a name="fileStructure"></a>File Structure
136128

137129
The OAS representation of the API is made of a single file.
138130
However, parts of the definitions can be split into separate files, at the discretion of the user.
139131
This is applicable for `$ref` fields in the specification as follows from the [JSON Schema](http://json-schema.org) definitions.
140132

141133
By convention, it is RECOMMENDED that the OpenAPI Specification (OAS) file be named `openapi.json` or `openapi.yaml`.
142134

143-
### Data Types
135+
### <a name="dataTypes"></a>Data Types
144136

145137
Primitive data types in the OAS are based on the types supported by the [JSON Schema Specification Wright Draft 00](https://tools.ietf.org/html/draft-wright-json-schema-00#section-4.2). Note that `integer` as a type is also supported and is defined as a JSON number without a fraction or exponent part. `null` is not supported as a value.
146138
Models are described using the [Schema Object](#schemaObject) which is an extended subset of JSON Schema Specification Wright Draft 00.
@@ -3549,3 +3541,14 @@ Two examples for this:
35493541

35503542
1. The [Paths Object](#pathsObject) MAY be empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can't access any documentation. They'd still have access to the [Info Object](#infoObject) which may contain additional information regarding authentication.
35513543
2. The [Path Item Object](#pathItemObject) MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different than hiding the path itself from the [Paths Object](#pathsObject) so the user will not be aware of its existence. This allows the documentation provider a finer control over what the viewer can see.
3544+
3545+
## <a name="revisionHistory"></a>Appendix A: Revision History
3546+
3547+
Version | Date | Notes
3548+
--- | --- | ---
3549+
3.0.0-rc0 | 2017-02-28 | Implementor's draft of the 3.0 specification
3550+
2.0 | 2015-12-31 | Donation of Swagger 2.0 to the Open API Initiative
3551+
2.0 | 2014-09-08 | Release of Swagger 2.0
3552+
1.2 | 2014-03-14 | Initial release of the formal document.
3553+
1.1 | 2012-08-22 | Release of Swagger 1.1
3554+
1.0 | 2011-08-10 | First release of the Swagger Specification

0 commit comments

Comments
 (0)