diff --git a/packages/dynamite/lib/src/openapi_builder.dart b/packages/dynamite/lib/src/openapi_builder.dart index fe47e1b0..37e5b05a 100644 --- a/packages/dynamite/lib/src/openapi_builder.dart +++ b/packages/dynamite/lib/src/openapi_builder.dart @@ -604,7 +604,7 @@ class OpenAPIBuilder implements Builder { spec, state, _toDartName( - parameter.name, + '$operationId-${parameter.name}', uppercaseFirstCharacter: true, ), parameter.schema!, @@ -1078,6 +1078,9 @@ String _valueToEscapedValue(final TypeResult result, final dynamic value) { if (result is TypeResultList) { return 'const $value'; } + if (result is TypeResultEnum) { + return '${result.name}.${_toDartName(value.toString())}'; + } return value.toString(); }