Skip to content

Commit 380dcaa

Browse files
authored
fix(openapi): OpenAPI spec generation issue with null values (#160)
1 parent 430a0fe commit 380dcaa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/openapi/src/schema-utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { type FileSchema, type JSONSchema, NON_LOGIC_KEYWORDS, type ObjectSchema
33

44
export class SchemaUtils {
55
isFileSchema(schema: JSONSchema.JSONSchema): schema is FileSchema {
6-
return typeof schema === 'object' && schema.type === 'string' && typeof schema.contentMediaType === 'string'
6+
return isObject(schema) && schema.type === 'string' && typeof schema.contentMediaType === 'string'
77
}
88

99
isObjectSchema(schema: JSONSchema.JSONSchema): schema is ObjectSchema {
10-
return typeof schema === 'object' && schema.type === 'object'
10+
return isObject(schema) && schema.type === 'object'
1111
}
1212

1313
isAnySchema(schema: JSONSchema.JSONSchema): boolean {

0 commit comments

Comments
 (0)