Skip to content

Complete Json Data Validation#42

Merged
lllyfeng merged 5 commits intoyang-central:mainfrom
BVivek974:main
Mar 28, 2026
Merged

Complete Json Data Validation#42
lllyfeng merged 5 commits intoyang-central:mainfrom
BVivek974:main

Conversation

@BVivek974
Copy link
Copy Markdown
Contributor

This PR re-enables and updates the validation test logic that had previously been commented out.

With the validation code commented, Yangkit was not properly reporting type errors. For example:

  • A boolean leaf could incorrectly accept a number or a string
  • A string leaf could incorrectly accept a number
  • More generally, type mismatches were not being detected during validation

By uncommenting and updating the test logic, type validation is now correctly enforced again, and all related tests are passing as expected.

Changes

  • Uncommented the validation test section
  • Updated the logic to align with the current implementation
  • Restored proper type-checking behavior in tests

Result
All type validation tests are now passing, ensuring that incorrect data types are properly rejected according to the YANG model.

@lllyfeng lllyfeng merged commit 485c181 into yang-central:main Mar 28, 2026
0 of 3 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.

2 participants