-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Choice parsing leads to missing data errors #308
Milestone
Comments
aj-stein-nist
added
bug
Something isn't working
java
Pull requests that update Java code
labels
Feb 7, 2024
aj-stein-nist
added a commit
to aj-stein-nist/metaschema-java
that referenced
this issue
Feb 7, 2024
Also per discussion with @david-waltermire, we ought to fix the space in the warning about skipping unhandled data in the fix for this bug, like $ metaschema-cli validate-content -m metaschema.xml example.json --show-stack-trace
Loading module 'file:///home/me/code/issue-308_metaschema.xml'
Generating Java classes in: /tmp/validation-18284471153627273139
Validating '/home/me/code/issue-308_instance.json' as JSON.
Skipping unhandled JSON field 'y'FIELD_NAME 'y' at location '3:15'.
Validation identified the following in file '/home/me/code/issue-308_instance.json'.
The file '/home/me/code/issue-308_instance.json' is valid. |
aj-stein-nist
added a commit
to aj-stein-nist/metaschema-java
that referenced
this issue
Feb 8, 2024
david-waltermire
added a commit
to david-waltermire/metaschema-java-old
that referenced
this issue
Feb 9, 2024
8 tasks
7 tasks
7 tasks
aj-stein-nist
pushed a commit
to aj-stein-nist/metaschema-java
that referenced
this issue
Feb 9, 2024
aj-stein-nist
pushed a commit
to aj-stein-nist/metaschema-java
that referenced
this issue
Feb 9, 2024
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 9, 2024
* Fixed XML choice model parsing to ensure instances are also added to the model instance list. * Improved some error messages to have correct formatting and to provide more context in messages. * Fixed a few spotbugs errors and Java compiler warnings. * Added JSON parser test to test for the #308 regression. --------- Co-authored-by: David Waltermire <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
As reporting while debugging examples for usnistgov/metaschema#530, Dave and I determined that some model elements are being dropped when analyzing and validating document instances for fields, flags, and assembly node items bound to
<choice/>
s. I will be updating this ticket with example feature branch and tests with modules and instances that exhibit this error.Who is the bug affecting?
Metaschema model developers and maintainers using the CLI or library.
What is affected by this bug?
Properly serilaizing and deserializing node items bound to fields/flags/assemblies in choices.
When does this occur?
Consistently.
How do we replicate the issue?
If applicable, add screenshots to help explain your problem.}
Expected behavior (i.e. solution)
The library and/or CLI deserializes choice-based fields, flags, and correctly.
Other Comments
N/A
The text was updated successfully, but these errors were encountered: