Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.19.0
-
None
-
None
-
Maven dependencies:
- camel-openapi-java: 3.19.0
- swagger-core: 2.1.13
-
Unknown
Description
Related to issue CAMEL-16986
When using the @Schema annotation for OpenAPI documentation, still some of the properties of the annotation are ignored, mainly "maxLength", "minLength" and "defaultValue". These values missing from the generated JSON file.
Related Open API definition: https://github.com/OAI/OpenAPI-Specification/blob/3.0.2/versions/3.0.2.md#schema-object
Example:
@Schema(required = true, description = "Message description", example = "Example message", defaultValue = "Default message", maxLength = 20, minLength = 1) private String message;
Currently generated JSON:
"components" : { "schemas" : { "InputModel" : { "required" : [ "message" ], "type" : "object", "properties" : { "message" : { "description" : "Message description", "type" : "string", "example" : "Example message" },