You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: