kube-openapi

command module
v0.0.0-...-2adba4b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

README

Description

This tool generates terraform provider schemas from a go structs. It uses kube open api as an intermediate schema and mapps the output of Kub OpenAPI to terraform schema.

Usage

Here is a sample usage of this tool.

go run main.go -i ./test/input -o test/output/main --header ./test/header.txt

Kube OpenAPI

This repo is the home for Kubernetes OpenAPI discovery spec generation. The goal is to support a subset of OpenAPI features to satisfy kubernetes use-cases but implement that subset with little to no assumption about the structure of the code or routes. Thus, there should be no kubernetes specific code in this repo.

There are two main parts:

  • A model generator that goes through .go files, find and generate model definitions.
  • The spec generator that is responsible for dynamically generate the final OpenAPI spec using web service routes or combining other OpenAPI/Json specs.

Contributing

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
pkg
builder
Package builder contains code to generate OpenAPI discovery spec (which initial version of it also known as Swagger 2.0).
Package builder contains code to generate OpenAPI discovery spec (which initial version of it also known as Swagger 2.0).
common
package common holds shared code and types between open API code generator and spec generator.
package common holds shared code and types between open API code generator and spec generator.
generators/rules
Package rules contains API rules that are enforced in OpenAPI spec generation as part of the machinery.
Package rules contains API rules that are enforced in OpenAPI spec generation as part of the machinery.
idl
The IDL package describes comment directives that may be applied to API types and fields.
The IDL package describes comment directives that may be applied to API types and fields.
util/proto
Package proto is a collection of libraries for parsing and indexing the type definitions.
Package proto is a collection of libraries for parsing and indexing the type definitions.
validation/errors
Package errors provides an Error interface and several concrete types implementing this interface to manage API errors and JSON-schema validation errors.
Package errors provides an Error interface and several concrete types implementing this interface to manage API errors and JSON-schema validation errors.
validation/strfmt
Package strfmt contains custom string formats TODO: add info on how to define and register a custom format
Package strfmt contains custom string formats TODO: add info on how to define and register a custom format
test
third_party

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL