-
Notifications
You must be signed in to change notification settings - Fork 121
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
packages/docusaurus-theme-redoc/src/theme/ApiSchema/ApiSchema.tsx
Outdated
Show resolved
Hide resolved
9e4312e
to
443544b
Compare
|
||
if ((isDevMode && isSpecFile === false) || !spec) { |
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.
undo the change? dev mode should be client side
…to feature/few-changes
| 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` | |
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.
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)] : []; |
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.
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
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]>
Closed in favor of #424 |
@serut let me know if I missed anything in terms of supported features |
Consolidation/cleanup of