Skip to content

[JAVA] Bug Including Non Null fields in response #4149

Open
@hwhrag

Description

@hwhrag
Description

Expect default nullable=false to generate @JsonInclude(JsonInclude.Include.NON_NULL) excluding non-null fields from being returned. This is the default behavior in swagger-codegen.

openapi-generator version

4.1.2

OpenAPI declaration file content or url
type: integer
nullable: false
Command line used for generation

mvn clean install

Steps to reproduce

Define API response in yml using OpenAPI 3 spec. Run maven to create generated classes.

Related issues/PRs

None.

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