diff --git a/functions/openapi/component_descriptions.go b/functions/openapi/component_descriptions.go index 30725825..01b420ea 100644 --- a/functions/openapi/component_descriptions.go +++ b/functions/openapi/component_descriptions.go @@ -76,12 +76,14 @@ func (cd ComponentDescription) RunRule(_ []*yaml.Node, context model.RuleFunctio key := schemaPairs.Key() k, _ := low.FindItemInOrderedMapWithKey(key, components.Value.GoLow().Schemas.Value) - checkDescription(schemaValue.Schema.Value.Description, - key, - "schemas", - schemaValue.GenerateJSONPath(), - k.GetKeyNode(), - schemaValue) + if schemaValue.Schema != nil && schemaValue.Schema.Value != nil { + checkDescription(schemaValue.Schema.Value.Description, + key, + "schemas", + schemaValue.GenerateJSONPath(), + k.GetKeyNode(), + schemaValue) + } } }