Skip to content

add 'definition' property to Metric.json#67

Merged
jbrown-xentity merged 1 commit intomainfrom
bug/Metric-definition-fix
Mar 10, 2026
Merged

add 'definition' property to Metric.json#67
jbrown-xentity merged 1 commit intomainfrom
bug/Metric-definition-fix

Conversation

@zopalmer14
Copy link

Added a definition property to Metric.json as it is listed as a recommended property in the documentation but was missing from the jsonschema definition.

I would appreciate a review of the $id field value. I decided to match the approach/values used by the other two Metric properties but am a little confused about what URI/IRI is appropriate to use for the $id when there may be multiple options. For instance, the DOI documentation lists the URI as https://www.w3.org/TR/skos-reference/#definition; however, generally speaking, the jsonschema $id values don't seem to map to those. Additionally, as the definition property belongs to the SKOS vocabulary/namespace, other files like Concept.json include it and use an $id value of http://www.w3.org/2004/02/skos/core#definition.

DOI DCAT-US 3.0 Documentation: Metric - definition

Should resolve: #66

Added a 'definition' property to 'Metric.json' as it is listed as a recommended property in the documentation, but was missing from the jsonschema defintion.
@zopalmer14
Copy link
Author

I just now realized that, since the cardinality of Metric.definition is 0..n, the property should accept either a null value or an array of strings rather than a single string as I specified in my changes. I would make an additional commit to change the PR, but I thought this could be a point of discussion as the more I dive into the codebase/jsonschema, the more I notice discrepancies between the cardinality of properties in the documentation and the jsonschema definitions.

Additionally, perhaps it is worth discussing whether it makes sense for there to be multiple definitions for a given Metric.

Copy link
Collaborator

@jbrown-xentity jbrown-xentity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this looks right to me.
I think the documentation is wrong. I don't see any value in having a metric object that has a definition field that allows for multiple definitions. The definition should be singular, and self contained.

@zopalmer14 zopalmer14 linked an issue Mar 6, 2026 that may be closed by this pull request
@jbrown-xentity jbrown-xentity merged commit 08d94c3 into main Mar 10, 2026
1 check passed
@zopalmer14 zopalmer14 deleted the bug/Metric-definition-fix branch March 13, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metric.definition property missing from Metric.json

2 participants