clojure-spec

About: http://clojure.org/about/spec Guide: http://clojure.org/guides/spec API: https://clojure.github.io/spec.alpha/clojure.spec.alpha-api.html
ikitommi 2020-02-17T16:35:45.234600Z

I’m trying to understand best practices on using spec2 schema, select and and qualified-keys in general. Is this idiomatic use of Spec2? https://gist.github.com/ikitommi/87f9b9136167c6be2e4b9f315a212046

ikitommi 2020-02-17T17:03:23.234900Z

oh, the closed spec don’t even work there. Can one close selects (or subslects)?

ikitommi 2020-02-17T17:04:07.235100Z

closing the schema seems to work

ikitommi 2020-02-17T17:04:26.235300Z

… but can’t make the one field optional just with schema.

alexmiller 2020-02-17T17:12:10.235500Z

you can only close schemas, but I think there are some impl gaps in properly validating use of a select over a closed schema

alexmiller 2020-02-17T17:12:53.235700Z

but otherwise, sure? I don't consider any of the schema/select stuff done, so hard to suggest "best" practices :)

ikitommi 2020-02-17T17:14:51.235900Z

thanks. would be great to able to say, “close all schemas/selects” in the future.

alexmiller 2020-02-17T17:15:17.236100Z

that's something we've discussed

alexmiller 2020-02-17T17:15:22.236300Z

so tbd

ikitommi 2020-02-17T17:15:34.236500Z

👍