Skip to content

Commit c56b7e4

Browse files
committed
Add extends example with relative URL
1 parent c25bb01 commit c56b7e4

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

versions/1.0.0.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,27 @@ The list of actions MUST be applied in sequential order to ensure a consistent o
7070

7171
The `extends` property can be used to indicate that the Overlay was designed to update a specific [[OpenAPI]] document. Where no `extends` is provided it is the responsibility of tooling to apply the Overlay document to the appropriate OpenAPI document(s).
7272

73-
In the following example the `extends` property specifies that the overlay is designed to update the Redocly Museum OpenAPI document.
73+
In the following example the `extends` property specifies that the overlay is designed to update the OpenAPI Tic Tac Toe example document using an absolute URL.
7474

7575
```yaml
7676
overlay: 1.0.0
7777
info:
78-
title: Overlay for the Redocly Museum API
78+
title: Overlay for the Tic Tac Toe API document
7979
version: 1.0.0
80-
extends: 'https://raw.githubusercontent.com/Redocly/museum-openapi-example/refs/heads/main/openapi.yaml'
80+
extends: 'https://raw.githubusercontent.com/OAI/learn.openapis.org/refs/heads/main/examples/v3.1/tictactoe.yaml'
8181
...
8282
```
8383

84+
The `extends` property can also specify a relative URL. In this case, the URL is resolved relative to the location of the Overlay document.
85+
86+
```yaml
87+
overlay: 1.0.0
88+
info:
89+
title: Overlay for the Tic Tac Toe API document
90+
version: 1.0.0
91+
extends: './tictactoe.yaml'
92+
```
93+
8494
#### Info Object
8595
8696
The object provides metadata about the Overlay.

0 commit comments

Comments
 (0)