Currently, models referenced via tm:ref do not inherit fields from their extended base models. While this may not cause immediate functional issues, it prevents effective reuse of common model structures and leads to unnecessary duplication of fields across Thing Models. This makes it harder to maintain consistency and utilize inheritance as intended by the WoT modeling approach.
Ditto should:
- Detect when a ThingModel referenced via tm:ref includes a tm:extends link.
- Resolve and merge the base model and all inherited fields recursively.
- Use the fully resolved structure for:
- Schema validation
- API responses
- TD generation
This behavior would match how tm:submodel and tm:extends are already handled when Ditto processes top-level features.