Open johnprice99 opened 9 years ago
Could you post more detail?
Sure, so I have this as my GlobalDefs.cson
file:
$defs:
$_:
url:
$raw:
type: 'string'
format: 'url'
And this is my Test.cson file:
redirect: 'url'
Then when running the tool from the command line I get this output:
$ csonschema Test.cson -t GlobalDefs.cson
[Error: Type is not defined: url]
$ csonschema Test.cson --types GlobalDefs.cson
[Error: Type is not defined: url]
Hopefully that's enough, but if not let me know (I could just be using the flag incorrectly)
Thanks
Your usage is correct.
I have looked through the code, the -t
option has not been implemented.
It's easy to implement this options, I think we just need parse cli options to underling csonschema lib.
Looks like this hasn't been worked on in a while, but could be exactly what I need to use - however I can't seem to work out how to use the global types option (if it has even been implemented?)
I have tried
csonschema File.cson --types Global.cson
but i keep getting back that my type is not defined, which leads me to believe it's not reading the Global file?