OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
In ma yaml I defined my property with example parameter:
myDate:
type: "string"
format: "date"
description: "My date"
example: "2012-10-11"
But example is ignored by plugin: In my generated code I have:
@ApiModelProperty(example = "Thu Oct 11 02:00:00 CEST 2012", required = true, value = "My date")
I would like have a example like in my yaml file. In YYYY-MM-DD format.
0
I'm using a openapi-generator-maven-plugin with 4.2.3 version.
My configuration looks like this:
In ma yaml I defined my property with example parameter:
myDate: type: "string" format: "date" description: "My date" example: "2012-10-11" But example is ignored by plugin: In my generated code I have:
@ApiModelProperty(example = "Thu Oct 11 02:00:00 CEST 2012", required = true, value = "My date") I would like have a example like in my yaml file. In YYYY-MM-DD format.
I'm using:
https://stackoverflow.com/questions/61082113/bug-in-openapi-generator-wrong-format-for-the-example-value-of-date-datatype