Ormc v3 — Field v3 Migration + Permitted in Schema#21
Conversation
…s, remove Input/JSON/form tags - Update FieldInfo to include Permitted and OmitEmpty fields. - Remove Input and JSON metadata fields. - Update ormc tag parsing to handle validate:"..." and json:",omitempty". - Implement composite Validate() method generation in ormc. - Add pre-operation validation in db.go. - Update documentation (docs/SKILL.md, docs/ARQUITECTURE.md). - Update and add tests for the new validation system. Co-authored-by: cdvelop <44058491+cdvelop@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
The implementation follows the plan described in
docs/PLAN.md. It migrates the ORM togithub.com/tinywasm/fmtv0.19.0 (Field v3), introducing a new validation system.Key changes:
FieldInfoandParseStructto parsevalidatetags andomitemptyfromjsontags. Removedformtag support.ormcnow generates a structuredSchema()withPermittedandOmitEmptyfields. It also generates a compositeValidate()method for each model that callsfmt.ValidateFielder(m)and format-specific validators fromgithub.com/tinywasm/form.CreateandUpdatemethods now call the model'sValidate()method if it implementsfmt.Validator.docs/SKILL.mdanddocs/ARQUITECTURE.mdto reflect the new validation and tag system.Verified with
gotest(coverage: 90.4% ofgithub.com/tinywasm/orm).PR created automatically by Jules for task 10026323555067253950 started by @cdvelop