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.

Validate against external profile

See original GitHub issue

Overview

I want to validate my package against an external profile that is an extension of tabular-data-package. If I read the specs (https://specs.frictionlessdata.io/profiles/#profile-property) correctly:

Custom profiles MUST have a profile property, where the value is a unique identifier for that profile. This unique identifier MUST be a string and can be in one of two forms. It can be an id from the official Data Package Schema Registry, or, a fully-qualified URL that points directly to a JSON Schema that can be used to validate the profile.

This can be done with:

"profile": "https://my-profile.json",

However, it seems only very specific values for profile are checked, and otherwise it falls back to tabular-data-package? If I validate the same data package with:

  1. `“profile”: “tabular-data-package” => valid
  2. "profile": "fiscal-data-package" => several validation errors, including:

The data package has an error: “‘fiscal-data-package’ is not one of [‘tabular-data-package’]” at “profile” in metadata and at “allOf/0/properties/profile/enum” in profile

  1. "profile": "https://specs.frictionlessdata.io/schemas/fiscal-data-package.json" => valid

Is this expected behaviour? Would it be possible to:

  1. Validate against the linked schema, if that is a valid JSON Schema?
  2. Raise an error if the value for profile is not a valid JSON Schema or a string value listed on https://specs.frictionlessdata.io/schemas/registry.json?

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

5reactions
rollcommented, Jan 18, 2021

Thanks @peterdesmet,

I’ll investigate

1reaction
rollcommented, Jun 16, 2021

@peterdesmet Yes. E.g. for the data-package profile internally it just drops the resources JSON Schema rules from the package profile and uses it for every resource individually

Read more comments on GitHub >

github_iconTop Results From Across the Web

Profile validation | STIX Project Documentation
The validator has two options for validating against profiles: you can pass it an instance document and a profile and it will tell...
Read more >
Validate FHIR resources against profiles in Azure API for FHIR
Validating a resource against a profile means checking if the resource conforms to the profile, including the specifications listed in Resource ...
Read more >
External validation: why do I need everyone to like me? - Stylist
External validation and self-esteem: a psychologist explains why we need everyone to like us, and how to loosen the grip of external validation...
Read more >
Validate External Object Connections - Salesforce Help
From Setup, enter External Data Source in the Quick Find box, then select External Data Source. · Select the external data source that...
Read more >
Input Validation - OWASP Cheat Sheet Series
Input validation should happen as early as possible in the data flow, preferably as soon as the data is received from the external...
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