sfomuseum / accession-numbers

Machine-readable regular expressions for identifying accession numbers for cultural heritage organizations in text.
Other
6 stars 3 forks source link

Add formal schema for data/*.json files #20

Closed thisisaaronland closed 2 years ago

thisisaaronland commented 2 years ago
> go run -mod vendor cmd/jv/main.go -output detailed /usr/local/sfomuseum/accession-numbers/schema/definition.schema.json 
jsonschema file:///usr/local/sfomuseum/accession-numbers/schema/definition.schema.json compilation failed
[I#] [S#] doesn't validate with https://json-schema.org/draft/2020-12/schema#
  [I#] [S#/allOf/1] allOf failed
    [I#] [S#/allOf/1/$ref] doesn't validate with 'https://json-schema.org/draft/2020-12/meta/applicator#'
      [I#/properties/whosonfirst_id] [S#/properties/properties/additionalProperties/$dynamicRef] doesn't validate with 'https://json-schema.org/draft/2020-12/schema#'
        [I#/properties/whosonfirst_id] [S#/allOf/3] allOf failed
          [I#/properties/whosonfirst_id] [S#/allOf/3/$ref] doesn't validate with 'https://json-schema.org/draft/2020-12/meta/validation#'
            [I#/properties/whosonfirst_id/type] [S#/properties/type/anyOf] anyOf failed
              [I#/properties/whosonfirst_id/type] [S#/properties/type/anyOf/0/$ref] doesn't validate with '/$defs/simpleTypes'
                [I#/properties/whosonfirst_id/type] [S#/$defs/simpleTypes/enum] value must be one of "array", "boolean", "integer", "null", "number", "object", "string"
              [I#/properties/whosonfirst_id/type] [S#/properties/type/anyOf/1/type] expected array, but got string
exit status 1