Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference beteween standard and JSON schema (fieldsMatch) #965

Open
dtemkin-volpe opened this issue Jul 15, 2024 · 1 comment · May be fixed by #1051
Open

Difference beteween standard and JSON schema (fieldsMatch) #965

dtemkin-volpe opened this issue Jul 15, 2024 · 1 comment · May be fixed by #1051
Assignees
Labels
Milestone

Comments

@dtemkin-volpe
Copy link

In the Table Schema documentation, fieldsMatch is described as "MUST be a string with the following possible values and the exact value by default".

However, in the JSON schema for the Table Schema, fieldsMatch is typed as an array as follows:

"fieldsMatch": {
            "type": "array",
            "item": {
                "type": "string",
                "enum": [
                    "exact",
                    "equal",
                    "subset",
                    "superset",
                    "partial"
                ],
                "default": "exact"
            }
        }

It seems to me like the standard describes fieldMatch as a string, but the JSON schema describes it as an array with a singular string item? I'm not really sure which one to follow (or if this is actually an issue, maybe I'm just reading everything wrong), so let me know. Thanks!

@peterdesmet
Copy link
Member

Thanks for reporting, that seems to be an error in the JSON schema. fieldMatch needs to be a string, with an enum of possible values.

@roll I think this needs to be updated to:

 tableSchemaFieldsMatch: 
   type: string # <-- updated
   item: # <-- no need to define type here
     enum:
       - exact 
       - equal 
       - subset 
       - superset 
       - partial 
     default: exact 

That is similar to itemType:

itemType:
title: Item type.
description: Specifies the list item type.
type: string
enum:
- string
- number
- integer
- boolean
- datetime
- date
- time

This was referenced Sep 17, 2024
@roll roll added this to the v2.1 milestone Sep 25, 2024
@roll roll added the fix label Oct 21, 2024
@roll roll linked a pull request Oct 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants