-
Bug
-
Resolution: Done
-
Major
-
fuse-7.12-GA
-
None
org.apache.camel.openapi.RestModelConverters.processSchema(OasSchema, Schema) is the method which converts from swagger schema to OpenAPI schema and also this is where data is lost.
io.swagger.v3.oas.annotations.media.Schema has all annotations metadata including "maxLength", "example", "description", "title". However when converted to OpenApi Schema (OasSchema) this information is ignored.
I notice that the when the properties (e.g. streamId) from the Request class are being converted to OasSchema in the RestModelConverters class, the attributes in the @Schema annotation are dropped off.
It seems the defect is missed conversions of the attributes after line 131:
OasSchema property = model.createPropertySchema((String) p);
Where the OasSchema property instance should additionally set the attributes coming from the io.swagger.v3.oas.models.media.Schema annotation's attributes.
Endpoint testable at 'curl http://localhost:8080/rest/api-docs'.