Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

support 'anyOf', 'allOf', 'oneOf', 'not' #4

Open
ahdinosaur opened this issue Apr 20, 2015 · 1 comment
Open

support 'anyOf', 'allOf', 'oneOf', 'not' #4

ahdinosaur opened this issue Apr 20, 2015 · 1 comment

Comments

@ahdinosaur
Copy link

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
Copy link

mqklin commented Dec 5, 2018

You can use this instead of oneOf: t.irreducible('x', x => ['confirmed', 'pending', 'failed', {}, ['something', {else: 123}]].some(y => _.isEqual(x, y))),

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants