Skip to content

[BUG] [Dart] Serializers generation fails when additionalProperties = true for nested classes #22011

@feykro

Description

@feykro
Description

I'm generator dart code for a Flutter project.
Let's say I have a class A, which has a few fields as well as "additionalProperties: true" in the openapi yaml file.
Now I have class B, and one of its fields is an instance of A.

If this class B is present in an endpoint's request object, it will create a bug in the "_deserializeProperties" where we get: A value of type 'ClassB' can't be assigned to a variable of type 'ClassBBuilder?'.

openapi-generator version

MacOS, version 7.12.0
Dart version 3.9.0

Generation Details

Generation threw no errors or warning and completed as expected.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions