Skip to content

Improve types, doc, allow spec on ApiSchema + various changes #422

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

Closed
wants to merge 8 commits into from

Conversation

serut
Copy link
Collaborator

@serut serut commented May 25, 2025

Copy link

changeset-bot bot commented May 25, 2025

⚠️ No Changeset found

Latest commit: b12e0d6

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 May 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
redocusaurus ❌ Failed (Inspect) May 29, 2025 9:57pm


if ((isDevMode && isSpecFile === false) || !spec) {
Copy link
Owner

Choose a reason for hiding this comment

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

undo the change? dev mode should be client side

Comment on lines 27 to 33
| Name | Type | Description |
| ------- | ------------ | ---------------------------------------------------------------------------------------------------- |
| pointer | String | the redoc reference to display in [Redoc](https://redoc.ly/docs/resources/ref-guide/#pointer) format |
| example | boolean | (default: false) allow to display example |
| id | String | When spec not provided, load the spec from docusaurus config. Use first spec if not defined |
| spec | OpenAPI spec | A JSON content spec to use |
| themeId | String | redocusaurus theme to use - default to `theme-redoc` |
Copy link
Owner

Choose a reason for hiding this comment

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

removing this as it will go out of sync from code and no one will maintain this. types are enough to figure out props

const fileName = path.join(
'redocusaurus',
`${options.id || 'api-spec'}.yaml`,
);
let filesToWatch: string[] = isSpecFile ? [path.resolve(spec)] : [];
let filesToWatch: string[] = !isExternalUrl ? [path.resolve(spec)] : [];
Copy link
Owner

Choose a reason for hiding this comment

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

undoing the change in plugin, I think passing the spec directly can work without involving the plugin.

basically by passing no specs array to preset so only configure the theme and directly use it. no need to create plugin

rohit-gohri added a commit that referenced this pull request May 30, 2025
Version of #422 with bare minimum changes while still supporting the feature

feat: minimally add spec option to all components and update docs

---------

Co-authored-by: Léo MIEULET <[email protected]>
@rohit-gohri
Copy link
Owner

Closed in favor of #424

@rohit-gohri
Copy link
Owner

@serut let me know if I missed anything in terms of supported features

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