Skip to content

NullableStringのisSetの値がおかしい #10

@oribe1115

Description

@oribe1115

NullableStringは本来「valueがnilのときはisSetはfalse」となっていることが期待されるがそうなっていないケースがある

発生したケース

traqApi.ChannelApi.GetChannels(auth).Execute()の返り値のParentId
対応するAPIGET /api/v3/channelsを直接叩いたときに"parentId": nullとなるすべてのチャンネルにおいて発生

&traq.Channel{
    Id:       "f08c42ad-09e7-40ca-8966-b314fd3e48d9",
    ParentId: traq.NullableString{
        value: (*string)(nil),
        isSet: true,
    },
    Archived: false,
    Force:    false,
    Name:     "gps",
    ...
}

確認済みなのはNullableStringだけだが、他のNullable*でも同様の状況になっている可能性があるかもしれない

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