Closed zsoltkrenak closed 2 years ago
It seems that ODL parsing is done differently in both cases - I will try to check whether this is the reason for the difference you observe
It is likely problem is resolved in release https://github.com/bartoszm/yang2swagger/releases/tag/2.0. Please reopen in case I am wrong.
Wrong output is generated from OpenDayLight's sal-remote and sal-remote-augment yang modules when generator runs inside a docker image: The sal.remote.augment.ScopeEnumeration type and the sal.remote.augment.DatastoreEnumeration type are removed as unused because sal.remote.augment.InputAugmentation1 model is removed from swagger definitions during generation.
This does not happen when generation runs on a normal host.
Source yang file can be found here: https://github.com/opendaylight/netconf/tree/master/restconf/restconf-common-models/src/main/yang
Reproduction:
Create a simple image with openjdk8, base image doesn't matter (already tested with Ubuntu20.04, openjdk:8-jdk-alpine, SLES15). Same issue is present when using Docker as described here in the repo.
For Ubuntu:
Build image:
Launch docker image:
Run follwing command in docker image:
Output logs will be:
When the same generation runs on the same host but without Docker: