Skip to content

Commit

Permalink
Better workaround, thx @pierDipi
Browse files Browse the repository at this point in the history
  • Loading branch information
cardil committed Mar 7, 2023
1 parent a86a0a2 commit d4df9e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ class Endpoint {
@GET
@Operation(summary = "Retrieves all registered events as a JSON stream")
@RestStreamElementType(JsonFormat.CONTENT_TYPE)
public Multi<Event> events() {
public Multi<byte[]> events() {
return Multi.createFrom()
.iterable(events)
.map(this::workaroundQuarkus31587);
.map(Endpoint::workaroundQuarkus31587);
}

@POST
Expand All @@ -48,8 +48,8 @@ public void receive(CloudEvent event) {
*
* TODO: Remove this method once the above issues is fixed.
*/
private Event workaroundQuarkus31587(CloudEvent event) {
return Event.from(event, om);
}
private static byte[] workaroundQuarkus31587(CloudEvent event) {
var serializer = new JsonFormat();
return serializer.serialize(event);
}
}

This file was deleted.

0 comments on commit d4df9e9

Please sign in to comment.