Ramldt2jsonschema dt2js

Hi there,

I am trying to follow suggestions in Generate RAML 1.0 JSON examples to convert Raml datatype to Json schema and have couple of questions.

  1. Is there a way to write output of dt2js directly to a file when running Via CLI?
  2. How can I pass basePath from CLI?

Thanks in advance.

Hi @revolutionizeIT,

  1. You can pipe any command in your terminal to a file. there are several ways to do it, depending on your shell. see this q&a for examples.
  2. Good question. From looking at the source, basePath seems inferred from the path of the file passed to the command. I would suggest you create a github issue to discuss potential improvements if you have a valid reason to make this overridable.