patch(cb2-21189): corrected schema validation for complete 1 axle trailer#225
Merged
patch(cb2-21189): corrected schema validation for complete 1 axle trailer#225
Conversation
…nd added logic to avoid intersected types in generate schema
m-coslett
approved these changes
Apr 14, 2026
matthew2564
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-typescriptthat 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:
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