Open jcoyne opened 6 years ago
Do you have a snippet of code to reproduce this? v
is probably nil
, but it's hard to find the root cause of this issue just from a single stack trace.
@johandorland I'm afraid I don't. I since switched to using github.com/santhosh-tekuri/jsonschema
, which seemed to be able to meet my needs.
I belive I was using this schema:
{
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "Deposit Resource",
"description": "Create Request Domain Resource (Collection, Object, Fileset, or File or any subclass of those) Request Body. For TACO API high-level validation of incoming resources.",
"type": "object",
"required": ["@context", "@type", "label", "administrative", "access", "identification", "structural"],
"not": {
"required": ["version"]
},
"properties": {
"@context": {
"description": "URI for the JSON-LD context definitions.",
"type": "string"
},
"@type": {
"description": "The content type of the domain resource.",
"type": "string",
"enum": [
"http://sdr.sul.stanford.edu/models/sdr3-collection.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-curated-collection.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-user-collection.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-exhibit.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-series.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-object.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-3d.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-agreement.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-book.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-document.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-geo.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-image.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-page.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-photograph.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-manuscript.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-map.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-media.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-track.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-webarchive-binary.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-webarchive-seed.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-file.jsonld",
"http://sdr.sul.stanford.edu/models/sdr3-fileset.jsonld"
]
},
"label": {
"description": "Primary processing label (can be same as title) for a resource.",
"type": "string"
},
"access": {
"description": "Access Metadata for the Resource.",
"type": "object",
"required": ["access", "download"],
"properties": {
"access": {
"description": "Access level for the resource.",
"type": "string",
"enum": ["world", "stanford", "location-based", "citation-only", "dark"]
},
"download": {
"description": "Download level for the resource metadata.",
"type": "string",
"enum": ["world", "stanford", "location-based", "citation-only", "dark"]
}
}
},
"administrative": {
"type": "object",
"description": "Administrative metadata for the SDR resource.",
"required": ["sdrPreserve"],
"properties": {
"sdrPreserve": {
"description": "If this resource should be sent to Preservation.",
"type": "boolean"
}
}
},
"identification": {
"type": "object",
"description": "Identifying information for the resource.",
"not": {
"required": ["identifier"]
}
},
"structural": {
"description": "Structural metadata for the Resource.",
"type": "object",
"required": ["hasAgreement"],
"properties": {
"hasAgreement": {
"description": "Agreement that covers the deposit of the resource into SDR.",
"type": "string"
}
}
}
}
}