normalizer

package
v0.3.23 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CobraAnnotation

type CobraAnnotation struct {
	Use     string
	Aliases []string
	Short   string
	Example string
	Hidden  bool
}

func GetCobraTag

func GetCobraTag(name string) CobraAnnotation

type CommandContext added in v0.3.4

type CommandContext struct {
	Cobra CobraAnnotation
	Op    *spec.Operation
}

type CommandNormalizer added in v0.3.4

type CommandNormalizer struct {
	// contains filtered or unexported fields
}

func NewCommandNormalizer added in v0.3.4

func NewCommandNormalizer(doc *loads.Document) *CommandNormalizer

func (*CommandNormalizer) Normalize added in v0.3.4

func (normalizer *CommandNormalizer) Normalize(root *cobra.Command) error

Normalize Normalizes and formats the cobra command according to the annotations specified in the openapi specification

type FlagNormalizer added in v0.3.4

type FlagNormalizer struct {
	// contains filtered or unexported fields
}

func NewFlagNormalizer added in v0.3.4

func NewFlagNormalizer(doc *loads.Document) *FlagNormalizer

func (*FlagNormalizer) Normalize added in v0.3.4

func (normalizer *FlagNormalizer) Normalize(root *cobra.Command)

Normalize Normalizes the cobra flags

Jump to

Keyboard shortcuts

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