Open smrgeoinfo opened 2 months ago
Leaving out the empty ones will definitely be an easy fix. I'll certainly do that. Some of them may be a bit trickier, but I'll get the validation hooked into our unit tests the same way we did for the output from the thing API.
These fixes were made in https://github.com/isamplesorg/isamples_inabox/pull/382 but aren't deployed yet.
response from url "https://central.isample.xyz/isamples_central/export/create?q=id:IGSN\:NHB000TLJ&export_format=jsonl" -H "Authorization: Bearer
Response doesn't validate with iSamplesSchemaCore1.0.json:
ERRORS:
/description: expected type: String, found: Null
/has_material_category/0: expected type: JSONObject, found: String
/has_context_category/0: expected type: JSONObject, found: String
/keywords/0: expected type: JSONObject, found: String
/produced_by/@id: extraneous key [@id] is not permitted
/produced_by/responsibility/0: expected type: JSONObject, found: String
/produced_by/result_time: [2015-05-02T11:21:17Z] is not a valid date. Expected [yyyy-MM-dd]
/produced_by/sampling_site/elevation: extraneous key [elevation] is not permitted
/produced_by/sampling_site/latitude: extraneous key [latitude] is not permitted
/produced_by/sampling_site/longitude: extraneous key [longitude] is not permitted
/registrant/name: expected type: String, found: JSONArray
/sampling_purpose: expected type: String, found: Null
/curation/access_constraints: expected type: JSONArray, found: String
/curation/responsibility: expected type: JSONArray, found: String
/related_resource: expected type: JSONArray, found: Null
/complies_with: expected type: JSONArray, found: Null
Valid record:
Could leave out the empty elements:
Of course since its registered by smithsonian Natural History museum, could infer "curation": { "curation_location": "Smithsonian Institution, Museum of Natural History", },