Closed Albertojuanse closed 2 years ago
I have confirmed this issue. Will come up with a solution soon
Thank you, Bartosz, I appreciate that.
I have released a new version of the tool that should solve your issue: https://github.com/bartoszm/yang2swagger/releases/tag/1.2 Please reopen if I am mistaken.
Hi Bartosz,
I am afraid we are still seeing the same behaviour, without any change. We have tested the .jar
that you released with the same YANG example I copied above, and it does the same.
I have checked the JAVA versions, just in case, and we tested it with openjdk 11.0.16 2022-07-19
and java version "1.8.0_201"
.
Also, we could see in one commit that you added the option -reuse-groupings
, so we also tried it and the trace says "-reuse-groupings" is not a valid option
.
What has been indeed fixed is that, in operations created from RFCs, "#/definitions/" was previously missing in the references. It's a bug that we hadn't reported yet, but we've seen that you've fixed it already. However, the behaviour is the same with the missing objects ".Input".
Do you need more information?
Thank you.
Hi @bartoszm, we have found that, when processing a YANG with RPC, it creates or not some definitions depending on its name.
Version
swagger-generator-cli-1.1.14.jar on Ubuntu 20.04
Example
Using the following YANG
it creates the following Swagger, with
createobject.Input
defined butupdateobject.Input
not defined.The terminal output is the following
Then, we change the name of the RPC with no definition (
run
instead ofupdate
) in the RPC name.And, now, the defined object is
runobject.Input
but nocreateobject.Input
, the one which worked before.One can try several combinations with different behaviour. Do you know what it is going on? Thank you!