Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultYAMLFormat = huma.Format{ Marshal: func(w io.Writer, v any) error { return yaml.NewEncoder(w).Encode(v) }, Unmarshal: yaml.Unmarshal, }
DefaultYAMLFormat is the default YAML formatter that can be set in the API's `Config.Formats` map. This is usually not needed as importing this package automatically adds the text format to the default formats.
config := huma.Config{} config.Formats = map[string]huma.Format{ "application/yaml": huma.DefaultYAMLFormat, "yaml": huma.DefaultYAMLFormat, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.