Skip to content

Commit

Permalink
Add second recursive Schema for Issue #23
Browse files Browse the repository at this point in the history
  • Loading branch information
fnogatz committed Nov 3, 2015
1 parent 1741cb0 commit 33a76b3
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
23 changes: 23 additions & 0 deletions test/json/schema_recursive2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"definitions": {
"recursive1": {
"required": [ "node" ],
"type": "object",
"properties": {
"node": {
"$ref": "#/definitions/recursive2"
}
}
},
"recursive2": {
"required": [ "node" ],
"type": "object",
"properties": {
"node": {
"$ref": "#/definitions/recursive1"
}
}
}
},
"$ref": "#/definitions/recursive1"
}
2 changes: 1 addition & 1 deletion test/xsd/schema_recursive.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
>
<xs:element name="node" type="recursive" />

<xs:complexType name="recursive">
<xs:complexType name="recursive">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="node" type="recursive" />
</xs:sequence>
Expand Down
17 changes: 17 additions & 0 deletions test/xsd/schema_recursive2.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" ?>
<xs:schema>
>
<xs:element name="node" type="recursive1" />

<xs:complexType name="recursive1">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="node" type="recursive2" />
</xs:sequence>
</xs:complexType>

<xs:complexType name="recursive2">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="node" type="recursive1" />
</xs:sequence>
</xs:complexType>
</xs:schema>

0 comments on commit 33a76b3

Please sign in to comment.