Skip to content

Commit

Permalink
Add SDK version in format java:v{version} to the sync call (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
KiKoS0 authored Sep 8, 2024
1 parent 227393c commit c1b962d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.inngest.springbootdemo;

import com.inngest.InngestHeaderKey;
import com.inngest.Version;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
Expand All @@ -24,7 +25,9 @@ public void shouldReturnSyncPayload() throws Exception {
.andExpect(content().contentType("application/json"))
.andExpect(header().string(InngestHeaderKey.Framework.getValue(), "springboot"))
.andExpect(jsonPath("$.appName").value("spring_test_demo"))
.andExpect(jsonPath("$.framework").value("springboot"))
.andExpect(jsonPath("$.v").value("0.1"))
.andExpect(jsonPath("$.url").value("http://localhost:8080/api/inngest"))
.andExpect(jsonPath("$.sdk").value("inngest-kt"));
.andExpect(jsonPath("$.sdk").value(String.format("java:v%s", Version.Companion.getVersion())));
}
}
6 changes: 3 additions & 3 deletions inngest/src/main/kotlin/com/inngest/Comm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ class CommHandler(
private fun getRegistrationRequestPayload(origin: String): RegistrationRequestPayload =
RegistrationRequestPayload(
appName = config.appId(),
framework = framework.toString(),
sdk = "inngest-kt",
framework = framework.value,
sdk = "java:v${Version.getVersion()}",
url = getServeUrl(origin),
v = Version.getVersion(),
v = "0.1",
functions = getFunctionConfigs(origin),
)

Expand Down

0 comments on commit c1b962d

Please sign in to comment.