Skip to content

patch(cb2-21189): corrected schema validation for complete 1 axle trailer#225

Merged
cb-cs merged 5 commits intodevelopfrom
feature/CB2-21189-b
Apr 14, 2026
Merged

patch(cb2-21189): corrected schema validation for complete 1 axle trailer#225
cb-cs merged 5 commits intodevelopfrom
feature/CB2-21189-b

Conversation

@cb-cs
Copy link
Copy Markdown
Contributor

@cb-cs cb-cs commented Apr 13, 2026

Capability to create a complete technical record for a 1 axle trailer

CB2-21189

There looks to be significantly more changes in this PR than there have actually been. The version of json-schema-to-typescript that we were using previously wasn't quite generating what we were expecting when we added the allOf conditionals at the root of the schemas for the TRL GET and PUT.

That has been bumped to the latest version, and generate schema has been updated to ensure the intersected types are no long generated.

The definitions/schemas/types to focus on as part of this change are listed below:

  • v3/get/trl/complete
  • v3/put/trl/complete

Have updated the logic so that if there are 2 or more axles in the axles array, then the appropriate keys have to be populated with integer value, otherwise it can also be null.

The vast majority of other changes are a result of bump to the latest where eslint is used in top of comments rather than deprecated tslint.

Changelog

  • corrected conditionals addition and moved into allOf array
  • TRL GET and PUT
  • removed previously input incorrect IF part of the dangerous goods conditional, and moved this to it's own conditional, as part of the new allOf root array.

@cb-cs cb-cs changed the title feat(cb2-21189): corrected schema validation patch(cb2-21189): corrected schema validation Apr 13, 2026
@cb-cs cb-cs marked this pull request as ready for review April 14, 2026 09:56
@cb-cs cb-cs changed the title patch(cb2-21189): corrected schema validation patch(cb2-21189): corrected schema validation for complete 1 axle trailer Apr 14, 2026
@cb-cs cb-cs merged commit 50c5375 into develop Apr 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants