Skip to content

v3.1.2: Fix Link Object subsections, improve examples #4868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions src/oas.md
Original file line number Diff line number Diff line change
Expand Up @@ -2507,10 +2507,12 @@ Clients follow all links at their discretion.
Neither permissions nor the capability to make a successful call to that link is guaranteed
solely by the existence of a relationship.

##### `operationRef` Examples
###### `operationRef` Examples

As references to `operationId` MAY NOT be possible (the `operationId` is an optional
field in an [Operation Object](#operation-object)), references MAY also be made through a relative `operationRef`:
As the `operationId` is an optional field in an [Operation Object](#operation-object), references MAY instead be made through a URI-reference with `operationRef`.
Note that both of these examples reference operations that can be identified via the [Paths Object](#paths-object) to ensure that the operation's path template is unambiguous.

A relative URI-reference `operationRef`:

```yaml
links:
Expand All @@ -2520,7 +2522,7 @@ links:
username: $response.body#/username
```

or a URI `operationRef`:
A non-relative URI `operationRef`:

```yaml
links:
Expand All @@ -2530,8 +2532,9 @@ links:
username: $response.body#/username
```

Note that in the use of `operationRef` the _escaped forward-slash_ is necessary when
using JSON Pointer, and it is necessary to URL-encode `{` and `}` as `%7B` and `%7D`, respectively, when using JSON Pointer as URI fragments.
Note that in the use of `operationRef` the _escaped forward-slash_ (`~1`) is necessary when
using JSON Pointer in URI fragments, and it is necessary to URL-encode `{` and `}` as `%7B` and `%7D`, respectively.
The unescaped, percent-decoded path template in the above examples would be `/2.0/repositories/{username}`.

##### Runtime Expressions

Expand Down Expand Up @@ -2565,7 +2568,7 @@ The `name` identifier is case-sensitive, whereas `token` is not.

The table below provides examples of runtime expressions and examples of their use in a value:

##### Examples
###### Example Expressions

| Source Location | example expression | notes |
| ---- | :---- | :---- |
Expand Down