Skip to content

Commit 33db06d

Browse files
fsteegsol
authored andcommitted
2 parents f1b5e02 + bc5161a commit 33db06d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

web/app/controllers/resources/Accept.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ private Accept() {
1919
}
2020

2121
enum Format {
22-
BULK("jsonl", "application/x-jsonlines"), //
2322
JSON_LD("json(.+)?", "application/json", "application/ld+json"), //
23+
BULK("jsonl", "application/x-jsonlines"), //
2424
HTML("html", "text/html"), //
2525
RDF_XML("rdf", "application/rdf+xml", "application/xml", "text/xml"), //
2626
N_TRIPLE("nt", "application/n-triples", "text/plain"), //

web/test/tests/AcceptIntegrationTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ public static Collection<Object[]> data() {
3737
return Arrays.asList(new Object[][] {
3838
// search, default format: JSON
3939
{ fakeRequest(GET, "/resources/search?q=*"), /*->*/ "application/json" },
40+
{ fakeRequest(GET, "/resources/search?q=*").header("Accept", "*/*"), /*->*/ "application/json" },
41+
{ fakeRequest(GET, "/resources/search?q=*").header("Accept", "application/x-jsonlines"), /*->*/ "application/x-jsonlines" },
4042
{ fakeRequest(GET, "/resources/search?q=*&format="), /*->*/ "application/json" },
4143
{ fakeRequest(GET, "/resources/search?q=*&format=json"), /*->*/ "application/json" },
44+
{ fakeRequest(GET, "/resources/search?q=*&format=jsonl"), /*->*/ "application/x-jsonlines" },
4245
{ fakeRequest(GET, "/resources/search?q=*&format=whatever"), /*->*/ "application/json" },
4346
{ fakeRequest(GET, "/resources/search?q=*").header("Accept", "text/plain"), /*->*/ "application/json" },
4447
// search, others formats as query param:

0 commit comments

Comments
 (0)