Question: the form what took in schema?

Asked By
Asked At
2017-12-01 14:19:36

Found 15 possible answers.

User Answered At Possible Answer
mpenet 2017-12-01 14:19:43 coercers
gfredericks 2017-12-01 14:20:56 oh right -- I don't like them because they represent surjections everywhere, even for uses when bijections can work and it makes it easy to test your function-that-coerces-its-inputs with the canonical form of the data, since that's easier, and never actually test the production form that has to be coerced
danieleneal 2017-12-01 14:22:26 bijections from specs would be awesome :heavy_plus_sign:
gfredericks 2017-12-01 14:23:16 I am envisioning that you can define different styles for other representations, like json and jdbc, and then get bidirectional functions for converting your canonical spec form from one to the other so if you say your json representation has camelCased keys while your internal representation is kebab-cased, then a json input with kebab-cased keys would be considered incorrect and cause an exception rather than just silently be accepted that category of things, but hopefully arbitrarily flexible e.g., "I want camel-cased keys, I want date-times serialized like this" etc.
mpenet 2017-12-01 14:27:37 There was a hint of a next iteration of spec coming out at some point (I think in Rich's talk), I am wondering if there are changes related to these kind of things (and others often mentioned). related to CLJ-2112 I personally am curious to see how spec conforming (or whatever replaces it) will take form
gfredericks 2017-12-01 14:33:51 oh yeah, I forgot about that
mpenet 2017-12-01 14:59:56 and specs metadata too, could help for a lot of things
gfredericks 2017-12-01 15:17:57 you mean enabling specs to have metadata attached? I assume they already can so you must mean something else
mpenet 2017-12-01 15:19:16 you can't attach metadata to specs atm
ikitommi 2017-12-01 17:35:38 @alexmiller related to the s/merge problem, there is a PR request in spec-tools of a merge that seems to fix the problem. Could that be pushed to Spec itself? Comments welcome:
alexmiller 2017-12-01 17:36:10 fixes what problem?
ikitommi 2017-12-01 17:37:49 My comment on 15:53, that can’t be right? e.g. merge merges that values, so the unconformed value override the conformed ones.
alexmiller 2017-12-01 17:41:35 it doesn’t override, it’s just that only the last spec in the merge controls the conformed result I think there is a ticket for this already in jira, but not sure what should be done with it that is the intent, not a bug, but it can have some non-obvious effects, particularly with unqualified keys
ikitommi 2017-12-01 17:44:17 oh, so that works with qualified keys. That’s interesting. Woudn’t @arttuka ’s PR fix that? Could the issue be re-opened?
alexmiller 2017-12-01 17:51:43 I wouldn’t re-open that, but if there is a good statement of a problem and a patch, we can take a look at it that is, in a new ticket Rich has a pretty extensive re-work coming for spec (post 1.9 release) and I suspect we won’t really look at any fixes till we’re on the other side of that I have no idea what that PR is doing at a glance

Related Questions