SchemaPathModule
PackageReified.Schema
Functions for building and formatting schema error paths.
Summary
| Name | Signature | Synopsis |
|---|---|---|
| root | SchemaPath.root | The root of a schema value. |
| key | SchemaPath.key value | A string field or map-key location. |
| index | SchemaPath.index value | A zero-based collection-item location. |
| append | SchemaPath.append parent child | Appends a relative path to a parent path. |
| format | SchemaPath.format path | Formats a path with dot-separated keys and bracketed indexes. |
| fold | SchemaPath.fold keyFolder indexFolder state path | Folds over string keys and integer indexes without exposing a path-segment type. |
A string field or map-key location.
Parameters
| Name | Type | Description |
|---|---|---|
| value | string |
Returns
SchemaPath
A zero-based collection-item location.
Parameters
| Name | Type | Description |
|---|---|---|
| value | int |
Returns
SchemaPath
Appends a relative path to a parent path.
Parameters
| Name | Type | Description |
|---|---|---|
| parent | SchemaPath | |
| child | SchemaPath |
Returns
SchemaPath
Formats a path with dot-separated keys and bracketed indexes.
Parameters
| Name | Type | Description |
|---|---|---|
| path | SchemaPath |
Returns
string