OpenAPI client code generation

cli
node
docker
09/23/2022
Installing and running client generator cli:
  • npm install --global @openapitools/openapi-generator-cli
  • Generate an API client:
    openapi-generator-cli generate -i {swagger.json path} -g typescript-fetch -o {output directory} -c {swagger-config.json}
Example running with docker:
docker run --user 1000:1000 -v $PWD:/app -w /app openapitools/openapi-generator-cli:latest-release /usr/local/bin/docker-entrypoint.sh generate -i swagger.json -g typescript-fetch -o sdk -c swagger-config.json