Skip to content

Literal doesn't pass through to ThingClient. #355

Description

@rwb27

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions