Skip to content

Date strings are not converted to Date.t() automatically #17

@23Skidoo

Description

@23Skidoo

Current behaviour:

> ~D[2021-01-01] |> Jason.encode! |> Spect.to_spec!(Date)
** (Spect.ConvertError) expected: map, found: "\"2021-01-01\""
    (spect 0.4.1) lib/spect.ex:443: Spect.to_map!/4

Would be nice if it tried to convert the date string to a Date.t() instead of failing immediately.

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