diff --git a/packages/spec_templates/bin/generate.dart b/packages/spec_templates/bin/generate.dart index b51f6c05..672db300 100644 --- a/packages/spec_templates/bin/generate.dart +++ b/packages/spec_templates/bin/generate.dart @@ -468,12 +468,7 @@ Future>>> _parseRoutesFile( throw Exception('Unsupported routes format'); } - final allowedVariables = [ - 'requirements', - 'requirementsWithToken', - 'requirementsWithMessageId', - ]; - final variables = RegExp('^(\\\$(${allowedVariables.join('|')}) =[^;]*;)\$', multiLine: true) + final variables = RegExp(r'^(\$(requirements[a-zA-Z]*) =[^;]*;)$', multiLine: true) .allMatches(content) .map((final match) => match.group(1)!) .toList();