From e42ea0d9832ae9d59ed3f097dc0d720cdc2c241f Mon Sep 17 00:00:00 2001 From: jld3103 Date: Mon, 19 Dec 2022 20:34:54 +0100 Subject: [PATCH] dynamite: Fix request and response object names --- packages/dynamite/lib/src/openapi_builder.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/dynamite/lib/src/openapi_builder.dart b/packages/dynamite/lib/src/openapi_builder.dart index e0cdd428..44084ea9 100644 --- a/packages/dynamite/lib/src/openapi_builder.dart +++ b/packages/dynamite/lib/src/openapi_builder.dart @@ -649,7 +649,7 @@ class OpenAPIBuilder implements Builder { final result = resolveType( spec, state, - _toDartName(methodName, uppercaseFirstCharacter: true), + _toDartName('$methodName-request-$mimeType', uppercaseFirstCharacter: true), mediaType.schema!, ); switch (mimeType) { @@ -761,7 +761,10 @@ class OpenAPIBuilder implements Builder { final result = resolveType( spec, state, - _toDartName(methodName, uppercaseFirstCharacter: true), + _toDartName( + '$methodName-response-$statusCode-$mimeType', + uppercaseFirstCharacter: true, + ), mediaType.schema!, ); switch (mimeType) {