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

Function getInvalidProperty

packages/core/src/util/errors.ts:42–52  ·  view source on GitHub ↗
(error: ErrorObject)

Source from the content-addressed store, hash-verified

40 * @returns The invalid property name if present, otherwise undefined
41 */
42const getInvalidProperty = (error: ErrorObject): string | undefined => {
43 switch (error.keyword) {
44 case 'required':
45 case 'dependencies':
46 return error.params.missingProperty;
47 case 'additionalProperties':
48 return error.params.additionalProperty;
49 default:
50 return undefined;
51 }
52};
53
54export const getControlPath = (error: ErrorObject) => {
55 // Up until AJV v7 the path property was called 'dataPath'

Callers 1

getControlPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…