Allow specifying an overwrite conflict strategy for the `join` command
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 228
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 48
Description
Is your feature request related to a problem? Please describe.
Hi, thank you for this amazing project! I'm using the join command to merge together the OpenAPI schemas of several AWS lambda based microservices implemented with FastAPI automatically, with a GitHub action. My problem is that I have shared component models and security scheme. Those are equal across the various microservices. For this reason, I'd assume there would be a way to resolve conflicts by merging/unifying the repeated schemas into a single one per conflict. From what I can see, I have to either edit the generated schema manually, or use custom decorators which I am still investigating.
Describe the solution you'd like
A simple flag to specify conflict resolution by merging schemas together, or perhaps marking one of the input files to use when deciding how to resolve a conflict.
Describe alternatives you've considered
Manually editing the resulting schema, but this weakens the value of the join command. Custom decorators look like a viable alternative, but I believe it makes sense for users to decide a conflict resolution strategy. if I understood correctly, decorators are for Redocly (SaaS), not cot Redoc/simple CLI usage
Additional context
I can try implementing this myself if others think this might be a valuable feature to have :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the CLI's join command implementation and trace how conflicts between repeated OpenAPI components are currently handled. Define the supported overwrite or merge strategies and their behavior for shared schemas and security schemes, then add the corresponding command coverage and documentation; done means users can select a deterministic strategy without manually editing the generated schema.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, typescript
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100