Fork me on GitHub
#clojure-spec
<
2018-06-06
>
noisesmith00:06:50

is there a way to get the individual spec keywords mapped to by an s/or call?

noisesmith00:06:04

looks like describe gets me most of the way if there's nothing better

Alex Miller (Clojure team)11:06:13

s/form will be more complete than s/describe

👍 4
arohner21:06:59

Is there a way to get conformed output to be different for non-regex specs? I have a bunch of strings I need to parse, and I’d like to validate a parsed string against the spec, and returned the parsed values, if they conform

Alex Miller (Clojure team)21:06:02

you would need a custom spec impl for that currently and I wouldn’t recommend that as the guts are likely to change

dpsutton22:06:55

(s/valid? :fhir-type/PaymentReconciliation
            examples/pay-rec)
false
com.breezeehr.specs.fhir.PaymentReconciliation> 
(s/explain :fhir-type/PaymentReconciliation
            examples/pay-rec)
Success!
nil
anyone familiar with something like this?

seancorfield23:06:57

@dpsutton I have seen some occasional bugs reported against spec that seem to have that behavior -- I guess you'll need to dig into that :fhir-type/PaymentReconciliation spec and see what it's doing?

dpsutton23:06:52

It kinda sorted itself out but no idea what the transient state was. Just wondering if it was known bug or if we were way off the beaten trail

seancorfield23:06:14

Ah, a Heisenspec? 🙂

dpsutton23:06:56

I'm guessing it's more simple and just something silly we are doing. But you never know