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
{{ message }}
Repository navigation
Converting YAML doc with date types to JSON creates invalid JSON doc #332
I'm pulling in a YAML OpenApi doc with the following property in a schema:
orderedOn:
type: stringdescription: The date the order was submitted.format: datereadOnly: trueexample: "2018-01-23"
When using the serializer (doc.Serialize(ms, openApiVersion, format);, where ms is a MemoryStream, openApiVersion is OpenApiSpecVersion.OpenApi3_0, and format is OpenApiFormat.Json, the JSON output is:
"orderedOn": {
"type": "string",
"description": "The date the order was submitted.",
"format": "date",
"readOnly": true,
"example": 2018-01-23T00:00:00.0000000-05:00
}
which is invalid JSON (the date is not properly quoted)
Activity
PerthCharern commentedon Oct 16, 2018
This is fixed in #322. We will release a patch version by next week.
gregbair commentedon Oct 16, 2018
Thank you, I'll close this then.