generators

package
v0.0.0-...-39a7bf8 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

README

# Generate OpenAPI definitions

- To generate definition for a specific type or package add "+k8s:openapi-gen=true" tag to the type/package comment lines.
- To exclude a type or a member from a tagged package/type, add "+k8s:openapi-gen=false" tag to the comment lines.

# OpenAPI Extensions
OpenAPI spec can have extensions on types. To define one or more extensions on a type or its member
add `+k8s:openapi-gen=x-kubernetes-$NAME:`$VALUE`` to the comment lines before type/member. A type/member can
have multiple extensions. The rest of the line in the comment will be used as $VALUE so there is no need to
escape or quote the value string. Extensions can be used to pass more information to client generators or
documentation generators. For example a type might have a friendly name to be displayed in documentation or
being used in a client's fluent interface.


TODO(mehdy): Make k8s:openapi-gen a parameter to the generator now that OpenAPI has its own repo.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultNameSystem

func DefaultNameSystem() string

DefaultNameSystem returns the default name system for ordering the types to be processed by the generators in this package.

func NameSystems

func NameSystems() namer.NameSystems

NameSystems returns the name system used by the generators in this package.

func NewOpenAPIGen

func NewOpenAPIGen(sanitizedName string, targetPackage *types.Package, context *generator.Context) generator.Generator

func Packages

func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages

Types

This section is empty.

Jump to

Keyboard shortcuts

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