Redocly / Redocly/redoc

Monorepo

Open
#2,400 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Enhancement
Dominant language
TypeScript
Stars
25.9k
Forks
2.4k
Avg merge
13h 10m
Merged PRs (30d)
4

Description

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?

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the dependencies of src/services, src/types, and src/utils, especially their references to React, ReactDOM, and styled-components. Compare the possible @redocly/openapi-core extraction with making the repository a monorepo. Done means the OpenAPI code generator can consume these sources and be published to npm without those UI dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.