Skip to content

Commit 4c1da34

Browse files
chore: New endpoint to add tests for jsonl (#29)
1 parent 9a62581 commit 4c1da34

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

cmd/server/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ func main() {
6666
r.HandleFunc("/eventstreams/differentdataschemas", eventstreams.HandleEventStreamDifferentDataSchemas).Methods(http.MethodPost)
6767
r.HandleFunc("/eventstreams/differentdataschemas-flat", eventstreams.HandleEventStreamDifferentDataSchemasFlatten).Methods(http.MethodPost)
6868
r.HandleFunc("/jsonl", jsonLines.HandleJSONLinesRich).Methods(http.MethodGet)
69+
r.HandleFunc("/jsonl/deserialization_verification", jsonLines.HandleJsonLinesDeserializationVerification).Methods(http.MethodGet)
6970
r.HandleFunc("/jsonl/chunks", jsonLines.HandleJSONLinesChunksRich).Methods(http.MethodGet)
7071
r.HandleFunc("/x-ndjson", xNdJson.HandleXNdJsonLinesRich).Methods(http.MethodGet)
7172
r.HandleFunc("/x-ndjson/chunks", xNdJson.HandleXNdJsonLinesChunksRich).Methods(http.MethodGet)

internal/jsonLines/service.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,14 @@ func HandleJSONLinesRich(rw http.ResponseWriter, _ *http.Request) {
5454
},
5555
})
5656
}
57+
58+
func HandleJsonLinesDeserializationVerification(rw http.ResponseWriter, _ *http.Request) {
59+
rw.Header().Add("Content-Type", "application/jsonl")
60+
61+
pushEvents(rw, [][]string{
62+
{
63+
"{\"isFinished\": \"yes\"}\n",
64+
},
65+
})
66+
67+
}

0 commit comments

Comments
 (0)