mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-07 13:44:54 +03:00
In JsonFormatter, output dates as ISO 8601 strings, per OpenAPI spec.
This commit is contained in:
parent
3488a86ac5
commit
f525f8680d
|
@ -35,6 +35,8 @@ function valueToHTML(value) {
|
||||||
level++;
|
level++;
|
||||||
output += arrayToHTML(value);
|
output += arrayToHTML(value);
|
||||||
level--;
|
level--;
|
||||||
|
} else if (value && value.constructor === Date) {
|
||||||
|
output += decorateWithSpan('"' + value.toISOString() + '"', 'type-string');
|
||||||
} else if (valueType === 'object') {
|
} else if (valueType === 'object') {
|
||||||
level++;
|
level++;
|
||||||
output += objectToHTML(value);
|
output += objectToHTML(value);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user