Record classes not working correctly in OpenAPI feature #30123
Labels
in:MicroProfile/OpenAPI
Needs member attention
release bug
This bug is present in a released version of Open Liberty
Describe the bug
Record classes are not working correctly in OpenAPI, in microProfile-6.1 / mpOpenAPI-3.1 (and before).
The implicit getters/fields are ignored.
Steps to Reproduce
Add a record class, use it as some Jakarta Rest response DTO:
The openapi yaml (from
.../openapi
) shows a raw jsonobject
without field descriptions:Expected behavior
The openapi schema yaml should have info about
record
fields.Diagnostic information:
Additional context
Workaround: adding a classic getter
getXxxx()
in the record class avoids the problem, but it removes one benefit ofrecord
.The text was updated successfully, but these errors were encountered: