Giter VIP home page Giter VIP logo

otomi-clients's Introduction

Otomi Clients

Part of Red Kubes' Otomi Container Platform.

Factory to build and publish openapi clients used in the redkubes/otomi-tasks repo.

Generate openapi clients for vendors

To build and publish new vendor clients, just download and inspect their openapi spec if it is suitable, then integrate it.

Steps:

  • put the api spec in src/vendors/openapi/*.json
  • add a line in bin/generate-all.sh to include your package
  • make sure the credentials used in .github/workflows/default.yaml have rights to publish that package

To create one the very first time to see if it all works:

bin/generate-client.sh $vendor $type

This will generate vendors/client/$vendor/$type, with $type being the intended environment the client will run in, i.e. node|axios (default node).

The above script uses openapi-generator tool for typescript. Read about more typescript options at: https://openapi-generator.tech/docs/generators/typescript-node

Publish as npm package

In order for others to use the generated client package, please commit the code and the github workflow will run tests and publish.

NPM: authentication and publication

To control npm access, like wiring up a private repo please follow these instructions:

Troubleshooting

Npm publish

npm ERR! Invalid version: "2.0"

Solution: Update version in api spec to make it conform to semver. E.g.: change version to 2.0.0 and then generate client once again.

otomi-clients's People

Contributors

j-zimnowoda avatar morriz avatar srodenhuis avatar

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.