diff --git a/src/_help/specification-support/extensions.md b/src/_help/specification-support/extensions.md index bc47c008..bf9ef25b 100644 --- a/src/_help/specification-support/extensions.md +++ b/src/_help/specification-support/extensions.md @@ -24,6 +24,46 @@ This custom property allows you to identify some components of your documentation as beta. Find out more in our [dedicated section](/help/specification-support/doc-beta). +## Give precision to the state of your features (`x-state`) + +This custom property can be added inside an operation or a property to identify it with a custom tag. +The `x-state` property is a string. + +### Example usage + +Here under is an example of an operation and a property with a `x-state`. + +```yaml +paths: + /diffs: + post: + tags: ["x-state"] + description: Create a diff between any two given API definitions + x-state: Technical preview # x-state flag at the operation level + requestBody: + description: The diff creation request object + content: + application/json: + schema: + type: object + properties: + url: + type: string + format: uri + x-state: Still unstable # x-state 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. +``` + +Adding or removing this property is a structural change. +When combined with the `x-beta`, the `x-state` replaces its value, but keeps the beta behavior: a change in a beta component is never identified as a breaking change. + +The documentation displays custom tags on the operation and property: + +![doc-beta.png](/images/help/doc-x-state.png) + + ## Get feedback from users (`x-feedbackLink`) This custom property allows you to add a button to your documentation that enables you to collect feedback from your users. Find out more in our [dedicated diff --git a/src/images/help/doc-x-state.png b/src/images/help/doc-x-state.png new file mode 100644 index 00000000..71d76a0b Binary files /dev/null and b/src/images/help/doc-x-state.png differ