Repository navigation
fix(boat-engine): deduplicate structurally identical components/schemas entries - #1273
Merged
Merged
Conversation
…as entries (DEVIN-705) Bundling can register the same external schema file under two different names when it's reachable via both its canonical component name and a direct $ref to the file, producing field-for-field identical models that show up as duplicate classes/doc pages downstream (e.g. duplicate model tabs on the developer portal). Adds DeduplicateSchemasTransformer, wired into boat:bundle and boat:generate right after bundling, to merge such duplicates and rewrite references to the canonical entry. This is a breaking change for generated clients, so it's documented in the README release notes and gated behind a new deduplicateSchemas plugin parameter (default true) to opt out. Co-Authored-By: Claude <[email protected]>
|
ankypant
approved these changes
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
boat:bundle/boat:generatecould register the same external schema file under two different names when it's reachable both via its canonical component name and a direct$refto the file, producing field-for-field identical models that show up as duplicate classes/doc pages downstream (e.g. duplicate model tabs on the developer portal).DeduplicateSchemasTransformer, wired in right after bundling, to merge such duplicates and rewrite every$refpointing at the discarded duplicate to the canonical entry.deduplicateSchemasplugin parameter (defaulttrue) onboat:bundleandboat:generateto opt out while consumers migrate.Test plan
DeduplicateSchemasTransformerTests(merge + ref rewrite, and no-op for distinct schemas) —boat-engineBundleMojoTestagainst a new fixture (bundler/duplicate-schema) reproducing the ticket's scenario, covering both the default (dedup on) and opt-out (deduplicateSchemas=false) behaviorboat-enginetest suite passes (33/33)boat-maven-plugin'sBundleMojoTest(17/17) andGeneratorTests(8/8) passFixes DEVIN-705
🤖 Generated with Claude Code