Skip to content

[BUG] OpenAPI spec: entity list responses lack proper typing for generated clients #338

@bburda

Description

@bburda

Bug report

Steps to reproduce

  1. Generate a typed client from the OpenAPI spec
  2. Use the client to fetch entity lists (areas, components, apps, functions)
  3. 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

  1. Add proper x-medkit sub-schemas to entity types in the OpenAPI spec (DataItem, OperationItem, FaultListItem, ConfigurationMetaData, BulkDataDescriptor)
  2. Include entity metadata fields that the gateway actually returns
  3. 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)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions