Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generates unexpected :req-un key. #3

Open
223kazuki opened this issue Jan 28, 2019 · 0 comments
Open

Generates unexpected :req-un key. #3

223kazuki opened this issue Jan 28, 2019 · 0 comments

Comments

@223kazuki
Copy link

223kazuki commented Jan 28, 2019

Hi. Thank you for developing hodur! I tried following code.

(require '[hodur-engine.core :as engine]
         '[hodur-spec-schema.core :as hodur-spec])

(-> '[^{:spec/tag true}
        default

        Person
        [^{:type String} name
         ^{:type Integer
           :spec/tag false} age]]  ;; I don't want to use age for spec.
      engine/init-schema
      hodur-spec/schema)

Then I expect it generates person spec without :dev.person/age in :req-un keys as following.

(clojure.spec.alpha/def :dev/person
  (clojure.spec.alpha/keys
   :req-un [:dev.person/name] :opt-un []))

But it generates person spec with :dev.person/age in :req-un keys although it doesn't generates :dev.person/age spec.

(clojure.spec.alpha/def :dev/person
  (clojure.spec.alpha/keys
   :req-un [:dev.person/name :dev.person/age] :opt-un []))

Is it specification that you expect?
I'm using [hodur/engine "0.1.5"] and [hodur/spec-schema "0.1.0"].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant