Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated spec contains only one Schema if multiple Schema.name="xy" exist #1698

Closed
ideadapt opened this issue Aug 16, 2024 · 0 comments · Fixed by #1701
Closed

Generated spec contains only one Schema if multiple Schema.name="xy" exist #1698

ideadapt opened this issue Aug 16, 2024 · 0 comments · Fixed by #1701

Comments

@ideadapt
Copy link

ideadapt commented Aug 16, 2024

Feature description

Consider this situation

@Schema(name="Car")
data class Car1(val p1: String)

@Schema(name="Car")
data class Car2(val p2: String)

This will today generate a single Car schema in the openapi spec (while it seems not deterministic which of both types will be used). So one type is missing in the spec. The generated spec is valid and the generator process finishes with status ok, without any hint that some Schemas were overridden.

A similar issue was solved with #947 . But that fix only considers the name of the type and not the annotated Schema.name override.

It would be good to either:

altro3 added a commit to altro3/micronaut-openapi that referenced this issue Aug 17, 2024
altro3 added a commit to altro3/micronaut-openapi that referenced this issue Aug 17, 2024
altro3 added a commit to altro3/micronaut-openapi that referenced this issue Aug 22, 2024
altro3 added a commit to altro3/micronaut-openapi that referenced this issue Aug 22, 2024
sdelamo pushed a commit that referenced this issue Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant