Managing page visibility
Control which endpoints from your OpenAPI specification appear in your documentation navigation
You can control which OpenAPI operations get published as documentation pages and their visibility in navigation. This is useful for internal-only endpoints, deprecated operations, beta features, or endpoints that should be accessible via direct URL but not discoverable through site navigation.
If your pages are autogenerated from an OpenAPI document, you can manage page visibility with the x-hidden
and x-excluded
extensions.
x-hidden
The x-hidden
extension creates a page for an endpoint, but hides it from navigation. The page is only accessible by navigating directly to its URL.
Common use cases for x-hidden
are:
- Endpoints you want to document, but not promote.
- Pages that you will link to from other content.
- Endpoints for specific users.
x-excluded
The x-excluded
extension completely excludes an endpoint from your documentation.
Common use cases for x-excluded
are:
- Internal-only endpoints.
- Deprecated endpoints that you don’t want to document.
- Beta features that are not ready for public documentation.
Implementation
Add the x-hidden
or x-excluded
extension under the HTTP method in your OpenAPI specification.
Here are examples of how to use each property in an OpenAPI schema document for an endpoint and a webhook path.