Skip to content

[BUG] [JAVA] Default values are ignored #11459

Open

Description

@cdprete

Hi.
I'm using the latest version of the generator (5.3.1) and it seems like that default values are simply ignored when generating the model.
Given, for example, a model like

    Emails:
      type: object
      properties:
        emailAddresses:
          type: array
          default: []
          items:
            $ref: '#/components/schemas/EmailAddress'

The emailAddresses property has a value of null when the model is generated instead of an empty list.

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

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