swaggerdocs

package
v0.0.0-...-ac9356b Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DefaultOutputFileName is the default output file name for the generated swagger docs.
	DefaultOutputFileName = "zz_generated.swagger_doc_generated.go"

	// CommentPolicyIgnore is a comment policy that ignores all missing comments.
	// No action is taken for missing comments under this policy.
	CommentPolicyIgnore = "Ignore"

	// CommentPolicyWarn is a comment policy that warns about missing comments.
	// A warning is logged for missing comments under this policy.
	CommentPolicyWarn = "Warn"

	// CommentPolicyEnforce is a comment policy that enforces missing comments.
	// An error is returned for missing comments under this policy.
	CommentPolicyEnforce = "Enforce"
)

Variables

This section is empty.

Functions

func NewGenerator

func NewGenerator(opts Options) generation.Generator

NewGenerator builds a new schemapatch generator.

Types

type Options

type Options struct {
	// Disabled indicates whether the swaggerdocs generator is enabled or not.
	// This default to false as the swaggerdocs generator is enabled by default.
	Disabled bool

	// CommentPolicy determines how, when verifying swaggerdocs, the generator
	// should handle missing comments.
	// Valid values are `Ignore`, `Warn` and `Enforce`.
	// This defaults to `Warn`.
	// When set to `Ignore`, the generator will ignore any missing comments.
	// When set to `Warn`, the generator will emit a warning for any missing comments.
	// When set to `Enforce`, the generator will return an error for any missing comments.
	CommentPolicy string

	// OutputFileName is the file name to use for writing the generated swagger
	// docs to. This file will be created for each group version.
	OutputFileName string

	// Verify determines whether the generator should verify the content instead
	// of updating the generated file.
	Verify bool
}

Options contains the configuration required for the swaggerdocs generator.

Jump to

Keyboard shortcuts

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