(schema: JsonSchema)
| 55 | * Tests whether the schema has an enum based on oneOf. |
| 56 | */ |
| 57 | export const isOneOfEnumSchema = (schema: JsonSchema) => |
| 58 | !!schema && |
| 59 | Object.prototype.hasOwnProperty.call(schema, 'oneOf') && |
| 60 | schema.oneOf && |
| 61 | (schema.oneOf as JsonSchema[]).every((s) => s.const !== undefined); |
| 62 | |
| 63 | /** |
| 64 | * Tests whether the schema has an enum. |
no outgoing calls
no test coverage detected
searching dependent graphs…