Skip to contents

Gets the required fields for an object or schema

Usage

get_required_fields(schema_list)

Arguments

schema_list

List from jsonlite::read_json

Value

character vector of required fields

Examples

schema_list <- jsonlite::read_json(wdds_json("latest", "schemas/disease_data.json"))
get_required_fields(schema_list)
#> [1] "sampleID"               "latitude"               "longitude"             
#> [4] "sampleCollectionMethod" "hostIdentification"     "detectionTarget"       
#> [7] "detectionMethod"        "detectionOutcome"       "parasiteIdentification"