Skip to content

Bug Report: demonstration of overlays and allOf not playing together nicely#2087

Open
nelzblooket wants to merge 1 commit intooapi-codegen:mainfrom
nelzblooket:main
Open

Bug Report: demonstration of overlays and allOf not playing together nicely#2087
nelzblooket wants to merge 1 commit intooapi-codegen:mainfrom
nelzblooket:main

Conversation

@nelzblooket
Copy link
Copy Markdown

Following the instructions:

Version of oapi-codegen - from main pulled today:

$ go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -version
github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen
(devel)

Go version:

$ go version
go version go1.24.0 darwin/arm64

Problem statement:
When doing an overlay of a type that has an allOf with a reference to another overlay, the subset overlay is being created as the alias in the generated file.

@kusari-inspector
Copy link
Copy Markdown

Kusari Inspector

Kusari Analysis Results:

Proceed with these changes

✅ No Flagged Issues Detected
All values appear to be within acceptable risk parameters.

No pinned version dependency changes, code issues or exposed secrets detected!

Note

View full detailed analysis result for more information on the output and the checks that were run.


@kusari-inspector rerun - Trigger a re-analysis of this PR
@kusari-inspector feedback [your message] - Send feedback to our AI and team
See Kusari's documentation for setup and configuration.
Commit: f64f92b, performed at: 2025-09-12T15:48:22Z

Found this helpful? Give it a 👍 or 👎 reaction!

Id int `json:"id"`
Name string `json:"name"`
}
type ClientWithId = OverlayClient
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect this to be OverlayClientWithId

Suggested change
type ClientWithId = OverlayClient
type ClientWithId = OverlayClientWithId

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant