Skip to content

Client API - ApiV2MessagesGet - Fails to unmarshal the response 'messages' field (Message field in Messages struct) #458

Description

@kfircohen123

release: mailhog/mailhog:v1.0.0

Problem:
The response count is positive, but messages array is empty.

Problem analysis:
The reason is that the response contains, for some reason the, "items" field instead of "messages".

Workaround
A workaround was to rename the field in the openapi file, which I used to generate the client.
The screenshots below show the messages field renamed to "items".

image image

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