Created
December 31, 2019 12:15
-
-
Save DoktorMike/b03df0fb9bb434ea0d3d21a1d008203b to your computer and use it in GitHub Desktop.
Generate client code from openapi specification through docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker run --rm \ | |
-v ${PWD}:/local openapitools/openapi-generator-cli generate \ | |
-i /local/openapi.json \ | |
-g go \ | |
-o /local/out/go |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This requires you to be in the correct directory where a file openapi.json is located. If it's named something else you need to rename it.
You can read more here: https://openapi-generator.tech/docs/usage