pyang-json-schema-plugin
pyang-json-schema-plugin copied to clipboard
Mandatory Field doesn't seem to be mapping to the JSON Schema "required" field
Adding leaf nodes under a list property I have doesn't seem to be mapping to the JSON Schema required fields.
Input:
container interfaces {
list interface {
key name;
leaf name {
type string;
mandatory true;
description "Interface name. Example value: GigabitEthernet 0/0/0";
}
}
}
Output:
{
"title": "ultraconfig-interfaces",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Generated by pyang from module ultraconfig-interfaces",
"type": "object",
"properties": {
"ultraconfig-interfaces:interfaces": {
"type": "object",
"properties": {
"interface": {
"type": "array",
"items": [{
"name": {
"type": "string"
}
}]
}
}
}
}
}
how you are running this do you have any steps for this