javalin / javalin-openapi

Annotation processor for compile-time OpenAPI & JsonSchema, with out-of-the-box support for Javalin 5.x, Swagger & ReDoc
https://github.com/javalin/javalin-openapi/wiki
Apache License 2.0
45 stars 17 forks source link

Java record with jakarta.validation.constraints producing unwanted $ref #187

Closed mrguamos closed 1 year ago

mrguamos commented 1 year ago

It seems that the plugin is producing an unwanted $ref when using Java record with jakarta.validation.constraints.

private record Credentials(
        @NotEmpty
        String username,
        @NotEmpty
        String password) {
}
Screenshot 2023-05-23 at 7 11 05 PM
dzikoysk commented 1 year ago

I guess it'll fail with any annotation on record's property. I'll try to take a look at it tomorrow.

dzikoysk commented 1 year ago

It'll be available in the next release, but can already use snapshot build to get this fix :)