-
Notifications
You must be signed in to change notification settings - Fork 116
Closed
Labels
type: enhancementNew feature or requestNew feature or request
Description
Expansion of properties doesn't seem to work for schema examples set on numeric fields.
Steps to Reproduce
- Have a project with a custom
openapi.propertiesfile (as per https://micronaut-projects.github.io/micronaut-openapi/latest/guide/index.html#propertiesFileConfiguration) - Add a property
micronaut.openapi.expand.example.version=42to it - Get the property expanded in the example of a
Stringfield and in the example of alongone:@Schema(example = "${example.version}") public String getVersionString() { return "foo"; } @Schema(example = "${example.version}") public long getVersionLong() { return 0; }
- generate the OpenAPI spec
Expected Behaviour
The property gets expanded (to 42) in both cases.
Actual Behaviour
The example gets only expanded for the String field, and turns out to be stripped out for the long field.
Environment Information
micronaut 2.5.8 (micronaut-openapi 2.4.0).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: enhancementNew feature or requestNew feature or request