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

Use JsonldNormalizerUtils in context to generate URI #72

Merged
merged 2 commits into from
Oct 5, 2021

Conversation

whikloj
Copy link
Member

@whikloj whikloj commented Sep 18, 2021

GitHub Issue: Islandora/documentation#1766

What does this Pull Request do?

Uses the new provided utility class to generate a URI for the JSON-LD that correctly does/does not add the ?_format=jsonld suffix depending on the configuration.

What's new?

  • Does this change require documentation to be updated? No
  • Does this change add any new dependencies? No
  • Does this change require any other modifications to be made to the repository
    (i.e. Regeneration activity, etc.)? No
  • Could this change impact execution of existing code? No

How should this be tested?

Requires Islandora/jsonld#58

With a normal Islandora setup:

  1. Ensure that in Admin -> Configuration -> Search and metadata -> Jsonld, the Remove jsonld parameter from @ids is checked.
  2. Add an item (with URI) to the Person taxonomy.
  3. Create a new Repository Item
  4. Add the above Person in the "Linked Agent" field with some relationship.
  5. Save the Repository Item.
  6. View the JSON-LD for that node by adding ?_format=jsonld to the URI. (ie. http://localhost:8000/node/1?_format=jsonld)
  7. See that while most of the @id and @type elements DON'T have a ?_format=jsonld suffix, the relation (depending on which you chose) DOES.
  8. Pull in the associated JSON-LD PR and this PR.
  9. Re-do the above steps and see that the relation URI in the JSON-LD will add or remove the ?_format=jsonld based on the JSON-LD configuration.

Interested parties

@Islandora/8-x-committers @seth-shaw-unlv @mdlincoln @kspurgin

@seth-shaw-unlv
Copy link
Contributor

@whikloj, with this PR, if you use JSON-LD you must have the dev branch installed or else it will throw errors. Can we issue a minor release of the JSON-LD module and then add a conflicts directive to this module's composer.json for anything less than the new JSON-LD minor version?

@kstapelfeldt
Copy link
Member

This will wait until the end of the week and the official communication/final feedback on semantic versioning.

@seth-shaw-unlv
Copy link
Contributor

Thanks. Once we get the new JSON-LD tag I'll test with composer and then merge.

@seth-shaw-unlv seth-shaw-unlv changed the base branch from 8.x-1.x to 2.x October 5, 2021 18:48
@seth-shaw-unlv seth-shaw-unlv merged commit 10d8316 into Islandora:2.x Oct 5, 2021
@whikloj whikloj deleted the issue-1766 branch October 7, 2021 14:46
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 this pull request may close these issues.

3 participants