Skip to content

Instantly share code, notes, and snippets.

@saostad
Last active March 22, 2021 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saostad/9c74c3f47ecec84248b33669565eece3 to your computer and use it in GitHub Desktop.
Save saostad/9c74c3f47ecec84248b33669565eece3 to your computer and use it in GitHub Desktop.

generated typescript type definitions and functions to interact with ProjectSight api

Steps:

  • get ProjectSight api swagger spec and save it as file project-sight-api-spec.json
  • download latest version of swagger-codegen
  • generate type def and functions with swagger-codegen (it's a Java command line tool)
    • Oracle JRE needed to run command
  • command to generate the types java -jar swagger-codegen-cli.jar generate -l typescript-node -o ./api/ -i ./project-sight-api-spec.json --config typescript-node.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment