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

swagger plugin - action input params appear as params of the enclosing container PUT method #56

Open
StefanoNovello opened this issue Sep 11, 2023 · 0 comments

Comments

@StefanoNovello
Copy link

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

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

1 participant