fix: Typo in assignAnnotation

This commit is contained in:
Ilya Kuznetsov 2024-12-17 14:17:13 +01:00
parent 1b31c098bf
commit 7fb1ed8be6
1 changed files with 3 additions and 3 deletions

View File

@ -87,7 +87,7 @@ func (d *annotationHandler) addAnnotations(typ reflect.Type, s jsonschema.Schema
rootTypeAnnotation, ok := annotations[RootTypeKey] rootTypeAnnotation, ok := annotations[RootTypeKey]
if ok { if ok {
assingAnnotation(&s, rootTypeAnnotation) assignAnnotation(&s, rootTypeAnnotation)
} }
for k, v := range s.Properties { for k, v := range s.Properties {
@ -105,7 +105,7 @@ func (d *annotationHandler) addAnnotations(typ reflect.Type, s jsonschema.Schema
} }
emptyAnnotations[k] = item emptyAnnotations[k] = item
} }
assingAnnotation(v, item) assignAnnotation(v, item)
} }
return s return s
} }
@ -141,7 +141,7 @@ func getPath(typ reflect.Type) string {
return typ.PkgPath() + "." + typ.Name() return typ.PkgPath() + "." + typ.Name()
} }
func assingAnnotation(s *jsonschema.Schema, a annotation) { func assignAnnotation(s *jsonschema.Schema, a annotation) {
if a.Description != Placeholder { if a.Description != Placeholder {
s.Description = a.Description s.Description = a.Description
} }