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

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -