question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow path in contributors to be null

See original GitHub issue

Overview

  • contributors in the package metadata MAY have a path attribute (see specs). Indeed, when this attribute is not listed (see Cookie Monster in example), it passes validation.
  • However, if the path attribute is present with the null value (see Ernie in example), it results in an error message:
code           message
-------------  -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
package-error  The data package has an error: "None is not of type 'string'" at "contributors/1/path" in metadata and at "properties/contributors/items/properties/path/type" in profile
  • I think the null value should not result in an error. Note that expected behaviour for the very similar property organization.

To repeat error, run frictionless validate datapackage.json on datapackage.json content below.

datapackage.json

{
  "name": "period-table",
  "title": "Periodic Table",
  "profile": "tabular-data-package",
  "licenses": [{
    "id": "CC0-1.0",
    "title": "CC0 1.0",
    "url": "https://creativecommons.org/publicdomain/zero/1.0/"
  }],
  "contributors": [
    {
      "title": "Bert",
      "email": "bert@example.com",
      "path": "https://example.com",
      "role": "contributor",
      "organization": "Sesame street"
    },
    {
      "title": "Ernie",
      "email": "ernie@example.com",
      "path": null,
      "role": "contributor",
      "organization": null
    },
    {
      "title": "Cookie Monster",
      "email": "cm@example.com",
      "role": "contributor"
    }
  ],
  "resources": [{
    "path": "https://raw.githubusercontent.com/frictionlessdata/examples/master/periodic-table/data.csv",
    "name": "data",
    "profile": "tabular-data-resource",
    "format": "csv",
    "mediatype": "text/csv",
    "encoding": "UTF-8",
    "schema": {
      "fields": [{
          "name": "atomic number",
          "type": "integer",
          "format": "default"
        },
        {
          "name": "symbol",
          "type": "string",
          "format": "default"
        },
        {
          "name": "name",
          "type": "string",
          "format": "default"
        },
        {
          "name": "atomic mass",
          "type": "number",
          "format": "default"
        },
        {
          "name": "metal or nonmetal?",
          "type": "string",
          "format": "default"
        }
      ]
    }
  }]
}

Please preserve this line to notify @roll (lead of this repository)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rollcommented, Dec 21, 2020
0reactions
peterdesmetcommented, Dec 21, 2020

Excellent! Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wrapper type Path variable won't accept null value - Spring Boot
If you want it to be nullable you can achieve it with the following. First of all, if it's nullable the required property...
Read more >
d3_svg_lineLinear — Allow null values for path points #583
I'm working with data that sometime have holes in them. I think it would be useful to suppress those missing data. I made...
Read more >
ParseJSON action does not accept valid null value
I am writing this post (issue definition + solution down below) in case others run into the same issue with ParseJSON handling of...
Read more >
NULL: The Null Object - Rdrr.io
NULL represents the null object in R: it is a reserved word. NULL is often returned by expressions and functions whose value is...
Read more >
Model field reference - Django documentation
If True , the field is allowed to be blank. Default is False . Note that this is different than null . null...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found