Skip to content

Commit 4be3290

Browse files
committed
Fix more example bugs
Never change your directory structure halfway through writing examples...
1 parent 267ee0b commit 4be3290

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/oas.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4940,7 +4940,7 @@ paths:
49404940
/foo:
49414941
get:
49424942
requestBody:
4943-
$ref: "shared#/components/requestBodies/Foo"
4943+
$ref: "shared/foo#/components/requestBodies/Foo"
49444944
```
49454945

49464946
Assume the retrieval URI for the following document is `https://git.example.com/shared/blob/main/shared/foo.yaml`:
@@ -4974,7 +4974,7 @@ In this example, the retrieval URIs are irrelevant because both documents define
49744974
For the relative `$ref` in the first document, it is resolved against `$self` to produce `https://example.com/shared/foo#/components/requestBodies/Foo`.
49754975
The portion of that URI before the '#' matches the `$self` of the second document, so the reference target is resolved to `#/components/requestBodies/Foo` in that second document.
49764976

4977-
In that document, the `$ref` in the Request Body Object is resolved using that document's `$self` as the base URI, producing `https://example.com/schemas/foo`.
4977+
In that document, the `$ref` in the Request Body Object is resolved using that document's `$self` as the base URI, producing `https://example.com/api/schemas/foo`.
49784978
This matches the `$id` at `#/components/schemas/Foo/$id` so it points to that Schema Object.
49794979
That Schema Object has a subschema with `$ref: bar`, which is resolved against the `$id` to produce `https://example.com/schemas/bar`, which matches the `$id` at `#/components/schemas/Bar/$id`.
49804980

0 commit comments

Comments
 (0)