diff --git a/packages/dynamite/dynamite/lib/src/builder/generate_schemas.dart b/packages/dynamite/dynamite/lib/src/builder/generate_schemas.dart index 29294b18c14..17a6c46faea 100644 --- a/packages/dynamite/dynamite/lib/src/builder/generate_schemas.dart +++ b/packages/dynamite/dynamite/lib/src/builder/generate_schemas.dart @@ -3,7 +3,6 @@ import 'package:dynamite/src/builder/resolve_type.dart'; import 'package:dynamite/src/builder/state.dart'; import 'package:dynamite/src/helpers/dart_helpers.dart'; import 'package:dynamite/src/models/openapi.dart' as openapi; -import 'package:dynamite/src/models/type_result.dart'; Iterable generateSchemas( final openapi.OpenAPI spec, @@ -12,27 +11,13 @@ Iterable generateSchemas( if (spec.components?.schemas != null) { for (final schema in spec.components!.schemas!.entries) { final identifier = toDartName(schema.key, uppercaseFirstCharacter: true); - if (schema.value.type == null && schema.value.ref == null && schema.value.ofs == null) { - yield TypeDef( - (final b) => b - ..name = identifier - ..definition = refer('dynamic'), - ); - } else { - final result = resolveType( - spec, - state, - identifier, - schema.value, - ); - if (result is TypeResultBase) { - yield TypeDef( - (final b) => b - ..name = identifier - ..definition = refer(result.name), - ); - } - } + + resolveType( + spec, + state, + identifier, + schema.value, + ); } }