-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): document audiences for docs (#5309)
* document audiences in docs * Update audiences.mdx Add schematic example link --------- Co-authored-by: fern-bot <[email protected]> Co-authored-by: Danny Sheridan <[email protected]>
- Loading branch information
1 parent
65f193d
commit 72b9afe
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: Audiences | ||
subtitle: Use audiences to filter the endpoints, schemas, and properties that are displayed in your API Reference. | ||
--- | ||
|
||
Audiences are a useful tool for segmenting your API for different consumers. Common examples of audiences include `public` | ||
and `beta`. You can configure audiences in both [the OpenAPI Specification](/learn/api-definition/openapi/audiences) as well as [the Fern Definition](/learn/api-definition/fern/audiences). | ||
|
||
Once you've added audiences to your API Specification, you can filter to that audience by adding the `audience` property to the `api` object in your `docs.yml` navigation. | ||
|
||
<CodeBlocks> | ||
```yaml title="docs.yml" {3-4} | ||
navigation: | ||
- api: API Reference | ||
audiences: | ||
- public | ||
``` | ||
</CodeBlocks> | ||
Here's [an example from Schematic](https://github.com/SchematicHQ/schematic-fern-config/blob/e19f5ea69a343727ed018e79127bf4fd20ad0f7b/fern/docs.yml#L128-L129) in production. |