Skip to content

Commit

Permalink
update media type to be more specific #6
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Jan 13, 2025
1 parent bbe6b76 commit 88d76c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
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

0 comments on commit 88d76c0

Please sign in to comment.