redoc
redoc copied to clipboard
Monorepo
Describe the problem to be solved Created OpenAPI code generator using ReDoc. It generates TypeScript, Axios api client, JSON Schema etc. We want to publish it to npm as OSS, but I can't remove dependencies on React, ReactDOM and styled-components.
Describe the solution you'd like
Would you mind make these source into a split module?
- https://github.com/Redocly/redoc/tree/main/src/services
- https://github.com/Redocly/redoc/tree/main/src/types
- https://github.com/Redocly/redoc/tree/main/src/utils
Move to @redocly/openapi-core or this repositories to being Monorepo and so on.
Describe alternatives you've considered none
Additional context
Code like below.
import { RedocNormalizedOptions, SpecStore, loadAndBundleSpec, SchemaModel } from 'redoc';
const reDocOptions = new RedocNormalizedOptions({});
const bundleSpec = await loadAndBundleSpec('OpenAPI path');
const store = new SpecStore(bundleSpec, undefined, reDocOptions);
/**
- store.contentItems
- store.parser
- new SchemaModel(store.parser, 'e.g. store.parser.spec.components' , reDocOptions );
....
*/
Hi @yokoyama-takuya,
Thank you for taking the time to share this idea with us.
I have added it to our list of ideas so that our Product Team can evaluate how it fits our roadmap.