You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/oas.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4949,7 +4949,7 @@ paths:
4949
4949
/foo:
4950
4950
get:
4951
4951
requestBody:
4952
-
$ref: "shared#/components/requestBodies/Foo"
4952
+
$ref: "shared/foo#/components/requestBodies/Foo"
4953
4953
```
4954
4954
4955
4955
Assume the retrieval URI for the following document is `https://git.example.com/shared/blob/main/shared/foo.yaml`:
@@ -4983,7 +4983,7 @@ In this example, the retrieval URIs are irrelevant because both documents define
4983
4983
For the relative `$ref` in the first document, it is resolved against `$self` to produce `https://example.com/shared/foo#/components/requestBodies/Foo`.
4984
4984
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.
4985
4985
4986
-
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`.
4986
+
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`.
4987
4987
This matches the `$id` at `#/components/schemas/Foo/$id` so it points to that Schema Object.
4988
4988
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`.
0 commit comments