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

Function stringTag

schema.go:386–391  ·  view source on GitHub ↗
(f reflect.StructField, tag string, def string)

Source from the content-addressed store, hash-verified

384}
385
386func stringTag(f reflect.StructField, tag string, def string) string {
387 if v := f.Tag.Get(tag); v != "" {
388 return v
389 }
390 return def
391}
392
393// ensureType panics if the given value does not match the JSON Schema type.
394func ensureType(r Registry, fieldName string, s *Schema, value string, v any) {

Callers 1

SchemaFromFieldFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…