If you want to generate and compare the output of the openapi-typescript-codegen vs the official swagger-codegen. Then the easiest way to do this is to install the swagger codegen using Homebrew:

brew cask install homebrew/cask-versions/adoptopenjdk8
brew install swagger-codegen
./codegen.sh