Skip to content
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

feat: playground settings #1224

Merged
merged 15 commits into from
Aug 9, 2024
34 changes: 33 additions & 1 deletion fern/apis/navigation/definition/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ types:
TabId: string
PageId: string
NodeId: string
EnvironmentId:
type: string
docs: Identifier for an API environment (i.e. "Prod", "Staging", "Dev")

ApiDefinitionId: string
EndpointId: string
Expand Down Expand Up @@ -203,11 +206,30 @@ types:
- WithRedirect
properties:
type: literal<"apiReference">
disableLongScrolling: optional<boolean>
paginated:
type: optional<boolean>
docs: If true, long-scrolling will be disabled.
showErrors: optional<boolean>
hideTitle: optional<boolean>
children: list<ApiPackageChild>
changelog: optional<ChangelogNode>
playground:
# enabled: optional<boolean> (this is currently controlled in feature flags, global boolean)
type: optional<PlaygroundSettings>
docs: Settings for the api playground that affects all endpoints.

PlaygroundSettings:
properties:
allowedEnvironments:
type: optional<list<EnvironmentId>>
docs: |
A list of environment IDs that are allowed to be used in the playground.
If not provided, all environments are allowed. And if the provided list is empty, the playground should be disabled.
button: optional<PlaygroundButtonSettings>

PlaygroundButtonSettings:
properties:
href: optional<Url>

EndpointNode:
extends:
Expand All @@ -218,6 +240,9 @@ types:
method: HttpMethod
endpointId: EndpointId
isResponseStream: optional<boolean>
playground:
type: optional<PlaygroundSettings>
docs: Settings for the api playground that affect this endpoint specifically.

WebSocketNode:
extends:
Expand All @@ -226,6 +251,9 @@ types:
properties:
type: literal<"webSocket">
webSocketId: WebSocketId
playground:
type: optional<PlaygroundSettings>
docs: Settings for the api playground that affect this endpoint specifically.

WebhookNode:
extends:
Expand All @@ -235,6 +263,7 @@ types:
type: literal<"webhook">
method: HttpMethod
webhookId: WebhookId
# note: webhooks do not have a playground

ApiPackageNode:
extends:
Expand All @@ -245,6 +274,9 @@ types:
properties:
type: literal<"apiPackage">
children: list<ApiPackageChild>
playground:
type: optional<PlaygroundSettings>
docs: Settings for the api playground that is applied only to descendants of this api package.

# utilities

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading