BioCompute Objects schema validator (v1.4.2)

validate_schema_v1.4.2(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 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: 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.pipeline_steps.0.step_number        is the wrong type
#> 
#> ── 4: Validating Execution Domain ──────────────────────────────────────────────
#> [1] FALSE
#> attr(,"errors")
#>                            field           message
#> 1 data.external_data_endpoints.0 is the wrong type
#> 2 data.external_data_endpoints.1 is the wrong type
#> 3 data.external_data_endpoints.2 is the wrong type
#> 
#> ── 5: Validating Parametric Domain ─────────────────────────────────────────────
#> [1] TRUE
#> 
#> ── 6: Validating I/O Domain ────────────────────────────────────────────────────
#> [1] TRUE
#> 
#> ── 7: Validating Error Domain ──────────────────────────────────────────────────
#> [1] TRUE
#>