Skip to content

Commit

Permalink
feat: playground settings (#1224)
Browse files Browse the repository at this point in the history
Co-authored-by: Rohin Bhargava <[email protected]>
Co-authored-by: Rohin Bhargava <[email protected]>
  • Loading branch information
3 people authored Aug 9, 2024
1 parent f0cca2d commit 8f01e01
Show file tree
Hide file tree
Showing 45 changed files with 422 additions and 46 deletions.
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

0 comments on commit 8f01e01

Please sign in to comment.