mirror of
https://github.com/Redocly/redoc.git
synced 2025-02-06 13:00:34 +03:00
fix: displaying json example when showObjectSchemaExamples enabled (#2635)
This commit is contained in:
parent
d614d2d022
commit
59ee73fefa
|
@ -393,7 +393,7 @@ export function getSerializedValue(field: FieldModel, example: any) {
|
|||
// decode for better readability in examples: see https://github.com/Redocly/redoc/issues/1138
|
||||
return decodeURIComponent(serializeParameterValue(field, example));
|
||||
} else {
|
||||
return String(example);
|
||||
return typeof example === 'object' ? example : String(example);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user