Skip to content

Specs with dynamically resolved set fail to transform #283

@dhryniewicz

Description

@dhryniewicz
(json-schema/transform (set (keys {:a 1 :b 2})))
=> {:enum [:b :a]}

(s/def ::available-actions (set (keys {:a 1 :b 2})))
=> :dev/available-actions

(json-schema/transform ::available-actions)
=> {}

The problems seem to be that visitor/spec-dispatch returns clojure.core/set and there's no visit-spec method for that so that a :default is used. And it never reaches the actual form resolution.

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