GithubHelp home page GithubHelp logo

jtcjtcc / gen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openai/gen

0.0 0.0 0.0 200 KB

Common generator scripts for all client libraries

License: Apache License 2.0

Shell 68.63% Python 27.51% Dockerfile 3.86%

gen's Introduction

gen

Common generator scripts for all client libraries

Badges

Client Support Level

Client Support Level

Client Support Level

Generating a client

To generate a client, first make sure the client generator exists. For any language other than go, check openapi/ folder for a script with ${CLIENT_LANGUAGE}.sh and run this command:

${CLIENT_LANGUAGE}.sh OUTPUT_DIR SETTING_FILE

SETTING_FILE is a bash script exporting required setting to generate a client. These are normally:

  • KUBERNETES_BRANCH: The kubernetes branch to get OpenAPI spec from. e.g. "master"
  • CLIENT_VERSION: Client version string. e.g. "1.0.0b1"
  • PACKAGE_NAME: Package name for the generated client. e.g. "kubernetes"

Example settings file for python-client:

export KUBERNETES_BRANCH="master" export CLIENT_VERSION="8.0.0b1" export PACKAGE_NAME="client"

Note: For generating the client for any language, the PACKAGE_NAME should be "client". You can use the latest version for the CLIENT_VERSION. It's displayed here for the python-client ( https://github.com/kubernetes-client/python ), and similarly for other language clients.

Recommended structure is to generate client in a folder called kubernetes at the root of the client repo and put all settings in a file named settings at the root of the repo. If you followed these recommendations, you can simply run autoupdate script anywhere inside the client repo:

cd ${CLIENT_ROOT}/...
${GEN_REPO_ROOT}/openapi/autoupdate.sh

Contributing

Please see CONTRIBUTING.md for instructions on how to contribute.

gen's People

Contributors

mbohlool avatar yue9944882 avatar brendandburns avatar tg123 avatar tomplus avatar brendanburns avatar roycaihw avatar krabhishek8260 avatar ackintosh avatar jonschoning avatar palnabarun avatar ukclivecox avatar abelsromero avatar yliaog avatar tamalsaha avatar scottilee avatar marie-yau avatar juliantaylor avatar ceridwen avatar aogier avatar spiffxp avatar littlebaibai avatar yuvipanda avatar silasbw avatar olitheolix avatar niklasbuechner avatar nikhita avatar mateuszlitwin avatar k8s-ci-robot avatar josedonizetti 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.