Hello
I have encountered an issue with the swagger plugin. If I define a container that contains an action, the parameters of the action appear as additional parameters of the container for the PUT method on the container resource. Here is test.yang module to test this:
`
module test {
yang-version 1.1;
prefix t;
namespace "http://test.com";
container c {
action act {
input {
leaf l1 {
type string;
}
}
}
leaf l2 {
type empty;
}
}
}
`
Then running
yanger --format=swagger --output=test.json test.yang
The generated test.json under definitions.data_test_c-post contains l1 as well as the expected l2 leaf. Other methods are OK.
BTW if you rename leaf l2 to l1 you will generate a json file where the same definition has two l1 parameters, so that swagger then cannot load the json file.
I am using yanger 1.0
Hello
I have encountered an issue with the swagger plugin. If I define a container that contains an action, the parameters of the action appear as additional parameters of the container for the PUT method on the container resource. Here is test.yang module to test this:
`
module test {
yang-version 1.1;
prefix t;
namespace "http://test.com";
container c {
action act {
input {
leaf l1 {
type string;
}
}
}
leaf l2 {
type empty;
}
}
}
`
Then running
yanger --format=swagger --output=test.json test.yang
The generated test.json under definitions.data_test_c-post contains l1 as well as the expected l2 leaf. Other methods are OK.
BTW if you rename leaf l2 to l1 you will generate a json file where the same definition has two l1 parameters, so that swagger then cannot load the json file.
I am using yanger 1.0