smallrye-open-api icon indicating copy to clipboard operation
smallrye-open-api copied to clipboard

Respect @JsonIdentityReference(alwaysAsId = true)

Open gmuellerinform opened this issue 2 years ago • 1 comments

In our API only ids are send instead of objects, so we use @JsonIdentityReference(alwaysAsId = true). See here: https://stackoverflow.com/questions/32692609/swagger-2-0-jackson-jsonidentityinfo-doesnt-work

It would be great if you could add this feature, so the generated OpenAPI matches the actual data.

gmuellerinform avatar Apr 06 '23 09:04 gmuellerinform

workaround

@JsonIdentityReference(alwaysAsId = true)
@Schema(
    description = "...",
    type = SchemaType.STRING,
    implementation = String.class,
    example = "..."
)

Scisaga avatar Apr 23 '24 22:04 Scisaga