这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Outdated de-serialization of topic response #80

@JonasDoe

Description

@JonasDoe

When I run a request for a topic, the response is not deserialized properly. This is b/c the received JSON looks like this:

{
   "data":{
      "_id":"655b65b487e0d9949d7b4b70",
      "_environmentId":"655353e41bf45431ece3fddd",
      "_organizationId":"655353e31bf45431ece3fdd7",
      "key":"83f89d49-1c47-4217-a10c-26386e701bf4",
      "name":"Topic for 1963bc86-945b-4a9c-9728-4b03e752397c",
      "subscribers":[]
   }
}

, but the struct GetTopicResponse doesn't expect data but the inner item:

type GetTopicResponse struct {
	Id             string   `json:"_id"`
	OrganizationId string   `json:"_organizationId"`
	EnvironmentId  string   `json:"_environmentId"`
	Key            string   `json:"key"`
	Name           string   `json:"name"`
	Subscribers    []string `json:"subscribers"`
}

I can imagine this also applies to other requests I did not stumble upon. I could create a PR for GetTopicResponse, but I'm not sure whether that's the way to go or whether you're generating your SDKs from another place. :)

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