validation - Cannot resolve reference in JSON Schema using AJV - CLI -
i'm trying build json schema (draft-06) existing json data file. schema has gotten big fit in single file , trying break multiple files. keep getting error can't resovle refrence sectiontableschema.txt id http://somesite/section
i've made following files , placed them in same directory. these files not hosted on webserver.
settingsschema.txt:
{ "title":"settings", "$schema":"http://json-schema.org/draft-06/schema#", "$id":"http://somesite/settingsschema.txt", "properties":{ "section":{ ... ... ... "$id":"/section", "items":{ "oneof":[ {"$ref":"#/sectiontableschema.txt"}, {"$ref":"#/sectionnontableschema.txt"} ] }, "type":"array" } }, "type":"object" }
sectiontableschema.txt
{ "$schema":"http://json-schema.org/draft-06/schema#", "$id":"http://somesite/sectiontableschema.txt", "definitions":{}, "properties":{ .... .... .... } "type":"object" }
i think part of issue don't understand $id
, $ref
keywords enough know going on between absolute uri, relative uri, json-pointers , like.
Comments
Post a Comment