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

Improve feature/pass-spec-directly #356

Open
wants to merge 2 commits into
base: feature/pass-spec-directly
Choose a base branch
from

Conversation

serut
Copy link
Contributor

@serut serut commented Apr 14, 2024

This MR fixes #347

  • remove getIsExternalUrl function
  • add themeId to ApiSchema
  • add downloadSpecUrl property to RedocProps and co, to separate the behavior from url that was doing 2 different things
  • improve doc with new usage

Copy link

changeset-bot bot commented Apr 14, 2024

⚠️ No Changeset found

Latest commit: 5984190

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Apr 14, 2024

@serut is attempting to deploy a commit to the Rohit Gohri's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Owner

@rohit-gohri rohit-gohri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry of the (very) late review and thank you for your continued contributions. I will try to go through my draft PR with your changes and release it soon

@@ -20,7 +16,7 @@ function Redoc(props: RedocProps): JSX.Element {
const { className, optionsOverrides, url, themeId } = props;
const { options } = useSpecOptions(themeId, optionsOverrides);

if (getIsExternalUrl(url)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is going to completely disable SSR for anyone using url, if that is what you want then we can just add that as an option I think rather than changing behavior for existing users.

We won't need downloadSpecUrl option, just a ssr option, by default true but which can be disabled to always use client side rendering and skip the bundling logic

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allright I will try to do that change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants