diff --git a/openapi2kong/validator.go b/openapi2kong/validator.go index 2dbc750..b4d2f9e 100644 --- a/openapi2kong/validator.go +++ b/openapi2kong/validator.go @@ -65,7 +65,12 @@ func generateParameterSchema(operation *v3.Operation, insoCompat bool) []map[str } else { paramConf["name"] = parameter.Name } - paramConf["required"] = parameter.Required + + if parameter.Required != nil { + paramConf["required"] = parameter.Required + } else { + paramConf["required"] = false + } schema := extractSchema(parameter.Schema) if schema != "" {