Skip to content

Format validation is being performed on empty strings #1134

@eric5694

Description

@eric5694

This seems to be an issue introduced in #1096. If an openapi property is defined like:

    DateOfBirth:
      description: Date of birth in yyyy-mm-dd format.
      example: "1970-01-01"
      format: date
      type: string
      allowEmptyValue: true

format validation will attempt to be performed on empty strings. This looks like it's because parsePrimitive used to return nil for empty strings, but is now returning the empty string back.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions