From 37a4a887c3e92fe2734d571571fad9eb8c8ffc04 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sun, 16 Apr 2023 10:54:37 +0200 Subject: [PATCH] dynamite: Fix patterns --- packages/dynamite/lib/src/openapi_builder.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dynamite/lib/src/openapi_builder.dart b/packages/dynamite/lib/src/openapi_builder.dart index 362f85ba..9f3e3012 100644 --- a/packages/dynamite/lib/src/openapi_builder.dart +++ b/packages/dynamite/lib/src/openapi_builder.dart @@ -725,7 +725,7 @@ class OpenAPIBuilder implements Builder { if (parameter.schema?.pattern != null) { code.write(''' if (!RegExp(r'${parameter.schema!.pattern!}').hasMatch(${_toDartName(parameter.name)})) { - throw Exception('Invalid value "\$${_toDartName(parameter.name)}" for parameter "${_toDartName(parameter.name)}" with pattern "' r'${parameter.schema!.pattern!}"'); // coverage:ignore-line + throw Exception('Invalid value "\$${_toDartName(parameter.name)}" for parameter "${_toDartName(parameter.name)}" with pattern "\${r'${parameter.schema!.pattern!}'}"'); // coverage:ignore-line } '''); }