-
-
Notifications
You must be signed in to change notification settings - Fork 105
[BUG] Enum with "DateTime" Value #1399
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
Comments
Fixed in 2.1.0 |
Hey @ymc9 seems like I'm still running into the same issue on ![]() ![]() Looking at the test in the commit seems like it only tests for the name used as a field on a model vs an enum value that either
|
Oh, my apologies. You're right, the support was only added for model fields not enum fields ... Will make one more fix later today. Please also let me know if you're interested in making a PR 😄 @francistogram |
Happy to make a PR if ya don't mind pointing me on where to get started! |
Awesome! You can make a fork and create a PR based off the "dev" branch. I believe the only change needed is this line here: https://github.com/zenstackhq/zenstack/blob/fea8ec71eac83e880112d64057355e8d2979bd18/packages/language/src/zmodel.langium#L212C10-L212C19
If you run If you want to test it out locally, you can Let me know if you run into any hurdle. |
Good to know the progress @francistogram ! The npm package corresponding to the "language" pnpm package is actually "@zenstackhq/language". You should be able to find "ast.js" at "node_modules/@zenstackhq/language". |
Hey @francistogram , the change looks cool to me. I've merged it. And then I found I overlooked that reference expressions also need to respect reserved type names, otherwise enum fields cannot be properly resolved. I've pushed an extra fix. Will publish a patch release today. Thank you for the work! |
The change is live in v2.1.2 now! |
I have an enum with values from Webflow's API with all of the possible types
this worked in
prisma.schema
but withschema.zmodel
I get this errorSeems like a bug cause there's no reason I shouldn't be able to have an enum named "DateTime" and it works in Prisma directly
The text was updated successfully, but these errors were encountered: