-
Notifications
You must be signed in to change notification settings - Fork 24
[BUG] OpenAPI spec: entity list responses lack proper typing for generated clients #338
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
Steps to reproduce
- Generate a typed client from the OpenAPI spec
- Use the client to fetch entity lists (areas, components, apps, functions)
- Try to access entity properties through the generated types
Expected behavior
Entity list responses should be properly typed so generated clients can access all fields without casts.
Actual behavior
Entity list endpoints return EntityList schema which is just {items: Entity[]} where Entity has {id, name, type, href}. The actual gateway responses include x-medkit extensions with rich metadata (ROS 2 node info, capabilities, etc.) that are invisible to the generated types.
This forces the web UI to use 15 as unknown as SovdEntity casts in store.ts to work around the type system. Every entity list response is cast through unknown, bypassing the type safety that the generated client should provide.
Suggested fix
- Add proper
x-medkitsub-schemas to entity types in the OpenAPI spec (DataItem, OperationItem, FaultListItem, ConfigurationMetaData, BulkDataDescriptor) - Include entity metadata fields that the gateway actually returns
- Regenerate clients after spec update
Related: #328 (tracks other spec gaps including lock/trigger schemas)
Environment
- ros2_medkit version: 0.4.0
- Discovered during: web UI migration to generated client (ros2_medkit_web_ui#53)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working