Repository navigation
fix: combine operations declared on the same path - #493
Merged
Merged
Conversation
jimmarino
approved these changes
Oct 28, 2026
ndr-brt
approved these changes
Oct 28, 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.
What this PR changes
mergeOpenApiSpecmerges the partial specs itself, with openapi-generator'sMergedSpecBuilderinDEEPmode:keeps the first one, and logs a warning.
The task options (
--inputDir,--output,--outputDir,--infoTitle,--infoDescription,--infoVersion) areunchanged.
openapi-generator is bumped from 7.19.0 to 7.26.0, which brings
DEEPmode (since 7.24).buildSrcnow depends on theopenapi-generator library, which the 7.26 Gradle plugin no longer exposes.
Why it does that
The default (
REF) merge keeps one$refper path, pointing to the last spec file that declares it. When two modulesdeclare the same path, the operations of one of them are lost. The input files were not sorted either, so which ones
were lost depended on the file system.
In the Connector,
/v4/dataplaneshas aGETfrom the data plane selector API and aPUTfrom the data planesignaling registration API. The published management API spec lacks the
PUT, and the OpenAPI verification fails atrandom on unrelated PRs whenever the merge picks the other one.
The task no longer extends openapi-generator's
GenerateTask:REFmerging needed a run of theopenapi-yamlgenerator to resolve the$refs, whereas aDEEPmerge is alreadyself-contained;
GenerateTaskruns through the worker API without waiting for the result, and needs a generator classpaththat only openapi-generator's own plugin configures.
Further notes
./gradlew resolveonmain):PUT /v4/dataplanes), nothing removed;openapi-yamlgenerator. Inline schemas stay inline instead of beingextracted into components (
*_properties,*_inner), and unused schemas are kept. When a project adopts thisversion, the merged specs therefore differ from the published ones, and their API versions have to be bumped.
MergeOpenApiSpecTaskTest(operations on a shared path are combined; info and license are set).Linked Issue(s)
Closes # <-- insert Issue number if one exists
Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.