department-for-transport-public / D-TRO

Digital Traffic Regulation Orders (D-TRO)
MIT License
3 stars 1 forks source link

JSON Schema v3.2.2 has some invalid references #8

Closed ruipinge closed 1 month ago

ruipinge commented 1 month ago

The type ChangeableTimePeriodEnd includes some references to other types under the definitions path that doesn't exist. The types are available under the path $defs.

Steps to reproduce the behavior:

  1. Validate DTRO-v3.2.2.json JSON Schema with a validation tool.
  2. See error

The validation should pass.

Were you running the code on:

image
JHB9876 commented 1 month ago

On behalf of DfT: Thanks for flagging. Please refer to the latest release of the data specification now (version 3.2.3), which addressed the inconsistencies found in the previous version.

To validate the sample JSON files against the schema using an online validator please ensure you remove the initial lines and one set of curly brackets at the end of the sample JSON, from the sample files as shown below.

{ "schemaVersion": "3.2.3", "data": [data content]

}

At present the sample files current point to non-existent TRAs. For testing purposes please modify these to TRA that do appear in the SWA code list (in currentTraOwner, traCreator, or traAffected).

JHB9876 commented 1 month ago

On behalf of DfT:

Many thanks for raising these issues. The DfT D-TRO team have been reviewing and expect to imminently issue a data specification release (v3.2.4) which aims to address the issues raised.

JHB9876 commented 1 month ago

On behalf of DfT:

Again, many thanks for raising these issues. Many of the issues raised have been addressed in the data specification release 3.2.4. In a small number of cases, the correction requires a code base change to the D-TRO Service and we have recorded the issue and resolution and will address in a future release of the data specification.