GithubHelp home page GithubHelp logo

Comments (2)

YourTechBud avatar YourTechBud commented on September 26, 2024 1

Thanks for the suggestion @ivstrand.

We did consider the openapi generator for typescript but didn't go ahead with this for the following reasons:

  • no support for near caching and invalidation
  • no support for circuit breaking
  • no support for configuring automatic retries.

The idea is to not discourage use of open api generators. Users of SpaceCloud are free to continue using them. We just have some in-built set of generates which we feel work great for some use case.

@shubham4443 what if we add support for openapi generator in spacectl? This way we can use our generators for the languages we support and leverage the communities work for the languages we don't.

from space-cloud.

ivstrand avatar ivstrand commented on September 26, 2024

I just run this in a vscode/devcontainer-docker
In docker.compose.yml

 openapi_generator:
    image: openapitools/openapi-generator-cli
    volumes:
      - ./openapi:/openapi:ro,consistent

Trigger with this shell script, more options are possible and apparently 40 langs:

I use this in a small "dockerapp.sh" file:

# codeGen for SDK:   ./dockerapp.sh --sdk
# alt first line for cli input:  docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate \
if [ "$1" = "--sdk" ]; then
	root=$pwd
    docker run --rm -v $root:/local openapitools/openapi-generator-cli generate  \
    -i /local/openapi/swagger.yml \
    -g typescript-fetch \
    -o /local/openapi/sdk/ts
fi

I find the output relatively verbose...but useful. The tool only supports swagger 2.0 json schemas, not 3.0 as the space-cloud seems to be documented with.

from space-cloud.

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.