API reference / @jsprismarine/management-protocol / schemaCheck
schemaCheck
Type Aliases
Components
Components =
Readonly<Record<string,unknown>>
Defined in: schemaCheck.ts:12
The component schemas a $ref points into, by component name.
Functions
schemaMismatch()
schemaMismatch(
schema,value,components,path?):string|undefined
Defined in: schemaCheck.ts:44
Finds the first place a value breaks a schema.
Parameters
schema
unknown
A schema of the document, such as a method parameter's.
value
unknown
The value to check.
components
The document's component schemas.
path?
string = 'value'
Where the value is, for the message.
Returns
string | undefined
What is wrong and where, or undefined when the value matches.