Improve types, doc, allow spec on ApiSchema + various changes#422
Improve types, doc, allow spec on ApiSchema + various changes#422serut wants to merge 8 commits into
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
9e4312e to
443544b
Compare
| const { options } = useSpecOptions(themeId, optionsOverrides); | ||
| const isDevMode = process.env.NODE_ENV === 'development'; | ||
|
|
||
| if ((isDevMode && isSpecFile === false) || !spec) { |
There was a problem hiding this comment.
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.
removing this as it will go out of sync from code and no one will maintain this. types are enough to figure out props
| `${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.
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 <leo.mieulet.pro@gmail.com>
|
Closed in favor of #424 |
|
@serut let me know if I missed anything in terms of supported features |
Consolidation/cleanup of