-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] Need option to shorten model names #361
Comments
Hi @skiryuk , it's interesting case. I think it's really specific, we need another way to avoid it. Possible we can create some kind of regex to modify model names. Need to think about it. Maybe you have some another ideas? |
@skiryuk For example, you can use separate models with nice names across the app. You just need to create repository, make an API call and parse generated model to domain model with good name. |
Regular expression mean the post processing generated files? We had a similar idea to cut static the name at the beginning of the field, but with a regular expression more interesting. We have seen here that the name is going from the namespace .NET |
@skiryuk not post processing. I can add this change to method, where we generating class name. Possible, it's easy to implement. Let me try to do this. I will let you know soon. |
Thank you, it would be very cool |
you can do the next, to use this feature right now:
swagger_dart_code_generator:
git:
url: git@github.com:epam-cross-platform-lab/swagger-dart-code-generator.git
ref: version/2.4.6
|
We tried it did not work, it does not replace the name, maybe we are doing something wrong? run as |
@skiryuk Feel free to use latest version to test this feature. In case of issues or improve ideas - let us know. |
As it turned out, the property is called |
@skiryuk already did :) |
Now we have long model names on the project after generation. Is there a way to shorten them?
Maybe in the settings specify a prefix that will be deleted?
The text was updated successfully, but these errors were encountered: