You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using this library's (from recent versions built from develop) functionality to generate a JSON schema for generating a JSON schema for writing original Metaschema modules, there are missing options that are schema-valid for object-type. At the top-level of a model, it only allows assembly and field to reference predefined assemblies and fields that do not exist. You cannot use define-assembly or define-field as expected.
Who is the bug affecting
Developers and engineers using the Metaschema specification, this library, and the associated CLI tooling to model with YAML as a first-class data format for the Metaschema module definition.
How do we replicate this issue
Use the following command to run the JSON schema generation.
Use the resulting JSON Schema with the sample example_model.json and validate it with metaschema-module-metaschema.json.
Observe you are unable to validate with the syntactically valid object-type: define-assembly.
% oscal-cli --version
oscal-cli 2.5.0-SNAPSHOT built at 2025-02-27 19:16 from branch develop (ba14f61) at Unknown
liboscal-java 5.2.0-SNAPSHOT built at 2025-02-27 19:06 from branch develop (0d8fbdb) at Unknown
oscal v1.1.3 built at 2025-02-27 19:06 from branch b39789e5ab6df36dbe14f481e40113b91fd25f3f (b39789e) at https://github.com/usnistgov/OSCAL.git
metaschema-java 2.2.0-SNAPSHOT built at 2025-02-27T17:56:27+0000 from branch 284-date-time-extraction-functions (e837c3c) at Unknown
metaschema 2.2.0-SNAPSHOT built at 2025-02-27T17:56:27+0000 from branch 7e49638c1ad19fadc0e556cfca90478f3aae9489 (7e49638) at https://github.com/metaschema-framework/metaschema.git
% git branch --show-current
develop
% git rev-parse HEAD
7e49638c1ad19fadc0e556cfca90478f3aae9489
% cd /home/metaschema
% oscal-cli metaschema generate-schema --as=json schema/metaschema/metaschema-module-metaschema.xml metaschema-module-metaschema.json
# yaml-language-server: $schema=metaschema-module-metaschema.jsonMETASCHEMA:
schema-name: Exampleschema-version: 0.1.0-alphashort-name: examplenamespace: http://example.org/ns/examplejson-base-uri: http://example.org/ns/exampledefinitions:
- object-type: define-assembly # this will cause a validation error, replace with assembly to resolve, which should not be necessaryname: rootformal-name: Example Rootflags:
- name: flagas-type: stringrequired: yes
Expected behavior (i.e. solution)
A top-level of object-type: define-assembly is valid with the generated JSON schema and valid to other metaschema-java capabilities.
Other comments
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
When using this library's (from recent versions built from
develop
) functionality to generate a JSON schema for generating a JSON schema for writing original Metaschema modules, there are missing options that are schema-valid forobject-type
. At the top-level of a model, it only allowsassembly
andfield
to reference predefined assemblies and fields that do not exist. You cannot usedefine-assembly
ordefine-field
as expected.Who is the bug affecting
Developers and engineers using the Metaschema specification, this library, and the associated CLI tooling to model with YAML as a first-class data format for the Metaschema module definition.
How do we replicate this issue
example_model.json
and validate it withmetaschema-module-metaschema.json
.object-type: define-assembly
.% oscal-cli --version oscal-cli 2.5.0-SNAPSHOT built at 2025-02-27 19:16 from branch develop (ba14f61) at Unknown liboscal-java 5.2.0-SNAPSHOT built at 2025-02-27 19:06 from branch develop (0d8fbdb) at Unknown oscal v1.1.3 built at 2025-02-27 19:06 from branch b39789e5ab6df36dbe14f481e40113b91fd25f3f (b39789e) at https://github.com/usnistgov/OSCAL.git metaschema-java 2.2.0-SNAPSHOT built at 2025-02-27T17:56:27+0000 from branch 284-date-time-extraction-functions (e837c3c) at Unknown metaschema 2.2.0-SNAPSHOT built at 2025-02-27T17:56:27+0000 from branch 7e49638c1ad19fadc0e556cfca90478f3aae9489 (7e49638) at https://github.com/metaschema-framework/metaschema.git % git branch --show-current develop % git rev-parse HEAD 7e49638c1ad19fadc0e556cfca90478f3aae9489 % cd /home/metaschema % oscal-cli metaschema generate-schema --as=json schema/metaschema/metaschema-module-metaschema.xml metaschema-module-metaschema.json
Expected behavior (i.e. solution)
A top-level of
object-type: define-assembly
is valid with the generated JSON schema and valid to other metaschema-java capabilities.Other comments
No response
The text was updated successfully, but these errors were encountered: