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

update media type to be more specific #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.1.3
=====

- Changed media type from `application/json` to `application/ld+json; profile="http://mlcommons.org/croissant/1.0"` to be more specific. See https://github.com/gdcc/exporter-croissant/issues/6 and https://github.com/gdcc/exporter-croissant/pull/7

0.1.2
=====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,15 @@ public Boolean isAvailableToUsers() {
}

/**
* Defines the mime type of the exported format - used when metadata is downloaded, i.e. to
* trigger an appropriate viewer in the user's browser.
* Defines the mime type of the exported format - used when metadata is
* downloaded, i.e. to trigger an appropriate viewer in the user's browser.
*
* We are asking for the media type to be added to the Croissant spec in
* https://github.com/mlcommons/croissant/issues/792 .
*/
@Override
public String getMediaType() {
return MediaType.APPLICATION_JSON;
return "application/ld+json; profile=\"http://mlcommons.org/croissant/1.0\"";
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public void testIsAvailableToUsers() {

@Test
public void testGetMediaType() {
assertEquals("application/json", exporter.getMediaType());
assertEquals("application/ld+json; profile=\"http://mlcommons.org/croissant/1.0\"", exporter.getMediaType());
}

@Test
Expand Down
Loading