Skip to content

Commit

Permalink
beta: transform example to YAML format
Browse files Browse the repository at this point in the history
  • Loading branch information
paulRbr committed Dec 29, 2023
1 parent af07642 commit 7542fbd
Showing 1 changed file with 20 additions and 28 deletions.
48 changes: 20 additions & 28 deletions src/_help/specification-support/doc-beta.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,26 @@ A change in a beta component is never identified as a breaking change.
Here under is an example of a beta operation, a beta request body and a beta schema attribute.

```yaml
"paths": {
"/diffs": {
"post": {
"x-beta": true,
"description": "Create a diff between any two given API definitions",
"requestBody": {
"description": "The diff creation request object",
"content": {
"application/json": {
"schema": {
"x-beta": true,
"type": "object",
"properties": {
"url": {
"x-beta": true,
"type": "string",
"format": "uri",
"description": "**Required** if `definition` is not present.\nCurrent definition URL. It should be accessible through HTTP by Bump.sh servers.\n"
},
...
}
}
}
}
}
}
}
}
paths:
/diffs:
post:
description: Create a diff between any two given API definitions
x-beta: true # Beta flag at the operation level
requestBody:
description: The diff creation request object
content:
application/json:
schema:
type: object
x-beta: true # Beta flag at the top-level schema object
properties:
url:
type: string
format: uri
x-beta: true # Beta flag at the object property level
description: |
**Required** if `definition` is not present.
Current definition URL. It should be accessible through HTTP by Bump.sh servers.
```
The documentation displays a “Beta” flag on the components:
Expand Down

0 comments on commit 7542fbd

Please sign in to comment.