Members
(static) JSON_SCHEMA_TYPES :array
A list of all allowed JSON Schema type values.
Type:
- array
- Source:
Methods
(static) getCallbackParameters(processParameter) → {array}
Returns the callback parameters for a given process parameter.
Parameters:
Name | Type | Description |
---|---|---|
processParameter |
object | The process parameter spec to parse. |
- Source:
Throws:
Error
Returns:
- Type
- array
(static) getCallbackParametersForProcess(process, parameterName) → {array}
Returns the callback parameters for a given process parameter from a full process spec.
Parameters:
Name | Type | Description |
---|---|---|
process |
object | The process to parse. |
parameterName |
string | The name of the parameter to get the callback parameters for. |
- Source:
Throws:
Error
Returns:
- Type
- array
(static) getElementJsonSchema(schema, key) → {object}
Returns the schema for a property of an object or an element of an array.
If you want to retrieve the schema for a specific key, use the parameter `key`.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
schema |
object | The JSON schema to parse. | |
key |
string | integer | null | null | If you want to retrieve the schema for a specific key, otherwise null. |
- Source:
Returns:
- JSON Schema
- Type
- object
(static) getNativeTypesForJsonSchema(schema, anyIsEmpty) → {array}
Returns *all* the native JSON data types allowed for the schema.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
schema |
object | ||
anyIsEmpty |
boolean | false |
- Source:
Returns:
- Type
- array
(static) normalizeJsonSchema(schemas) → {array}
From a "complex" JSON Schema with allOf/anyOf/oneOf, make separate schemas.
So afterwards each schema has it's own array entry.
It merges allOf, resolves anyOf/oneOf into separate schemas.
May also split the JSON Schema type arrays into separate entries by setting `splitTypes` to `true`.
Parameters:
Name | Type | Description |
---|---|---|
schemas |
object | array | The JSON Schema(s) to convert |
- Source:
Returns:
- Type
- array