We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb70b86 commit c8dc7abCopy full SHA for c8dc7ab
src/json-mock-from-schema.js
@@ -16,7 +16,7 @@ export const SchemaType = {
16
}
17
18
export function toSchemaType(schema) {
19
- return schema.openapi ? SchemaType.OPENAPI : SchemaType.JSON
+ return schema?.openapi ? SchemaType.OPENAPI : SchemaType.JSON
20
21
22
export function toJsonMock(type, schema) {
0 commit comments