Skip to content

Commit c21b5ca

Browse files
authored
Merge pull request #5286 from notEthan/oas-appendix-f-uri
fix Appedix F URI inconsistencies (v3.3)
2 parents d28d9f3 + 28b3d44 commit c21b5ca

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/oas.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5336,7 +5336,7 @@ components:
53365336
content:
53375337
application/json:
53385338
schema:
5339-
$ref: "#/components/api/schemas/Foo"
5339+
$ref: "#/components/schemas/Foo"
53405340
schemas:
53415341
Foo:
53425342
properties:
@@ -5457,7 +5457,7 @@ components:
54575457
```
54585458

54595459
In this example, all of the `$self` and `$id` values are relative URI references consisting of an absolute path.
5460-
This allows the retrieval URI 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`.
5460+
This allows the retrieval URI 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/api/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`.
54615461
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).
54625462

54635463
## Appendix G: Parsing and Resolution Guidance

0 commit comments

Comments
 (0)