I am trying to setup a JSON schema repository using simple python command: python -m http.server
But, my enriched JSON is not getting validated. This is the error messge:
error: Could not find schema with key iglu:com.myown/self_describing_schema/jsonschema/1-0-0 in any repository, tried:
repositories: ["Iglu Central [HTTP]","Iglu Client Embedded [embedded]","Iglu MyOwn [HTTP]"]
If you do want to get this running locally using Python for some reason python -m http.server will start the webserver on port 8000 by default (and your resolver refers to port 80), if you want to start the webserver on port 80 you can use python -m http.server 80.
Thanks for letting me know about Snowplow Mini. Didn’t knew something like this existed.
I was making one more mistake: URL path structure. I was not using schemas/com.myown in URL path structure. My URL was like this: http://127.0.0.1:8000/self_describing_schema/jsonschema/1-0-0
I couldn’t find this mentioned clearly on Snowplow wiki. Until I found:
and figured out that schemas directory, followed by vendor name might be required path structure.
Thanks for help.
Yep - the URI for each schema is defined by the vendor/event/format/version format which should match the first part of the JSON schema definition. This directory structure makes things pretty easy to reason about and you can see the same structure in Iglu Central.