fix(generator): drop redundant sid-field requirement on root objects (#85) #88
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_rpc!88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-85-rootobj-sid-validation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #85.
Summary
crates/generator/src/generator.rs::validate_root_objectno longer rejects[rootobject]types that don't declare asidfield.pub sid: SmartId,pub created_at: u64,pub updated_at: u64for every root object and silently skips any schema-declared duplicates — the validator was the odd one out.test_rootobject_requires_sidis replaced bytest_rootobject_without_sid_is_accepted, which pins the new correct behavior.Why
The validator was the upstream source of the bad guidance in hero_skills#275 (
oschemaskill telling authors to declaresid: streven though the emitter ignores it). With this fix, hero_service#1 can collapse its catalog schema to the intended minimalServiceDefinitionshape — which is also the cleaner fix for hero_rpc#72.Test plan
cargo test -p hero_rpc_generator --lib— 125 passed.hero_servicebuilds against this branch withServiceDefinition = { name, description, interfaces: [Interface] }(nosid: str).sid-field requirement on root objects (#85)Closing as superseded — equivalent fix already merged via #87 (commit
4196165). Issue #85 is resolved on development.Pull request closed