Skip to content
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

Schema generation renaming objects by inserting alphanumeric characters #1179

Open
EvanPulgino opened this issue Feb 20, 2024 · 3 comments
Open

Comments

@EvanPulgino
Copy link

Describe the bug
After upgrading to version 27 schema generation is now renaming some of our objects by inserting seemingly random characters into the object name

Screenshot 2024-02-20 at 12 53 14 PM
Screenshot 2024-02-20 at 12 50 27 PM

@tfranzel
Copy link
Owner

This has not changed in a long time. Have a look at your console output. You will find a warning to the effect of

enum naming encountered a non-optimally resolvable collision for fields '
named "{prop_name}". The same name has been used for multiple choice sets '
in multiple components. The collision was resolved with "{enum_name}". '
add an entry to ENUM_NAME_OVERRIDES to fix the naming.

That means you have used workflow_type with at least 2 different choice sets somewhere in your API. You need to set the ENUM_NAME_OVERRIDES for collision resolution.

@EvanPulgino
Copy link
Author

Will take a look. Thanks!

FWIW when I downgraded to 6.5 the script didn't do this.

@tfranzel
Copy link
Owner

This has not changed in a long time

Sry, I have to take that back. We fixed some bugs and issues with choice extraction in 0.27.0 now that I think of it

Fix Enum collision with same choices & varying labels #790 #1104 by @tfranzel in #1113

It might very well be the case that we now pick up more (better) info and that is giving you problems due to collisions. I strongly suspect your schema had an issue before, it just went unnoticed.

If you think this is a bug, please provide more context to get to the bottom of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants