Skip to main content
We welcome feedback, bug reports, and contributions to help improve and grow the Digital Planning Data schemas via GitHub Issues and Pull Requests.

Development Setup

The JSON Schemas are defined using TypeScript interfaces and then generated using the ts-json-schema-generator library.

Prerequisites

Assuming PNPM is available globally:
pnpm i

Making Changes

To make changes to the schemas:
  1. Update files in /types
  2. Run pnpm build to automatically generate the output JSON file under /schemas
Types should be annotated using JSDocs, which will then be read during schema generation.
For more information on annotations, see the JSON schema docs for a full list of references for various types.

Repository Structure

The repository is organized as follows:
Examples of valid payloads for each application type supported by the specifications encoded in this repository.
The main JSON Schema files. The main branch of this repo will reflect the @next version, while historic versions are documented and released on the dist branch.
TypeScript interfaces used to generate the JSON Schemas.
Test suites to ensure that the generated schema and example payloads are valid, accurate, and capable of handling different scenarios.

Adding Examples and Testing

Creating Examples

  1. Add a TypeScript file to /examples/<SCHEMA>/data with at least one exported variable representing an example payload definition
  2. Run pnpm build-json-examples to automatically generate a corresponding JSON file per example payload in the root of /examples
  3. Run pnpm test to confirm your example payload can be successfully validated against the Digital Planning Data schema

Testing

Run the test suite to validate your changes:
pnpm test

Publishing

To publish a new version:
  1. Open a pull request against main which increments the package.json version
  2. On merge, the publish.yml GitHub Action will:
    • Update the dist branch
    • Create a release
    • Publish the new version via GitHub pages at:
      http://theopensystemslab.github.io/digital-planning-data-schemas/<VERSION>/schemas/<SCHEMA>.json
      

API Implementation

For guidance on implementing the schema in an API, please refer to the API implementation guidelines.
One of the aims of this specification is to make data interopable between systems. The schema allows us to do this with the structure but the implementation of API’s will also need to have standard implementations in order for applications to use the data efficiently.

Getting Help

If you have questions or need assistance:

License

Distributed under the Mozilla Public License Version 2.0. See LICENSE.txt for more information.

Build docs developers (and LLMs) love