Re: [jsonschema (python)] $ref on windows

26 views
Skip to first unread message

Julian Berman

unread,
Apr 2, 2018, 2:03:02 PM4/2/18
to Rob Torop, jsonschema - An implementation of JSON Schema for Python
Hey!

So, the latter (running an HTTP server) definitely should work -- what error do you get out of that? Does it just not find your file?

-J


On Mon, Apr 2, 2018, 13:33 rlyacht <rly...@gmail.com> wrote:
On OS/X, I can refer to a schema in another file like this

...
"car" : {
   
"properties" : {
       
"model" : {"type" : "string"},
       
"color" : {"$ref" : "file:Color.json"}
     
...
}        


where Color.json looks like

{
     "$comment" : "some comment",
     "enum" : ["RED", "BLUE", "GREEN"]
}


I can use jsonschema on the command line to validate an instance.

But on windows it fails if I have included the color field in my instances, succeeds otherwise.

I also tried switching to {"$ref": "http://mymachine:port/Color.json#"} and running a local http server, but that failed too.


--
You received this message because you are subscribed to the Google Groups "jsonschema - An implementation of JSON Schema for Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsonschema+...@googlegroups.com.
To post to this group, send email to jsons...@googlegroups.com.
Message has been deleted

Julian Berman

unread,
Apr 2, 2018, 3:07:07 PM4/2/18
to ro...@aya.yale.edu, jsonschema - An implementation of JSON Schema for Python
:D No worries, glad you got it working.

On Mon, Apr 2, 2018 at 2:20 PM, Rob Torop <rly...@gmail.com> wrote:
This is what my kids call "my bad" - I deleted the post, because in fact the problem is my Color.json file had a list of currencies in it. Since RED is not a currency, it failed :-)

To unsubscribe from this group and stop receiving emails from it, send an email to jsonschema+unsubscribe@googlegroups.com.

To post to this group, send email to jsons...@googlegroups.com.



--
Save our in-boxes! http://emailcharter.org

Reply all
Reply to author
Forward
0 new messages