4

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?

connecticum
  • 83
  • 1
  • 5

0 Answers0