You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
An action argument or property typed as, for example, Literal["value1", "value2"] does generate a DataSchema typed as string, with an enum property that lists the values. However, this is currently ignored by #89, and the argument/property will just be typed as str, which is correct but less helpful.
Note that this is only relevant once #89 is merged.
To Reproduce
Create a Thing with a property typed as Literal["a", "b"], then generate a client for it (for example using ThingClient.from_url()) and check the type annotation.
Expected behaviour
The literal type should be reproduced on the client.
System:
OS: [e.g. Ubuntu 19.10]
Python version [e.g. 3.8]
Version [e.g. 0.1.0]
Additional context
Add any other context about the problem here.
fromlabthings_fastapi.thing_descriptionimporttype_to_dataschematype_to_dataschema(Literal["a", "b"]) # workstype_to_dataschema(dict[Literal["a", "b"], int])
# Error while constructing DataSchema from the following dictionary:
...
Activity
rwb27 commentedon Jun 20, 2026
Following up from #188, I've just checked that