-
Notifications
You must be signed in to change notification settings - Fork 19
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
Support sequences of objects of different types #228
Comments
I would very much welcome any ideas, concepts or leads on how to validate this in JSON and YAML, maybe whether JSON-LD or some similar extension provides a validation model especially one that is robust and well-liked. FWIW in XML DTD or RNC syntax the mixed sequence pattern here is written as One way to validate a mixed sequence is to cast all the FWIW this is much easier if we do not have to support Suggest |
Question also: how about when the XML: <tests startdate="xxxx" enddate="yyyyy">
<condition .../>
<test-reference .../>
<condition .../>
<testing-scenario-reference .../>
</tests> JSON? |
… simple and complex type generation. Adjusted AutoCloser implementation, renaming methods to be more sensible. Adjusted assembly model containers to better expose choice instances. This will help in the future when adding support for usnistgov/metaschema#228.
… simple and complex type generation. Adjusted AutoCloser implementation, renaming methods to be more sensible. Adjusted assembly model containers to better expose choice instances. This will help in the future when adding support for usnistgov/metaschema#228.
XML schema generation changes: - Added support for inclusion of allowed values in XML schema as enumerations. - Reorganized XML schema generation to provide for greater control over simple and complex type generation. - Fixed bug causing unwrapped fields to not be generated properly. JSON schema generation changes: - Added support for inclusion of allowed values in JSON schema as enumerations. - Refactored property generation to use a new property class hierarchy, which now encapsulates generation methods with their Metaschema constructs (i.e. flags, fields, assemblies). - Completed refactor of JSON Schema object schema generation for Metaschema definitions and data types. - Fixed ConcurrentModificationException caused by lazy schema initialization. Model changes: - Adjusted AutoCloser implementation, renaming methods to be more sensible. - Adjusted assembly model containers to better expose choice instances. This will help in the future when adding support for usnistgov/metaschema#228. - Improved error handling for Metapath compile errors to indicate the Metaschema the error occured in. Code reorganization and method naming cleanup. Cleaned up code, removing unused methods, imports, etc. Fixed compile, PMD, and Spotbugs warnings. Adopted latest metaschema commit Updated GHA plugins to latest Refactored and removed unneeded methods in both XML and JSON Schema generation.
XML schema generation changes: - Added support for inclusion of allowed values in XML schema as enumerations. - Reorganized XML schema generation to provide for greater control over simple and complex type generation. - Fixed bug causing unwrapped fields to not be generated properly. JSON schema generation changes: - Added support for inclusion of allowed values in JSON schema as enumerations. - Refactored property generation to use a new property class hierarchy, which now encapsulates generation methods with their Metaschema constructs (i.e. flags, fields, assemblies). - Completed refactor of JSON Schema object schema generation for Metaschema definitions and data types. - Fixed ConcurrentModificationException caused by lazy schema initialization. Model changes: - Adjusted AutoCloser implementation, renaming methods to be more sensible. - Adjusted assembly model containers to better expose choice instances. This will help in the future when adding support for usnistgov/metaschema#228. - Improved error handling for Metapath compile errors to indicate the Metaschema the error occured in. Code reorganization and method naming cleanup. Cleaned up code, removing unused methods, imports, etc. Fixed compile, PMD, and Spotbugs warnings. Adopted latest metaschema commit Updated GHA plugins to latest Refactored and removed unneeded methods in both XML and JSON Schema generation.
…228. Fixed some minor content defects. Added a draft Metaschema Metaschema in schema/metaschema/metaschema-metaschema.xml.
…ests around parsing a Metaschema Metaschema. The full metaschema won't be parsed until a solution to usnistgov/metaschema#228 is implemented. Added a new databind-metaschema/pom.xml Maven module as a placeholder for new parsing code based on generated Metaschema classes.
* Added a bunch of Javadoc comments. Added support for flag and field instances to provide a different default value than the definition. Implemented experimental support for let statements in constraints. Refactored constraint parsing in the databind module. Removed some unused code. * Fixed maven warning caused by duplicate plugin declaration in pluginManagement. Completed support for default value support on instances. * Unified external constraint processing through use of an ExternalConstraintsModulePostProcessor. Completed initial support for the MetaConstraintLoader. Still need to implement a true Metaschema-based Metaschema model to get constraint scope targeting working correctly. * Added the start of a Metaschema Metaschema implementation by adding tests around parsing a Metaschema Metaschema. The full metaschema won't be parsed until a solution to usnistgov/metaschema#228 is implemented. Added a new databind-metaschema/pom.xml Maven module as a placeholder for new parsing code based on generated Metaschema classes. * Switched some tests using classpath resources to file resources to make testing more stable. Refactored model interfaces to reduce boilerplate implementations. Added support for choice groups in the XML parsed model and code generator. Moved IAtomicValuedItem to a more sensible location. * Refactored annotations to consolidate ValueConstraints, AssemblyConstraints, and GroupAs as child annotations of the core BoundAssembly, BoundField, BoundFlag, and BoundChoiceGroup annotations. Cleaned up some compile and PMD warnings. Added some Javadocs. * Silenced some compile warnings related to m2e in eclipse. Fixed some null reference and code style warnings. Also minor reformating.
Changed metapath type to indicate a difference between a Metapath that can be compiled vs a string that is to be processed in a different way. Also removed extra unnecessary ConstraintsContainerType. Added support for flag and field instances to provide a different default value than the definition. Reorganized the schema to group constraint types and groups. Added support for let statements in constraints. Added support for choice groups as a potential solution for resolving #228. Fixed some minor content defects. Added a draft Metaschema Metaschema in schema/metaschema/metaschema-metaschema.xml. Adjusted Metaschema choice-group to allow for minimum cardinalities of 1 and a default unlimited max cardinality. Created a draft Metaschema module (metaschema-module-metaschema.xml, describing the Metaschema module model.
Changed metapath type to indicate a difference between a Metapath that can be compiled vs a string that is to be processed in a different way. Also removed extra unnecessary ConstraintsContainerType. Added support for flag and field instances to provide a different default value than the definition. Reorganized the schema to group constraint types and groups. Added support for let statements in constraints. Added support for choice groups as a potential solution for resolving #228. Fixed some minor content defects. Added a draft Metaschema Metaschema in schema/metaschema/metaschema-metaschema.xml. Adjusted Metaschema choice-group to allow for minimum cardinalities of 1 and a default unlimited max cardinality. Created a draft Metaschema module (metaschema-module-metaschema.xml, describing the Metaschema module model.
Changed metapath type to indicate a difference between a Metapath that can be compiled vs a string that is to be processed in a different way. Also removed extra unnecessary ConstraintsContainerType. Added support for flag and field instances to provide a different default value than the definition. Reorganized the schema to group constraint types and groups. Added support for let statements in constraints. Added support for choice groups as a potential solution for resolving #228. Fixed some minor content defects. Added a draft Metaschema Metaschema in schema/metaschema/metaschema-metaschema.xml. Adjusted Metaschema choice-group to allow for minimum cardinalities of 1 and a default unlimited max cardinality. Created a draft Metaschema module (metaschema-module-metaschema.xml, describing the Metaschema module model.
Changed metapath type to indicate a difference between a Metapath that can be compiled vs a string that is to be processed in a different way. Also removed extra unnecessary ConstraintsContainerType. Added support for flag and field instances to provide a different default value than the definition. Reorganized the schema to group constraint types and groups. Added support for let statements in constraints. Added support for choice groups as a potential solution for resolving #228. Fixed some minor content defects. Added a draft Metaschema Metaschema in schema/metaschema/metaschema-metaschema.xml. Adjusted Metaschema choice-group to allow for minimum cardinalities of 1 and a default unlimited max cardinality. Created a draft Metaschema module (metaschema-module-metaschema.xml, describing the Metaschema module model.
* PoC schema for metaconstraints. Changed metapath type to indicate a difference between a Metapath that can be compiled vs a string that is to be processed in a different way. Also removed extra unnecessary ConstraintsContainerType. Added support for flag and field instances to provide a different default value than the definition. Reorganized the schema to group constraint types and groups. Added support for let statements in constraints. Added support for choice groups as a potential solution for resolving #228. Fixed some minor content defects. Added a draft Metaschema Metaschema in schema/metaschema/metaschema-metaschema.xml. Adjusted Metaschema choice-group to allow for minimum cardinalities of 1 and a default unlimited max cardinality. Created a draft Metaschema module (metaschema-module-metaschema.xml, describing the Metaschema module model. * Adjusted the definitions for discriminator and json-value-key-flag to flatten them. * Added missing support for deprecated on allowed value enumerations. * Inlined a bunch of definitions that are single use. Added missing href to import. * Fixed discriminator value in wrong sequence location. * Fixed broken namespace on properties. * Fixed incorrect module short name data type. * Fixed a problem with the unique constraint's name.
…work#254) * Added a bunch of Javadoc comments. Added support for flag and field instances to provide a different default value than the definition. Implemented experimental support for let statements in constraints. Refactored constraint parsing in the databind module. Removed some unused code. * Fixed maven warning caused by duplicate plugin declaration in pluginManagement. Completed support for default value support on instances. * Unified external constraint processing through use of an ExternalConstraintsModulePostProcessor. Completed initial support for the MetaConstraintLoader. Still need to implement a true Metaschema-based Metaschema model to get constraint scope targeting working correctly. * Added the start of a Metaschema Metaschema implementation by adding tests around parsing a Metaschema Metaschema. The full metaschema won't be parsed until a solution to usnistgov/metaschema#228 is implemented. Added a new databind-metaschema/pom.xml Maven module as a placeholder for new parsing code based on generated Metaschema classes. * Switched some tests using classpath resources to file resources to make testing more stable. Refactored model interfaces to reduce boilerplate implementations. Added support for choice groups in the XML parsed model and code generator. Moved IAtomicValuedItem to a more sensible location. * Refactored annotations to consolidate ValueConstraints, AssemblyConstraints, and GroupAs as child annotations of the core BoundAssembly, BoundField, BoundFlag, and BoundChoiceGroup annotations. Cleaned up some compile and PMD warnings. Added some Javadocs. * Silenced some compile warnings related to m2e in eclipse. Fixed some null reference and code style warnings. Also minor reformating.
* Added a bunch of Javadoc comments. Added support for flag and field instances to provide a different default value than the definition. Implemented experimental support for let statements in constraints. Refactored constraint parsing in the databind module. Removed some unused code. * Fixed maven warning caused by duplicate plugin declaration in pluginManagement. Completed support for default value support on instances. * Unified external constraint processing through use of an ExternalConstraintsModulePostProcessor. Completed initial support for the MetaConstraintLoader. Still need to implement a true Metaschema-based Metaschema model to get constraint scope targeting working correctly. * Added the start of a Metaschema Metaschema implementation by adding tests around parsing a Metaschema Metaschema. The full metaschema won't be parsed until a solution to usnistgov/metaschema#228 is implemented. Added a new databind-metaschema/pom.xml Maven module as a placeholder for new parsing code based on generated Metaschema classes. * Switched some tests using classpath resources to file resources to make testing more stable. Refactored model interfaces to reduce boilerplate implementations. Added support for choice groups in the XML parsed model and code generator. Moved IAtomicValuedItem to a more sensible location. * Refactored annotations to consolidate ValueConstraints, AssemblyConstraints, and GroupAs as child annotations of the core BoundAssembly, BoundField, BoundFlag, and BoundChoiceGroup annotations. Cleaned up some compile and PMD warnings. Added some Javadocs. * Silenced some compile warnings related to m2e in eclipse. Fixed some null reference and code style warnings. Also minor reformating.
User Story:
As a Metaschema model maintainer, I need a way to allow sequenced collections of objects of different types.
This could be accomplished using a syntax similar to the following.
A JSON could look like the following.
While the XML would look like:
Goals:
Dependencies:
None.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: