diff --git a/reflect.go b/reflect.go index 73ce7e4..5716a13 100644 --- a/reflect.go +++ b/reflect.go @@ -606,7 +606,10 @@ func (r *Reflector) lookupID(t reflect.Type) ID { } func (t *Schema) structKeywordsFromTags(f reflect.StructField, parent *Schema, propertyName string) { - t.Description = f.Tag.Get("jsonschema_description") + description, exists := f.Tag.Lookup("jsonschema_description") + if exists { + t.Description = description + } tags := splitOnUnescapedCommas(f.Tag.Get("jsonschema")) tags = t.genericKeywords(tags, parent, propertyName)