Carapacik / swagger_parser

Dart package that takes an OpenApi definition file and generates REST clients based on retrofit and data classes for your project.
https://pub.dev/packages/swagger_parser
MIT License
94 stars 43 forks source link

[Bug]: Created enums are not renamed according to replacementRules #69

Closed n-gras closed 1 year ago

n-gras commented 1 year ago

Hi!

First off, great tool! Has saved me many hours of work, so thank you!

I have run into a bug, when renaming Enums through swagger_parser.yaml. The classes that use the enums, are referring to the renamed file, however, the Enums themselves don't get renamed. It seems to be an oversight in parser.dart, specifically, I've added, to line472: key = replacementRule.apply(key)!; This fixes the issue for me.

Thanks and have a great day!

Carapacik commented 1 year ago

Thanks for this issue