Skip to content

Instantly share code, notes, and snippets.

@skeptrunedev
Last active March 28, 2024 21:02
Show Gist options
  • Save skeptrunedev/961050e9ccb28409a2fe09411afff461 to your computer and use it in GitHub Desktop.
Save skeptrunedev/961050e9ccb28409a2fe09411afff461 to your computer and use it in GitHub Desktop.
OpenAPI JS Generation Steps
  1. npm -g install js-beautify
  2. which js-beautify then take the output and copy it
  3. export JS_POST_PROCESS_FILE=<copied-value from 2>
  4. npm -g install prettier
  5. which prettier then take the output and copy it
  6. export TS_POST_PROCESS_FILE="<copied-value from 5> --write"
  7. npx @openapitools/openapi-generator-cli generate -i openapi.json -g typescript-axios -c ./openapi-generator.yaml
  8. npm adduser
  9. npm install -g typescript
  10. npm publish --access public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment