diff --git a/CHANGELOG.md b/CHANGELOG.md index 3324b2b..7bb4fbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 ===== diff --git a/src/main/java/io/gdcc/spi/export/croissant/CroissantExporter.java b/src/main/java/io/gdcc/spi/export/croissant/CroissantExporter.java index 0f72eb0..2298d68 100644 --- a/src/main/java/io/gdcc/spi/export/croissant/CroissantExporter.java +++ b/src/main/java/io/gdcc/spi/export/croissant/CroissantExporter.java @@ -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\""; } /** diff --git a/src/test/java/io/gdcc/spi/export/croissant/CroissantExporterTest.java b/src/test/java/io/gdcc/spi/export/croissant/CroissantExporterTest.java index c960b0f..90a93b2 100644 --- a/src/test/java/io/gdcc/spi/export/croissant/CroissantExporterTest.java +++ b/src/test/java/io/gdcc/spi/export/croissant/CroissantExporterTest.java @@ -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