Skip to content

Commit

Permalink
Fixed NPE discovered in the platform
Browse files Browse the repository at this point in the history
Signed-off-by: quobix <dave@quobix.com>
  • Loading branch information
daveshanley committed Apr 3, 2024
1 parent 58fcbab commit eb21309
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions functions/openapi/component_descriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

Expand Down

0 comments on commit eb21309

Please sign in to comment.