MCPcopy
hub / github.com/danielgtaylor/huma / MarshalJSON

Method MarshalJSON

openapi.go:555–571  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

553}
554
555func (p *Param) MarshalJSON() ([]byte, error) {
556 return marshalJSON([]jsonFieldInfo{
557 {"$ref", p.Ref, omitEmpty},
558 {"name", p.Name, omitEmpty},
559 {"in", p.In, omitEmpty},
560 {"description", p.Description, omitEmpty},
561 {"required", p.Required, omitEmpty},
562 {"deprecated", p.Deprecated, omitEmpty},
563 {"allowEmptyValue", p.AllowEmptyValue, omitEmpty},
564 {"style", p.Style, omitEmpty},
565 {"explode", p.Explode, omitEmpty},
566 {"allowReserved", p.AllowReserved, omitEmpty},
567 {"schema", p.Schema, omitEmpty},
568 {"example", p.Example, omitNil},
569 {"examples", p.Examples, omitEmpty},
570 }, p.Extensions)
571}
572
573// Header object follows the structure of the Parameter Object with the
574// following changes:

Callers

nothing calls this directly

Calls 1

marshalJSONFunction · 0.85

Tested by

no test coverage detected