You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (StringUtils.isNotBlank(schema.defaultValue())) {
Empty values are simply ignored, but many code generation tools are rely on this value. For ex. in Dart generator when no default value provieded, the field became required at code level.
The defaultValue in @Schema annotation should be nullable and passing empty value means include in generated schema.
The text was updated successfully, but these errors were encountered:
Empty default values (
@Schema(defaultValue = "")
) are not included into generated OpenAPI yaml file.Related code:
swagger-core/modules/swagger-core/src/main/java/io/swagger/v3/core/util/AnnotationsUtils.java
Line 751 in 55ef54d
Empty values are simply ignored, but many code generation tools are rely on this value. For ex. in Dart generator when no default value provieded, the field became required at code level.
The
defaultValue
in@Schema
annotation should be nullable and passing empty value means include in generated schema.The text was updated successfully, but these errors were encountered: