@dvsa/mes-dsp-mi-schema
v1.0.1
Published
Downstream contract schema for DSP Management Information, derived from mes-test-schema with app-only fields removed
Maintainers
Keywords
Readme
@dvsa/mes-dsp-mi-schema
Downstream contract schema for DSP Management Information, derived from @dvsa/mes-test-schema.
Purpose
mes-test-schema serves as the internal application state for the DES frontend application as well as api processing. Over time it
accumulates fields that are needed by the app but are not relevant to downstream consumers.
This package provides a stable, independently-versioned contract for DSP. It is generated
from the same source definitions as mes-test-schema but with specific fields removed to
allow it to the original schema to be freely changed without impacting downstream systems. This
means:
- The DES app can evolve
mes-test-schemafreely without breaking the DSP contract. - DSP validates records against this schema, not
mes-test-schemadirectly. - Differences between the two schemas are explicit, documented, and version-controlled here.
Omitted fields
TBC to describe how to add fields to the exclusion list and how to handle breaking changes.
Usage
Navigate to mes-dsp-mi-schema folder
cd mes-dsp-mi-schemaInstall dependencies
npm installGenerate schemas
npm run generateThis reads source definitions from ../mes-test-schema/category-definitions/, strips the
fields to be omitted, and writes the resulting JSON schemas and TypeScript interfaces to ./categories/.
Clean generated output
npm run cleanVersioning
This package is versioned independently of mes-test-schema.
Increment the version here when a field is added to or removed from the omit list.
