Skip to content

Commit

Permalink
Merge pull request OAI#67 from OAI/mdk/extends-example
Browse files Browse the repository at this point in the history
Add example of extends property
  • Loading branch information
lornajane authored Oct 8, 2024
2 parents c6c8be0 + c56b7e4 commit d029f0d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions versions/1.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,27 @@ The list of actions MUST be applied in sequential order to ensure a consistent o

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

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.

```yaml
overlay: 1.0.0
info:
title: Overlay for the Tic Tac Toe API document
version: 1.0.0
extends: 'https://raw.githubusercontent.com/OAI/learn.openapis.org/refs/heads/main/examples/v3.1/tictactoe.yaml'
...
```

The `extends` property can also specify a relative URL. In this case, the URL is resolved relative to the location of the Overlay document.

```yaml
overlay: 1.0.0
info:
title: Overlay for the Tic Tac Toe API document
version: 1.0.0
extends: './tictactoe.yaml'
```
#### Info Object
The object provides metadata about the Overlay.
Expand Down

0 comments on commit d029f0d

Please sign in to comment.