Open mthaak opened 1 year ago
Version: 4.0.4
I have a property with this specification in index.yml:
index.yml
endDate: description: End date of the data point (inclusive). example: 2022-01-31 type: string format: date
When running swagger-cli bundle openapi/index.yml --type json -o openapi/openapi-spec.json the resulting JSON file contains:
swagger-cli bundle openapi/index.yml --type json -o openapi/openapi-spec.json
"endDate": { "description": "End date of the data point (inclusive).", "example": "2022-01-31T00:00:00.000Z", "type": "string", "format": "date" },
Note how the example is converted to a full ISO-8601 datetime string.
example
This is breaking validation in another tool I'm using. Because if format: date, then the example must be an ISO-8601 date like 2023-01-01.
format: date
2023-01-01
Version: 4.0.4
I have a property with this specification in
index.yml
:When running
swagger-cli bundle openapi/index.yml --type json -o openapi/openapi-spec.json
the resulting JSON file contains:Note how the
example
is converted to a full ISO-8601 datetime string.This is breaking validation in another tool I'm using. Because if
format: date
, then the example must be an ISO-8601 date like2023-01-01
.