Skip to content

Consider introducing typed responses in Client v2 #47367

@vmuzikar

Description

@vmuzikar

Description

Currently, some of the endpoints are returning plain Response objects to support custom response codes. This is not really ideal for the Java admin client where getting e.g. the representation requires extra steps.

We should consider returning a "TypedResponse". This would be just a decorator but it would include some dedicated method for directly extracting the specific representation from the Response object based on the discriminator field. The TypedResponse needs to be generic, not just for the Client Representation.

For context, see #46973 (comment).

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions