fix: string samples should also be json stringified. (#6412)
fixes #6120
This commit is contained in:
@@ -560,7 +560,9 @@ export const getSampleSchema = (schema, contentType="", config={}) => {
|
||||
|
||||
const res = memoizedSampleFromSchema(schema, config)
|
||||
|
||||
return typeof res === "object" ? JSON.stringify(res, null, 2) : res
|
||||
return typeof res === "object" || typeof res === "string"
|
||||
? JSON.stringify(res, null, 2)
|
||||
: res
|
||||
}
|
||||
|
||||
export const parseSearch = () => {
|
||||
|
||||
Reference in New Issue
Block a user