Skip to content

Instantly share code, notes, and snippets.

@abairo
Created March 18, 2022 16:07
Show Gist options
  • Save abairo/cc946bda34d03bdb19012a3c5ce19277 to your computer and use it in GitHub Desktop.
Save abairo/cc946bda34d03bdb19012a3c5ce19277 to your computer and use it in GitHub Desktop.

openapi-generator

Generate clients, servers, and documentation from OpenAPI 2.0/3.x documents

For Python example, run the command below in a terminal:

docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i https://petstore.swagger.io/v2/swagger.yaml -g python -o /local/out/python

The generated code will be in the out folder from the current path ${PWD}. So, if you need to change the folder permissions for the current user, run:

sudo chown -R $USER out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment