Browse Source

dynamite: Fix objects without properties but with additionalProperties set

pull/199/head
jld3103 2 years ago
parent
commit
25f0deabaa
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 7
      packages/dynamite/lib/src/openapi_builder.dart

7
packages/dynamite/lib/src/openapi_builder.dart

@ -1543,6 +1543,13 @@ TypeResult resolveType(
break; break;
case 'object': case 'object':
if (schema.properties == null) { if (schema.properties == null) {
if (schema.additionalProperties ?? false) {
result = TypeResultMap(
'Map<String, dynamic>',
TypeResultBase('dynamic'),
);
break;
}
result = TypeResultBase('dynamic'); result = TypeResultBase('dynamic');
break; break;
} }

Loading…
Cancel
Save