From bef9b4ae074a7e4866c90ad21f262132b0fed08f Mon Sep 17 00:00:00 2001 From: jld3103 Date: Thu, 3 Aug 2023 10:18:44 +0200 Subject: [PATCH] fix(dynamite): Fix query parameter arrays --- packages/dynamite/dynamite/lib/src/openapi_builder.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/dynamite/dynamite/lib/src/openapi_builder.dart b/packages/dynamite/dynamite/lib/src/openapi_builder.dart index 76e4dc65..1ac9d09e 100644 --- a/packages/dynamite/dynamite/lib/src/openapi_builder.dart +++ b/packages/dynamite/dynamite/lib/src/openapi_builder.dart @@ -466,8 +466,6 @@ class OpenAPIBuilder implements Builder { final value = result.encode( _toDartName(parameter.name), onlyChildren: result is TypeResultList && parameter.in_ == 'query', - // Objects inside the query always have to be interpreted in some way - mimeType: 'application/json', ); if (defaultValueCode != null && parameter.in_ == 'query') { code.write('if (${_toDartName(parameter.name)} != $defaultValueCode) {'); @@ -480,7 +478,7 @@ class OpenAPIBuilder implements Builder { break; case 'query': code.write( - "queryParameters['${parameter.name}${result is TypeResultList ? '[]' : ''}'] = $value;", + "queryParameters['${parameter.name}'] = $value;", ); break; case 'header':