Data Path property renamed

Breaking change notice (2023.2.0)

Itential Platform 2023.2 introduces a breaking change that affects any custom logic depending on the dataPath property in an API error object.

Input validation failures

Many APIs reported input validation failures as a list of validation report objects. These objects specified the individual property that caused the failure in a key called dataPath:

1[
2 {
3 "keyword": "type",
4 "dataPath": ".failingProperty1",
5 "schemaPath": "#/properties/failingProperty1/type",
6 "params": { "type": "string" },
7 "message": "should be string"
8 },
9 {
10 "keyword": "type",
11 "dataPath": ".failingProperty2",
12 "schemaPath": "#/properties/failingProperty2/type",
13 "params": { "type": "string" },
14 "message": "should be string"
15 }
16]

In previous releases, the dataPath value was formatted as a dotted path:

1{
2 "keyword": "type",
3 "dataPath": ".my.nested.property",
4 "schemaPath": "#/properties/my/properties/nested/properties/property/type",
5 "params": { "type": "string" },
6 "message": "should be string"
7}

With the 2023.2 release, the dataPath property is renamed to instancePath and its value is formatted as a JSON Pointer:

1{
2 "keyword": "type",
3 "instancePath": "/my/nested/property",
4 "schemaPath": "#/properties/my/properties/nested/properties/property/type",
5 "params": { "type": "string" },
6 "message": "should be string"
7}

What should I do?

Update any code referring to dataPath to use instancePath instead. If your logic uses the value of dataPath programmatically, update it to use the new JSON Pointer format.