support 'anyOf', 'allOf', 'oneOf', 'not'
Opened this issue · 1 comments
ahdinosaur commented
heya! tcomb
seems really awesome, as i share a passion for domain-driven development, and this seems like a great library for bridging tcomb
with json-schema
, nice work! 😸 i'm interested in the possibility of using tcomb
with my project's domain models described in json-schema.
first up, tcomb-json-schema
doesn't support anyOf
, allOf
, oneOf
, not
logical primitives. i reckon we can implement this using fcomb?
mqklin commented
You can use this instead of oneOf: t.irreducible('x', x => ['confirmed', 'pending', 'failed', {}, ['something', {else: 123}]].some(y => _.isEqual(x, y))),