Fork me on GitHub
#clojure-spec
<
2020-02-17
>
ikitommi16:02:45

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

ikitommi17:02:23

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

ikitommi17:02:07

closing the schema seems to work

ikitommi17:02:26

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

Alex Miller (Clojure team)17:02:10

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

Alex Miller (Clojure team)17:02:53

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

ikitommi17:02:51

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

Alex Miller (Clojure team)17:02:17

that's something we've discussed