Skip to content

Bug: The key of a List is included as an element of said list. #1283

Open

Description

@jlambright

Given the following object:
json { "metadata": <MetaDataModel>, "data": <List<TicketModel>> }

I'm seeing the key of the data list object be included in the list object itself. (See Screenshots Below.)

BuiltBug_KeyAsListElement
BuiltBug_KeyInList

Activity

  1. self-assigned this
    on Nov 28, 2023
  2. davidmorgan commented on Nov 28, 2023

    @davidmorgan
    Collaborator

    It's normal that that happens as part of the serialization process: there should always at some point be an Iterable that mentions the field name and then the value. It should however not get passed to the ListBuilder :)

    It works in all the cases I know about ;) so I'll need more information to make any progress here please.

    Is there any chance you can provide a small repro of the problem?

    Thanks.

  3. jlambright commented on Nov 28, 2023

    @jlambright
    Author

    I'll need to check on how much I can share.

    I should be able to get you the code generated by the OpenAPI Client Generator, as well as a sample of the JSON structure this is happening with.

    Sincerely,
    TechStop Josh 😉

  4. jlambright commented on Nov 28, 2023

    @jlambright
    Author

    Error: Expected a value of type 'Iterable<Object?>', but got one of type 'String'

    I'm trying to get a minimal example that I can share with you. Unfortunately, there is a lot I have to prune out.

    It should be noted that the error got suppressed somewhere along the line. I had to follow the logic path step-by-step, via IntelliJ Debug, in order to catch it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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