stoicflame / enunciate

Build-time enhancement tool for Java-based Web services projects
http://enunciate.webcohesion.com/
Other
480 stars 200 forks source link

Map `java.lang.Record`s to JSON objects and correctly extract descriptions for record components #1186

Closed ripdajacker closed 9 months ago

ripdajacker commented 9 months ago

First of all thanks for keeping this project alive, it adds tremendous value to our codebase.

This PR adds support for mapping records to actual JSON objects, just like enunciate does with ordinary POJOs.

Record components are mapped to JSON properties and the description is retrieved from the doc comments on the record declaration itself. This assumes record components are documented using @param.

We have tested it locally on some projects and it correctly extracts descriptions and component names from local files as well as .java files in JARs.

stoicflame commented 9 months ago

Included in 2.17.1.