redoc icon indicating copy to clipboard operation
redoc copied to clipboard

Monorepo

Open yokoyama-takuya opened this issue 2 years ago • 1 comments

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 );
  ....
 */

yokoyama-takuya avatar Sep 06 '23 09:09 yokoyama-takuya

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.

romanpryshliak avatar Sep 11 '23 11:09 romanpryshliak