Giter Site home page Giter Site logo

typescript definitions - howto about node-asana HOT 3 OPEN

simllll avatar simllll commented on July 17, 2024 5
typescript definitions - howto

from node-asana.

Comments (3)

apiology avatar apiology commented on July 17, 2024 2

For what it's worth, I also took a crack at improving the official definitions, at least for the issues that were impacting me. The process to improve those is well defined and documented in the DefinitelyTyped repo, if a bit slow on the approval side due to lack of types/asana maintainers: DefinitelyTyped/DefinitelyTyped#57226

from node-asana.

alexnitta avatar alexnitta commented on July 17, 2024 1

@simllll - This was super helpful, thank you.

As a note to anyone else coming across this, steps I took to solve the problem:

  1. Run npm install -d @openapitools/openapi-generator-cli
  2. Add a package.json script called generate-asana-apis containing: openapi-generator-cli generate -p apiPackage=apipkg -p modelPackage=modelPkg -p withSeparateModelsAndApi=true -p modelPropertyNaming=original -p supportsES6=true -i https://raw.githubusercontent.com/Asana/developer-docs/master/defs/asana_oas.yaml -g typescript-axios -o src/AsanaClient --skip-validate-spec
  3. Run node run generate-asana-apis

If you run into this error when trying to run node run generate-asana-apis:

Error: The operation couldn’t be completed. Unable to locate a Java Runtime.

you can install a Java Runtime with brew install java. Note the output from brew install java may include something like:

For the system Java wrappers to find this JDK, symlink it with
  sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk

Go ahead and run that sudo ln ... command, and then run node run generate-asana-apis again.

from node-asana.

apiology avatar apiology commented on July 17, 2024 1

Another round of improvements is going in soon: DefinitelyTyped/DefinitelyTyped#60589

from node-asana.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.