Skip to content

boolean default value #2165

@Postremus

Description

@Postremus

I have a query param in my resource of type boolean, primitive. If the client does not specify it, it is set to false (since default of primitive boolean).
Can this please also be reflected in openapi?

    @QueryParam("deleted")
    public boolean deleted;

Instead of:

Image

- 
        name: deleted
        in: query
        schema:
          type: boolean

I want:

Image

- in: query
        schema:
          type: boolean
          default: false

Is this something you would add as default in this project, or should I annotate all my booleans with @DefaultValue("false")?

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