How to set the value null instead of "null" in the example of a schema in Springdoc-openapi?

Viewed 135

I am using Springdoc-openapi and have a dto like this:

@Schema(title = "Financial Conditions")
@JsonIgnoreProperties(ignoreUnknown = true)
public class CurrentFinancialConditions {
   
   @Schema(title = "Rate", example = "null")
   @JsonProperty("light")
   private String conditionsLight;

   @Schema(title = "Scores")
   private Scores scores;
}

and it gives me the result in swagger-ui:

"current_financial_conditions": {
  "scores": {
    "liquidity": "some example goes here",
    "profitability": "some example goes here",
  },
  "light": "null"
}

Is it possible to change the example value in the generated docs from "null" to null?

0 Answers
Related