diff --git a/swagger_parser/lib/src/parser/parser/open_api_parser.dart b/swagger_parser/lib/src/parser/parser/open_api_parser.dart index d56a2165..46fde0e0 100644 --- a/swagger_parser/lib/src/parser/parser/open_api_parser.dart +++ b/swagger_parser/lib/src/parser/parser/open_api_parser.dart @@ -361,8 +361,12 @@ class OpenApiParser { requiredParameters = required?.map((e) => e.toString()).toList() ?? []; } else { - properties = - schemaContent[_propertiesConst] as Map; + if (schemaContent[_propertiesConst] is Map) { + properties = + schemaContent[_propertiesConst] as Map; + } else { + properties = {}; + } requiredParameters = (schemaContent[_requiredConst] as List?) ?.map((e) => e.toString())