Giter Club home page Giter Club logo

crd_swagger_transform's Introduction

crd_swagger_transform

⚠️ Do not use this tool

Kubernetes has this already built in: The kubernetes API has an endpoint GET /openapi/v2 that returns an OpenAPI spec based on the cluster configuration. Using kubectl this can be retrieved using:

kubectl proxy --port=8080 & ; sleep 5; curl localhost:8080/openapi/v2 >kubernetes-openapi.json

This tool expects the output of kubectl get crd --output=json via stdin and prints a Swagger JSON to stdout

Graphical output can be looked at (for example) on the Swagger Editor webservice

Usage

If Dart is installed on your system, you can install the tool using

 dart pub global activate --source git https://github.com/Wikiwix/crd_swagger_transform.git

and following the steps in the Dart documentation.

Then the tool can be used like

kubectl get crds --output=json | crdswag > swagger-crds.json
# or for a single CRD
kubectl get crd specificcrds.example.com --output=json | crdswag > swagger-crds.json

crd_swagger_transform's People

Contributors

wikiwix avatar

Watchers

 avatar  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.