Fix MultipleRef deserialization
@@ -251,7 +251,10 @@ func (e *Explorer) extractAdditionalPropertiesFromRefs(propertySchema interface{
}
}
if refClass.RefProperties != nil {
- innerPropertySchema := propertySchema.(map[string]interface{})[selectProp.Name]
+ propertySchemaMap, ok := propertySchema.(map[string]interface{})
+ if ok {
+ innerPropertySchema := propertySchemaMap[selectProp.Name]
+ if innerPropertySchema != nil {
innerRef, ok := innerPropertySchema.([]interface{})
if ok {
for _, props := range innerRef {
@@ -265,9 +268,13 @@ func (e *Explorer) extractAdditionalPropertiesFromRefs(propertySchema interface{
}
}
}
+ }
+}
func (e *Explorer) exctractAdditionalPropertiesFromRef(ref interface{}, refClass SelectClass) {
- for _, innerRefProp := range ref.([]interface{}) {
+ innerRefClass, ok := ref.([]interface{})
+ if ok {
+ for _, innerRefProp := range innerRefClass {
innerRef, ok := innerRefProp.(search.LocalRef)
if !ok {
continue
@@ -280,6 +287,7 @@ func (e *Explorer) exctractAdditionalPropertiesFromRef(ref interface{}, refClass
}
}
}
+}
// TODO: contains module-specific logic
func (e *Explorer) extractCertaintyFromParams(params GetParams) float64 {
