Skip to content

refactor Catalog.json#78

Open
zopalmer14 wants to merge 3 commits intomainfrom
rec/Catalog-refactor
Open

refactor Catalog.json#78
zopalmer14 wants to merge 3 commits intomainfrom
rec/Catalog-refactor

Conversation

@zopalmer14
Copy link

Summary

In line with Neil and James's suggestions, updated the Catalog class to improve the backwards compatibility with DCAT-US 1.1, and to increase the usability of the keyword property and align with its use in the Dataset class.

Should resolve: #25, #74

Relevant Documentation: Catalog

Changes to Catalog.json:

  • keyword - changed from a string to an array of strings; matches Dataset and aligns with the cardinality in the documentation
  • description, publisher, and title - removed from 'required' array; added option for a null value

Discussion Topics

  • identifier - Repeated point from my Document PR. Should it be changed from an array of strings to a string (e.g., from 0..n to 0..1)? We changed this for Dataset but it has the otherIdentifier property and Catalog does not.

Documentation and jsonschema Desynchronization

I don't think these are particularly important to fix, and I also know we've discussed ditching the HTML documentation and generating the documentation from the jsonschema, but I thought I would list what I noticed here anyways:

  • keyword - cardinality is 0..n in documentation, but 0..1 in jsonschema; fixed as described in changes
  • rights - cardinality is 0..n in documentation, but 0..1 in jsonschema
  • rightsHolder - cardinality is 0..n in property description and jsonschema, but 0..1 in class description

In line with Neil and James's suggestions, updated the `Catalog` class
to improve backwards compatibility with DCAT-US 1.1 and increase the
versatility of the `keyword` property.

Changes:
- `keyword`: changed from a string to an array of strings; matches
`Dataset` and aligns with the cardinality in the documentation
- `description`, `publisher`, and `title`: removed from 'required'
array; added option for a null value
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.

This adds all the important things. One small quibble, but I would move this forward.

Comment on lines 458 to 470
{
"oneOf": [
{
"$ref": "#/definitions/Agent",
"description": "inline description of Agent"
},
{
"type": "string",
"description": "reference iri of Agent",
"format": "iri"
}
]
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would have flattened this, but it's technically correct and shouldn't hold up this improvement.

Copy link
Author

Choose a reason for hiding this comment

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

Good point. I added another commit to flatten it

Copy link
Author

Choose a reason for hiding this comment

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

Actually, I think title and description can be flattened as well. Will do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Catalog can specify more than one keyword [Recommendation] Catalog

2 participants