Open
Description
I've tried to validate the example in RFC 8791 using yanglint but without a success, is yang structures fully supported for data and schema or schema only?
This the examples I tried:
module example-module {
yang-version 1.1;
namespace "urn:example:example-module";
prefix exm;
import ietf-yang-structure-ext {
prefix sx;
}
sx:structure address-book {
list address {
key "last first";
leaf last {
type string;
}
leaf first {
type string;
}
leaf street {
type string;
}
leaf city {
type string;
}
leaf state {
type string;
}
}
}
}
and input data:
{
"example-module:address-book": {
"example-module:address": [
{
"city": "Bedrock",
"example-module-aug:zipcode": "70777",
"first": "Fred",
"last": "Flintstone",
"street": "301 Cobblestone Way"
},
{
"city": "Bedrock",
"example-module-aug:zipcode": "70777",
"first": "Charlie",
"last": "Root",
"street": "4711 Cobblestone Way"
}
]
}
}
witht the command:
yanglint example-module.yang example.json -f json
libyang err : Node "address-book" not found in the "example-module" module. (line 2)
YANGLINT[E]: Failed to parse input data file "example.json".