Skip to content

Client should consistently return either dict or BaseModel #90

Description

@rwb27

At the moment, the intention is that a DirectThingClient and a ThingClient should have the same signature, but in reality the server-side "client" object returns Pydantic models (if that's the return type) while the client-side version returns simple Python objects (i.e. whatever's deserialised from JSON).

Once code generation is in (#89) we might be able to return Model objects from both. That would make everything so much neater and more type-checkable. Handling un-annotated types gracefully might be a challenge, but hopefully one we can figure out.

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

    roadmapPlans for the future

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions