Skip to content

[BUG] codegen: uncompilable validators for nullable field types #4933

@hughsimpson

Description

@hughsimpson
    DummyClass:
      title: DummyClass
      type: object
      description: I model something
      properties:
        name:
          type: string
          minLength: 1
          nullable: true
          description: I am a name

generates validators that don't compile. Removing nullable: true would produce something that compiles. Validators for nullable declarations on field types handle the optionality 'inside' themselves, whereas validators for the 'non-requiredness' of a field handle the optionality before passing through. Need to dedup that here.

Noting here so I don't forget

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