Merge branch 'master' of github.com:swagger-api/swagger-ui into ft/3135-request-duration
This commit is contained in:
@@ -9,7 +9,7 @@ const primitives = {
|
||||
"number": () => 0,
|
||||
"number_float": () => 0.0,
|
||||
"integer": () => 0,
|
||||
"boolean": () => true
|
||||
"boolean": (schema) => typeof schema.default === "boolean" ? schema.default : true
|
||||
}
|
||||
|
||||
const primitive = (schema) => {
|
||||
@@ -74,6 +74,10 @@ export const sampleFromSchema = (schema, config={}) => {
|
||||
return normalizeArray(schema["enum"])[0]
|
||||
}
|
||||
|
||||
if (type === "file") {
|
||||
return
|
||||
}
|
||||
|
||||
return primitive(schema)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user