Amartus / yang2swagger

Yang to swagger generator
Eclipse Public License 1.0
32 stars 21 forks source link

Add docker support #22

Closed jdillard closed 5 years ago

jdillard commented 5 years ago

This lowers the barrier for first time users that want to test out the CLI and may help provide a clean environment that makes consistent testing and troubleshooting easier.

I'm also not a docker expert, so there may be a better implementation.

jdillard commented 5 years ago

I removed some hard coded arguments from the entry point script so that the docker run command was more universal.

bartoszm commented 5 years ago

Hi @jdillard, Thank you for the contribution. I guess in the future release we might concider to adjust it to allow for using more than single YANG module for swagger generation

jdillard commented 5 years ago

It should handle multiple YANG modules, just like the jar file.

Example command with two modules:

docker run -it -v $(pwd):/usr/src/yang yang2swagger "-api-version 2.0 -format JSON -use-namespaces true -yang-dir /usr/src/yang -output /usr/src/yang/all-modules.json module1 module2"