aodn / public-schema

Shared schema specifications for data exchange (WFS, CSV, etc...)
GNU General Public License v3.0
1 stars 0 forks source link

Field constraints not specified correctly #77

Closed mhidas closed 7 months ago

mhidas commented 1 year ago

In the TableSchema standard, constraints such as a fields being required or unique need to be specified within a constraints property (see documentation).

In all the dataresource.yaml files specify properties like required or unique directly under each field, which is allowed, but it means they don't have the intended meaning, i.e., frictionless will not consider them when validating the data.

What needs to be done is for any field that has required: true or unique: true, these need to be moved into a constraints property. E.g. this

  - name: SAMPLEDEPTH_M
    type: string
    required: true

becomes

  - name: SAMPLEDEPTH_M
    type: string
    constraints:
      required: true

Note that specifying required: false or unique: false is not necessary as these are the case by default.