-
-
Notifications
You must be signed in to change notification settings - Fork 615
Codegen entity files for frontend #2631
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks. This is a good first solution.
It doesn't provide ActiveModel
s, but that would require us to somehow extract ActiveValue
from sea_orm
into a separate crate that can compile on the frontend. We can figure that out later if there's demand for that.
I think the problem was serde does not natively distinguish between a missing field vs a null field. so custom serde impl is needed if we want to use |
I think we can backport this to 1.x |
We can also (de)serialize |
* codegen: frontend format * codegen: prelude for frontend models * rustfmt * Fix ActiveEnum
🎉 Released In 1.1.13 🎉Thank you everyone for the contribution! |
Run CLI generate entity command to generate entity files for frontend data:
Sample entity files: