Add test for union with identity XML codec issue
[yangtools.git] / yang / yang-data-codec-xml / src / test / resources / yt1108 / yang / foo.yang
diff --git a/yang/yang-data-codec-xml/src/test/resources/yt1108/yang/foo.yang b/yang/yang-data-codec-xml/src/test/resources/yt1108/yang/foo.yang
new file mode 100644 (file)
index 0000000..403a81b
--- /dev/null
@@ -0,0 +1,30 @@
+module foo {
+    namespace "foo-namespace";
+    prefix "f";
+
+    identity ident-base;
+    identity ident-one {
+        base ident-base;
+    }
+
+    typedef union-type {
+        type union {
+            type uint8;
+            type identityref {
+                base ident-base;
+            }
+        }
+    }
+
+    container leaf-container {
+        leaf union-identityref-leaf {
+            type union-type;
+        }
+
+        leaf identityref-leaf {
+            type identityref {
+                base ident-base;
+            }
+        }
+    }
+}
\ No newline at end of file