Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should item_assets be required in core? #1311

Closed
aznan2 opened this issue Aug 13, 2024 · 1 comment · Fixed by #1314
Closed

Should item_assets be required in core? #1311

aznan2 opened this issue Aug 13, 2024 · 1 comment · Fixed by #1314
Milestone

Comments

@aznan2
Copy link

aznan2 commented Aug 13, 2024

Having the field item_assets be required i collections makes sense when Item Assets is its own extension, but if it is required in core I can see some possible issues. The field works well when the collection is of a set of homogeneous data, but questions arise of what happens when the data is gathered from disparate sources - perhaps from different users posting in items to a server that implements the Transaction extension. For example, what happens if users add two items with the following assets:

"assets": {
  "image": {
    "title": "Image",
    "description": "The image",
    "href": "...",
    "type": "image/tiff",
    "roles": ["data"]
  },
  "thumb": {
    "title": "Thumbnail",
    "description": "A thumbnail image",
    "href": "...",
    "type": "image/tiff",
    "roles": ["thumbnail"]
  }
}

"assets": {
  "image": {
    "title": "The City",
    "description": "Satelite image over The City",
    "href": "...",
    "type": "image/png",
    "roles": ["data"]
  },
  "image-small": {
    "title": "The City",
    "description": "Same, but the houses are tiny",
    "href": "...",
    "type": "image/png",
    "roles": ["thumbnail"]
  }
}

In this case, in item_assets, what should the title of the image key be? And since it may be difficult to control what keys the users use, as with the thumbnail in this example, the map may potentially grow very large.

@m-mohr
Copy link
Collaborator

m-mohr commented Aug 14, 2024

Good catch, thanks.
item_assets is not meant to be required, it is a copy&paste mistake on our end, just in the written Markdown documentation.
The JSON schema doesn't enforce item_assets fortunately.
See PR #1314

@m-mohr m-mohr added this to the 1.1.0 milestone Aug 14, 2024
m-mohr added a commit that referenced this issue Aug 14, 2024
@m-mohr m-mohr linked a pull request Aug 14, 2024 that will close this issue
4 tasks
m-mohr added a commit that referenced this issue Aug 19, 2024
@m-mohr m-mohr closed this as completed Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants