Skip to content
Snippets Groups Projects
Commit 316b687f authored by Ladislav Lhotka's avatar Ladislav Lhotka
Browse files

Improve the schema of ex2 example.

parent c82963d6
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ module example-2 {
prefix "ex2";
container top {
container bag {
list foo {
key "number";
unique "in-words";
......@@ -24,9 +24,11 @@ module example-2 {
mandatory "true";
}
leaf baz {
when "not(../foo/in-words = 'fourty-two')";
type string;
default "hi!";
when "not(../foo/in-words = 'forty-two')";
type decimal64 {
fraction-digits "7";
}
default "0";
}
}
}
{
"example-2:top": {
"example-2:bag": {
"foo": [
{
"number": 6,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment