Skip to content

Coercion matcher sees :schema-generators.complete/missing #9

@gfredericks

Description

@gfredericks

I've isolated some strange behavior that I suspect is a bug, or else I'm misunderstanding how the coercion matchers are supposed to be used.

The following test (that I wrote to explain this) fails:

(deftest stringificator-test
  (is (not= ":schema-generators.complete/missing"
            (:foo
             (complete/complete
              {}
              {:foo s/Str}
              {s/Str str})))))

The coercion matcher function (str in this case) is being passed the keyword :schema-generators.complete/missing, which I think is the bug.

It looks like the main reason this doesn't have more pervasive effects is that the default coercion matchers in the schema library will throw exceptions in various ways when passed a keyword, and are wrapped in exception handling that suppresses those exceptions.

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