-
Notifications
You must be signed in to change notification settings - Fork 5
feat(databind): add typed collection support for choice groups #589
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
Merged
david-waltermire
merged 3 commits into
metaschema-framework:develop
from
david-waltermire:feature/databind-bootstrap
Dec 27, 2025
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
57 changes: 0 additions & 57 deletions
57
databind-metaschema/src/main/metaschema-bindings/metaschema-metaschema-bindings.xml
This file was deleted.
Oops, something went wrong.
63 changes: 0 additions & 63 deletions
63
databind-metaschema/src/main/metaschema-bindings/metaschema-model-bindings.xml
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| # Metaschema Java Data Binding and Code Generation | ||
|
|
||
| This module provides the data binding framework and code generation capabilities for Metaschema. | ||
|
|
||
| ## Bootstrap Binding Classes | ||
|
|
||
| This module contains two sets of pre-generated binding classes that are checked into source control due to circular dependency constraints with the `metaschema-maven-plugin`. | ||
|
|
||
| ### Config Binding Classes | ||
|
|
||
| Package: `gov.nist.secauto.metaschema.databind.config.binding` | ||
|
|
||
| These classes are generated from the binding configuration schema (`src/main/metaschema/metaschema-bindings.yaml`) and are used to parse binding configuration files. | ||
|
|
||
| **Regeneration:** | ||
|
|
||
| ```bash | ||
| # From the project root - first ensure the project is built | ||
| mvn install -DskipTests | ||
|
|
||
| # Generate binding classes | ||
| mvn -f databind/pom-bootstrap-config.xml generate-sources | ||
|
|
||
| # Verify the build still passes | ||
| mvn install -PCI -Prelease | ||
| ``` | ||
|
|
||
| ### Model Binding Classes | ||
|
|
||
| Package: `gov.nist.secauto.metaschema.databind.model.metaschema.binding` | ||
|
|
||
| These classes are generated from the core Metaschema module (`core/metaschema/schema/metaschema/metaschema-module-metaschema.xml`) and are used for parsing Metaschema module definitions. | ||
|
|
||
| **Regeneration:** | ||
|
|
||
| ```bash | ||
| # From the project root - first ensure the project is built | ||
| mvn install -DskipTests | ||
|
|
||
| # Generate binding classes | ||
| mvn -f databind/pom-bootstrap-model.xml generate-sources | ||
|
|
||
| # Verify the build still passes | ||
| mvn install -PCI -Prelease | ||
| ``` | ||
|
|
||
| ## Binding Configurations | ||
|
|
||
| ### Config Bindings | ||
|
|
||
| **File:** `src/main/metaschema-bindings/metaschema-config-bindings.xml` | ||
|
|
||
| Customizes the generated config binding classes. | ||
|
|
||
| ### Model Bindings | ||
|
|
||
| **File:** `src/main/metaschema-bindings/metaschema-model-bindings.xml` | ||
|
|
||
| Customizes the generated model binding classes: | ||
|
|
||
| - Maps the Metaschema namespace to `gov.nist.secauto.metaschema.databind.model.metaschema.binding` | ||
| - Renames `group-as` to `GroupingAs` (avoids Java keyword conflict) | ||
| - Adds interface implementations to constraint classes (e.g., `IModelConstraintsBase`) | ||
| - Adds interface implementations to inline definitions for typed collections | ||
|
|
||
| ## Related Bootstrap POMs | ||
|
|
||
| | Bootstrap POM | Generated Package | Source Metaschema | | ||
| |--------------|-------------------|-------------------| | ||
| | `databind/pom-bootstrap-config.xml` | `...databind.config.binding` | `metaschema-bindings.yaml` | | ||
| | `databind/pom-bootstrap-model.xml` | `...databind.model.metaschema.binding` | `metaschema-module-metaschema.xml` | | ||
| | `metaschema-testing/pom-bootstrap.xml` | `...model.testing.testsuite` | `unit-tests.yaml` | | ||
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.