MCPcopy Create free account
hub / github.com/eclipsesource/jsonforms / isOneOfEnumSchema

Function isOneOfEnumSchema

packages/core/src/util/schema.ts:57–61  ·  view source on GitHub ↗
(schema: JsonSchema)

Source from the content-addressed store, hash-verified

55 * Tests whether the schema has an enum based on oneOf.
56 */
57export 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.

Callers 4

computeChildLabelFunction · 0.90
testers.tsFile · 0.90
isObjectArrayWithNestingFunction · 0.90
errorsAtFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…