-
Notifications
You must be signed in to change notification settings - Fork 4
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
chore: migrated API Playground to using the V2 API Definition typings #1564
Merged
Conversation
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
abvthecity
had a problem deploying
to
Preview - app-dev.buildwithfern.com
October 1, 2024 16:22 — with
GitHub Actions
Failure
abvthecity
had a problem deploying
to
Preview - app.buildwithfern.com
October 1, 2024 16:22 — with
GitHub Actions
Failure
abvthecity
had a problem deploying
to
Preview - app-dev.buildwithfern.com
October 1, 2024 17:25 — with
GitHub Actions
Failure
abvthecity
had a problem deploying
to
Preview - app.buildwithfern.com
October 1, 2024 17:25 — with
GitHub Actions
Failure
abvthecity
had a problem deploying
to
Preview - app.buildwithfern.com
October 1, 2024 17:47 — with
GitHub Actions
Failure
abvthecity
had a problem deploying
to
Preview - app-dev.buildwithfern.com
October 1, 2024 17:47 — with
GitHub Actions
Failure
abvthecity
had a problem deploying
to
Preview - app.buildwithfern.com
October 1, 2024 18:26 — with
GitHub Actions
Failure
abvthecity
had a problem deploying
to
Preview - app-dev.buildwithfern.com
October 1, 2024 18:26 — with
GitHub Actions
Failure
abvthecity
had a problem deploying
to
Preview - app.buildwithfern.com
October 1, 2024 18:42 — with
GitHub Actions
Failure
abvthecity
had a problem deploying
to
Preview - app-dev.buildwithfern.com
October 1, 2024 18:42 — with
GitHub Actions
Failure
abvthecity
changed the title
stash: cached api playground impl
chore: migrated API Playground to using the V2 API Definition typings
Oct 1, 2024
abvthecity
had a problem deploying
to
Preview - app.buildwithfern.com
October 1, 2024 18:55 — with
GitHub Actions
Failure
abvthecity
had a problem deploying
to
Preview - app-dev.buildwithfern.com
October 1, 2024 18:55 — with
GitHub Actions
Failure
dsinghvi
approved these changes
Oct 2, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blind +1
export const PlaygroundContextProvider: FC = () => { | ||
const key = useApiRoute("/api/fern-docs/resolve-api"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abvthecity, can we bring this back?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a follow-up to #1552
Instead of calling
/api/fern-docs/resolve-api
, which resolves all endpoints, websockets, and webhooks across all the api definitions, this PR introduces 3 new getter functions:GET /api/fern-docs/api-definition/{api}/endpoint/{endpointid}
(link)GET /api/fern-docs/api-definition/{api}/websocket/{websocketid}
(link)GET /api/fern-docs/api-definition/{api}/webhook/{webhookid}
(link)Each of these endpoints:
Transformer
utility.In the API Playground,
ResolvedApiDefinition
types have been removed in favor of the fdr-sdk types.EndpointContext
, which makes it easier to pass the context down to its children without specifying each of the parameters separately. This is useful because an endpoint node and endpoint definition is always paired together.Caching
ApiDefinitionLoader: link does the bulk of the load -> prune -> cache work in the load() method, and the resolveDescriptions() method.
ApiDefinitionCache: link shows how we leverage
mset
andmget
to batch setting api definitions to parallelize and reduce server round-trips.