Skip to content

[Feature proposal] Support for nullable in tapir Schema #4441

@jnatten

Description

@jnatten

Hi!

I have a type which acts different when getting null instead of missing field so i would love a way to specify nullable: true in the openapi schema.

I have made a hacky workaround by modifying the schema after the fact in my application, but i would love if there was a way to do it a bit cleaner.

Is there a reason why there isn't a isNullable on the tapir Schema type that can trigger the nullable field in the same way isOptional + the global flag does?

For my use-case that would be perfect. Would a PR be accepted for that change?

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