-
Notifications
You must be signed in to change notification settings - Fork 95
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
Possible to not prefix names? #297
Comments
@omissis any thoughts on this? Happy to start work ASAP if you are OK with the idea. |
hey, I am not really sure I want to add an extra flag for cosmetic reasons if that can cause invalid code to be generated. so if we have to go down this path, I'd do it with a collision remediation strategy. would you be open to that and how would you implement it if so? |
@omissis well this is already an issue today, actually. Any set of schemas that reference the same type within themselves will cause duplicates to be generated if you run the |
I'd love to see a flag like this. At the moment I'm getting types like |
I've pushed #324 as one step of many for this feature. For a real-world use-case for us, some examples of names that change with the new flag:
If this approach looks OK, I will work on loading more than one file at a time and deduplicating across schemas next. That will be a bit more work as the data structures today are per-schema. |
In dense, nested schemas without explicit call-outs in
$defs
, this tool today will string-concatenate the type names to form extremely long prefixes for deeply-nested types. It would be awesome to opt into not doing this and risking the collision of type names. If this is acceptable, I am happy to implement such an option behind some flag.The text was updated successfully, but these errors were encountered: