What Data Package version are you using?
V2
Describe the Bug
In profiles/dictionary/schema.yaml, the required arrays for tableSchemaFieldString and tableSchemaFieldAny are inverted relative to what is described textually in the spec.
The spec states that "the absence of a type property indicates that the field is of the type any".
This means any should be the implicit default when type is omitted, and string should require an explicit type: "string" to be selected. However, the schema currently has:
tableSchemaFieldString: required: [name], meaning that type is optional and a field with no type {"name": "foo"}
matches a string field
|
tableSchemaFieldString: |
|
type: object |
|
title: String Field |
|
description: The field contains strings, that is, sequences of characters. |
|
required: |
|
- name |
|
properties: |
tableSchemaFieldAny: required: [name, type], meaning that type is mandatory, so a field with no type {"name": "foo"}
cannot match an "any" field
|
tableSchemaFieldAny: |
|
type: object |
|
title: Any Field |
|
description: Any value is accepted, including values that are not captured by |
|
the type/format/constraint requirements of the specification. |
|
required: |
|
- name |
|
- type |
|
properties: |
Proposed fix
- Add
type to required in tableSchemaFieldString (consistent with the other fields)
- Remove
type from required in tableSchemaFieldAny
What Data Package version are you using?
V2
Describe the Bug
In
profiles/dictionary/schema.yaml, therequiredarrays fortableSchemaFieldStringandtableSchemaFieldAnyare inverted relative to what is described textually in the spec.The spec states that "the absence of a
typeproperty indicates that the field is of the typeany".This means
anyshould be the implicit default whentypeis omitted, andstringshould require an explicittype: "string"to be selected. However, the schema currently has:tableSchemaFieldString:required: [name], meaning thattypeis optional and a field with no type{"name": "foo"}matches a string field
datapackage/profiles/dictionary/schema.yaml
Lines 266 to 272 in 6a201af
tableSchemaFieldAny:required: [name, type], meaning thattypeis mandatory, so a field with no type{"name": "foo"}cannot match an "any" field
datapackage/profiles/dictionary/schema.yaml
Lines 1252 to 1260 in 6a201af
Proposed fix
typetorequiredintableSchemaFieldString(consistent with the other fields)typefromrequiredintableSchemaFieldAny