-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
I am trying to validate my json structure files with json_structure_schema_validator.py available in this repo but I am having issues with imports.
I tried simple example from docs and I can't make it work. I don't know if I am doing something wrong or there is some issue with validator
with Main
{
"$schema": "https://json-structure.org/meta/core/v0/#",
"$id": "https://example.com/main.json",
"name": "Main",
"type": "object",
"properties": {
"person": {
"type": { "$ref": "#/definitions/People/Person" }
},
"shippingAddress": {
"type": { "$ref": "#/definitions/People/Address" }
}
},
"definitions": {
"People": {
"$import": "https://example.com/people.json"
}
}
}
and People
{
"$schema": "https://json-structure.org/meta/core/v0/#",
"$id": "https://example.com/people.json",
"name": "Person",
"type": "object",
"properties": {
"firstName": { "type": "string" },
"lastName": { "type": "string" },
"address": { "$ref": "#/definitions/Address" }
},
"definitions": {
"Address": {
"type": "object",
"properties": {
"street": { "type": "string" },
"city": { "type": "string" }
}
}
}
}
Running json_structure_schema_validator.py --allowimport --importmap https://example.com/people.json\=./people.json ./main.json
Results with
Schema is invalid:
- JSON Pointer segment '/Address' not found. (Location: #/definitions/People/Person/properties/address/$ref, line/column unknown)
Metadata
Metadata
Assignees
Labels
No labels