Skip to content

return null field as blank string #1043

@hebrd

Description

@hebrd

I have a type

type Dict {
...
updateUser: Int
...
}
public class DictEntity {
@Schema(

        name = "updateUser",
        nullable = true
    )
    private Long updateUser;

}

When the updateUser is null, the returned json is blank string "", how can I return null instead of ""?

{
          "code": " I am code",
          "createTime": "2024-08-07T23:08:07",
          "updateUser": "",
          "orgId": 1
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions