Skip to content

Commit d029f0d

Browse files
authored
Merge pull request #67 from OAI/mdk/extends-example
Add example of extends property
2 parents c6c8be0 + c56b7e4 commit d029f0d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

versions/1.0.0.md

+21
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,27 @@ The list of actions MUST be applied in sequential order to ensure a consistent o
7474

7575
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).
7676

77+
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.
78+
79+
```yaml
80+
overlay: 1.0.0
81+
info:
82+
title: Overlay for the Tic Tac Toe API document
83+
version: 1.0.0
84+
extends: 'https://raw.githubusercontent.com/OAI/learn.openapis.org/refs/heads/main/examples/v3.1/tictactoe.yaml'
85+
...
86+
```
87+
88+
The `extends` property can also specify a relative URL. In this case, the URL is resolved relative to the location of the Overlay document.
89+
90+
```yaml
91+
overlay: 1.0.0
92+
info:
93+
title: Overlay for the Tic Tac Toe API document
94+
version: 1.0.0
95+
extends: './tictactoe.yaml'
96+
```
97+
7798
#### Info Object
7899
79100
The object provides metadata about the Overlay.

0 commit comments

Comments
 (0)