BioCompute Objects schema validator (v1.3.0)

validate_schema_v1.3.0(file)

validate_schema(file)

Arguments

file

Path to the BCO JSON file

Value

None

Note

JSON schema validators for BCO domains and complete BCO based on jsonvalidate. Refer to the BioCompute Objects Schema for specific JSON schemas.

Examples

bco <- tempfile(fileext = ".json") generate_example("HCV1a") %>% convert_json() %>% export_json(bco) bco %>% validate_schema()
#> ── 0: Validating BioCompute Object ─────────────────────────────────────────────────────────────────────────────── #> [1] FALSE #> attr(,"errors") #> field message #> 1 data.extension_domain.fhir_extension is the wrong type #> #> ── 1: Validating Provenance Domain ─────────────────────────────────────────────────────────────────────────────── #> [1] FALSE #> attr(,"errors") #> field message #> 1 data.review.0.date is the wrong type #> 2 data.review.1.date is the wrong type #> 3 data.obsolete_after must be date-time format #> 4 data.embargo is the wrong type #> 5 data.created must be date-time format #> 6 data.modified must be date-time format #> #> ── 2: Validating Usability Domain ──────────────────────────────────────────────────────────────────────────────── #> [1] TRUE #> #> ── 3.1: Validating Extension Domain (FHIR Extension) ───────────────────────────────────────────────────────────── #> [1] FALSE #> attr(,"errors") #> field message #> 1 data.fhir_resources.0 is the wrong type #> 2 data.fhir_resources.1 is the wrong type #> 3 data.fhir_resources.2 is the wrong type #> 4 data.fhir_resources.3 is the wrong type #> 5 data.fhir_resources.4 is the wrong type #> #> ── 3.2: Validating Extension Domain (SCM Extension) ────────────────────────────────────────────────────────────── #> [1] TRUE #> #> ── 4: Validating Description Domain ────────────────────────────────────────────────────────────────────────────── #> [1] FALSE #> attr(,"errors") #> field message #> 1 data.xref.0.ids is the wrong type #> 2 data.xref.0.access_time must be date-time format #> 3 data.xref.1.ids is the wrong type #> 4 data.xref.1.access_time must be date-time format #> 5 data.xref.2.access_time must be date-time format #> 6 data.xref.3.ids is the wrong type #> 7 data.xref.3.access_time must be date-time format #> 8 data.platform is the wrong type #> 9 data.pipeline_steps.0.step_number is the wrong type #> #> ── 5: Validating Execution Domain ──────────────────────────────────────────────────────────────────────────────── #> [1] FALSE #> attr(,"errors") #> field message #> 1 data.script is the wrong type #> 2 data.external_data_endpoints.0 is the wrong type #> 3 data.external_data_endpoints.1 is the wrong type #> 4 data.external_data_endpoints.2 is the wrong type #> #> ── 6: Validating Parametric Domain ─────────────────────────────────────────────────────────────────────────────── #> [1] TRUE #> #> ── 7: Validating I/O Domain ────────────────────────────────────────────────────────────────────────────────────── #> [1] TRUE #> #> ── 8: Validating Error Domain ──────────────────────────────────────────────────────────────────────────────────── #> [1] TRUE #>