Skip to content

Commit 966c0c6

Browse files
handrewsralfhandl
andauthored
Apply suggestions from code review
Co-authored-by: Ralf Handl <[email protected]>
1 parent 4068c09 commit 966c0c6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/oas.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ servers:
387387
description: The test API on this device
388388
```
389389
390-
For API URLs, the `$self` field, which identifies the OpenAPI Document, is ignored, and the retrieval URI is used instead. This produces a normalized production URL of `https://device1.example.com`, and a normalized test URL of `https://device1.example.com/test`.
390+
For API URLs the `$self` field, which identifies the OpenAPI Document, is ignored and the retrieval URI is used instead. This produces a normalized production URL of `https://device1.example.com`, and a normalized test URL of `https://device1.example.com/test`.
391391

392392
### Schema
393393

@@ -5329,8 +5329,6 @@ Similarly, the `url` field of the [External Documentation Object](#external-docu
53295329

53305330
If no base URI is provided from either of the previous sources, the next source is the retrieval URI (RFC 3986 Section 5.1.3).
53315331

5332-
For this example, assume that the YAML OpenAPI Document was retrieved from `https://example.com/api/openapis.yaml` and the JSON Schema document from `https://example.com/api/schemas/foo`
5333-
53345332
Assume this document was retrieved from `https://example.com/api/openapis.yaml`:
53355333

53365334
```YAML
@@ -5413,6 +5411,6 @@ components:
54135411
type: string
54145412
```
54155413

5416-
In this example, All of the `$self` and `$id` values are relative URI-references consisting of an absolute path.
5414+
In this example, all of the `$self` and `$id` values are relative URI-references consisting of an absolute path.
54175415
This allows the retrieval URL to set the host (and scheme), in this case `https://staging.example.com`, resulting in the first document's `$self` being `https://staging.example.com/openapi`, and the second document's `$self` being `https://staging.example.com/api/shared/foo`, with `$id` values of `https://staging.example.com/api/schemas/foo` and `https://staging.example.com/api/schemas/bar`.
54185416
Relative `$self` and `$id` values of this sort allow the same set of documents to work when deployed to other hosts, e.g. `https://example.com` (production) or `https://localhost:8080` (local development).

0 commit comments

Comments
 (0)