Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json schema validator on input, output, action stream #39

thejmazz opened this issue Jul 21, 2016 · 1 comment

json schema validator on input, output, action stream #39

thejmazz opened this issue Jul 21, 2016 · 1 comment


Copy link

@thejmazz thejmazz commented Jul 21, 2016

Would be super simple, essentially wrap a module into (x, f) => f(x) where f(x) is true or f(x) is false. x can then be something like

  required: true,
  type: 'object',
  properties: {
    rna-fastq: {
      required: true,
      type: RegExp
      pattern: new RegExp(`^${speciesName}.${run}.fastq.gz`)

However just realized perhaps is-my-schema-valid cannot compare RegExp objects as they are not by default in JSON.stringify(). @mafintosh, how difficult to extend the plugin, perhaps similar like replacer and reviver functions to faciltate comparisons of objects?

Taking a hint from how webpack lets you choose loaders based on regexing (somewhat implicit understood) filetypes, could apply arrows of validators to specific files, or subtrees of resolved output objects.

@thejmazz thejmazz added the validators label Jul 21, 2016
@thejmazz thejmazz added this to the v0.3 milestone Jul 21, 2016
@bmpvieira bmpvieira added this to Backlog in Bionode Project Board Mar 29, 2017
@tiagofilipe12 tiagofilipe12 added this to DAG related in Watermill board Jul 21, 2017
Copy link
Member Author

@thejmazz thejmazz commented Aug 25, 2017

this is related to #75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Watermill board
DAG related
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants