Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
svix-mman committed Feb 23, 2025
1 parent f09fe5c commit 93185df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions templates/svix-lib-java/api_extra/message.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
*
* @param payload Serialized message payload
*/
public static MessageIn messageInRaw(final String eventType, final String payload) {
public static MessageIn messageInRaw(final String payload) {
MessageIn msg = new MessageIn();
msg.setEventType(eventType);
msg.setPayload(new HashMap<>());
msg.setTransformationsParams(Collections.singletonMap("rawPayload", payload));
return msg;
Expand All @@ -24,13 +23,11 @@ public static MessageIn messageInRaw(final String eventType, final String payloa
* @param payload Serialized message payload
* @param contentType The value to use for the Content-Type header of the webhook sent by Svix
*/
public static MessageIn messageInRaw(
final String eventType, final String payload, final String contentType) {
public static MessageIn messageInRaw(final String payload, final String contentType) {
HashMap<String, Object> trParam = new HashMap<>();
trParam.put("rawPayload", payload);
trParam.put("headers", Collections.singletonMap("content-type", contentType));
MessageIn msg = new MessageIn();
msg.setEventType(eventType);
msg.setPayload(new HashMap<>());
msg.setTransformationsParams(trParam);
return msg;
Expand Down
2 changes: 1 addition & 1 deletion templates/svix-lib-java/api_resource.java.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class {{ resource_type_name }} {


{% for op in resource.operations -%}
{% set throws = "throws IOException,ApiException" -%}
{% set throws = "throws IOException, ApiException" -%}
{% set res_type = "void" -%}
{% if op.response_body_schema_name is defined -%}
{% set res_type = op.response_body_schema_name | replace("_", "") -%}
Expand Down

0 comments on commit 93185df

Please # to comment.