Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mandatory Field doesn't seem to be mapping to the JSON Schema "required" field #14

Open
manny-atx opened this issue Apr 14, 2022 · 1 comment

Comments

@manny-atx
Copy link

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"
						}
					}]
				}
			}
		}
	}
}
@rahul12130
Copy link

how you are running this
do you have any steps for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants