config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TagConfig

type TagConfig struct {
	// Schema is the tag name for schema metadata (e.g., "schema").
	Schema string

	// Body is the tag name for body field identification (e.g., "body").
	Body string

	// OpenAPI is the tag name for OpenAPI-specific metadata (e.g., "openapi").
	OpenAPI string

	// Validate is the tag name for validation constraints (e.g., "validate").
	Validate string

	// Default is the tag name for default values (e.g., "default").
	Default string

	// Requires is the tag name for dependent required fields (e.g., "requires").
	Requires string
}

TagConfig configures struct tag names used for OpenAPI schema generation.

func DefaultTagConfig

func DefaultTagConfig() TagConfig

DefaultTagConfig returns the default tag configuration with standard tag names.

func MergeTagConfig

func MergeTagConfig(current, cfg TagConfig) TagConfig

MergeInto merges cfg into current, preserving current values when cfg fields are empty. Non-empty values in cfg override corresponding fields in current. This is useful for chaining multiple partial configurations.

func NewTagConfig

func NewTagConfig(schema, body, openapi, validate, default_, requires string) TagConfig

NewTagConfig creates a TagConfig with explicit values for all fields. Use this when you want to specify all tag names explicitly.

Jump to

Keyboard shortcuts

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