@@ -674,7 +674,10 @@ class OpenApiParser {
674674 } else {
675675 rawOperationId = requestPath[_operationIdConst]? .toString ();
676676 operationIdName = rawOperationId? .toCamel;
677- final (_, nameDescription) = protectName (operationIdName);
677+ final (_, nameDescription) = protectName (
678+ operationIdName,
679+ replacementRulesForRawSchema: config.replacementRulesForRawSchema,
680+ );
678681 if (nameDescription != null ) {
679682 description = '$description \n\n $nameDescription ' ;
680683 requestName = (key + path).toCamel;
@@ -1310,6 +1313,7 @@ class OpenApiParser {
13101313 final (newName, description) = protectName (
13111314 name,
13121315 description: map[_descriptionConst]? .toString (),
1316+ replacementRulesForRawSchema: config.replacementRulesForRawSchema,
13131317 );
13141318
13151319 // Nullability of the array itself.
@@ -1381,6 +1385,7 @@ class OpenApiParser {
13811385 final (newName, description) = protectName (
13821386 name,
13831387 description: map[_descriptionConst]? .toString (),
1388+ replacementRulesForRawSchema: config.replacementRulesForRawSchema,
13841389 );
13851390
13861391 // Nullability of the map itself.
@@ -1437,6 +1442,7 @@ class OpenApiParser {
14371442 isEnum: true ,
14381443 uniqueIfNull: true ,
14391444 description: map[_descriptionConst]? .toString (),
1445+ replacementRulesForRawSchema: config.replacementRulesForRawSchema,
14401446 );
14411447
14421448 var newName = variableName;
@@ -1520,6 +1526,7 @@ class OpenApiParser {
15201526 originalName,
15211527 uniqueIfNull: true ,
15221528 description: map[_descriptionConst]? .toString (),
1529+ replacementRulesForRawSchema: config.replacementRulesForRawSchema,
15231530 );
15241531
15251532 final (parameters, imports) = _findParametersAndImports (map);
@@ -1646,10 +1653,11 @@ class OpenApiParser {
16461653 // Create a base union class for the discriminated types
16471654 final baseClassName =
16481655 '${additionalName ?? '' } ${name ?? '' } Union' .toPascal;
1649- final (newName, description ) = protectName (
1656+ final (newName, _ ) = protectName (
16501657 baseClassName,
16511658 uniqueIfNull: true ,
16521659 description: map[_descriptionConst]? .toString (),
1660+ replacementRulesForRawSchema: config.replacementRulesForRawSchema,
16531661 );
16541662
16551663 // Create a sealed class to represent the discriminated union
@@ -1805,6 +1813,8 @@ class OpenApiParser {
18051813 baseClassName,
18061814 uniqueIfNull: true ,
18071815 description: map[_descriptionConst]? .toString (),
1816+ replacementRulesForRawSchema:
1817+ config.replacementRulesForRawSchema,
18081818 );
18091819
18101820 // Create a class to represent the allOf composition
@@ -1851,6 +1861,8 @@ class OpenApiParser {
18511861 baseClassName,
18521862 uniqueIfNull: true ,
18531863 description: map[_descriptionConst]? .toString (),
1864+ replacementRulesForRawSchema:
1865+ config.replacementRulesForRawSchema,
18541866 );
18551867
18561868 final unionName = newName! .toPascal;
@@ -1915,6 +1927,7 @@ class OpenApiParser {
19151927 name,
19161928 description:
19171929 ofType.description ?? map[_descriptionConst]? .toString (),
1930+ replacementRulesForRawSchema: config.replacementRulesForRawSchema,
19181931 );
19191932 final enumType = map.containsKey (_defaultConst) && ofImport != null
19201933 ? ofType.type
@@ -1949,6 +1962,7 @@ class OpenApiParser {
19491962 final (newNameForReturn, descriptionForReturn) = protectName (
19501963 name, // Use original name for top-level naming
19511964 description: ofType? .description ?? map[_descriptionConst]? .toString (),
1965+ replacementRulesForRawSchema: config.replacementRulesForRawSchema,
19521966 );
19531967
19541968 return (
@@ -2001,6 +2015,7 @@ class OpenApiParser {
20012015 final (newName, description) = protectName (
20022016 name,
20032017 description: map[_descriptionConst]? .toString (),
2018+ replacementRulesForRawSchema: config.replacementRulesForRawSchema,
20042019 );
20052020
20062021 final enumType = defaultValue != null && import != null ? type : null ;
@@ -2219,6 +2234,7 @@ class OpenApiParser {
22192234 baseClassName,
22202235 uniqueIfNull: true ,
22212236 description: unionDescription,
2237+ replacementRulesForRawSchema: config.replacementRulesForRawSchema,
22222238 );
22232239 final unionName = newName! .toPascal;
22242240 final (foundImports, variantRefToProps) = _getImportsAndProps (
0 commit comments