hi, is there some tooling to generate spec code from XSD schema files ? I would like to validate with clojurescript (if possible) some OFX XML I generate
I tried both of the XSD parsers I found using Google search (which looks like they came from the same root). Neither of them seemed to work. clj-xml will parse an XSD, but moving on from the parsed XML to a spec seems to still be a work-in-progress.
I have a case where I generate specs, and sometimes I have fwd declarations in spec alises: (s/def ::foo ::bar)
where ::bar is not declared/speced yet, so it blows up of course. A dirty way to do that is to do (s/and ::bar)
as spec for instance but I am sure there's a better way (short of building a dep graph and specing in order)?
Forward references are actually intended to be ok in specs - the spec alias case (s/def ::foo ::bar) is one known exception to that (there is a ticket for this)
not sure if you've tried (s/spec ::bar) - that might also work
would be slightly less dirty if so
I tried s/spec, doesn't work
well, can't say I have a better alternative for you then
"unable to resolve spec ::bar "
alright, thanks for the info. If it's a bug I'll take the s/and trick as acceptable for now
I cannot find the jira for it, but I am not a good at jira'ing
or https://ask.clojure.org/index.php/3321/s-def-a-b-throws-unable-to-resolve-error-if-b-is-not-defined?show=3321#q3321 if you want to vote
Thanks!