Skip to content

Commit

Permalink
Merge pull request #812 from CDCgov/renovate/io.javalin-javalin-6.x
Browse files Browse the repository at this point in the history
fix(deps): update dependency io.javalin:javalin to v6
  • Loading branch information
halprin authored Feb 1, 2024
2 parents 0e77fb9 + a68a083 commit d2f92eb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies {
implementation project(':etor')
testImplementation testFixtures(project(':shared'))

implementation 'io.javalin:javalin:5.6.3'
implementation 'io.javalin:javalin:6.0.0'

testImplementation 'org.apache.groovy:groovy:4.0.18'
testImplementation 'org.spockframework:spock-core:2.3-groovy-4.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import io.javalin.http.Context;
import io.javalin.http.Handler;
import io.javalin.http.HandlerType;
import io.javalin.router.Endpoint;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.HashSet;
Expand Down Expand Up @@ -70,10 +71,13 @@ static void registerDomainsHandlers(Javalin app, Set<DomainConnector> domains) {
registrationMap ->
registrationMap.forEach(
(endpoint, handler) -> {
app.addHandler(
HandlerType.valueOf(endpoint.verb()),
endpoint.path(),
createHandler(handler, endpoint.isProtected()));
app.addEndpoint(
new Endpoint(
HandlerType.valueOf(endpoint.verb()),
endpoint.path(),
createHandler(
handler,
endpoint.isProtected())));
LOGGER.logInfo(
"verb: "
+ endpoint.verb()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import io.javalin.Javalin
import io.javalin.http.Context
import io.javalin.http.Handler
import io.javalin.http.HandlerType
import io.javalin.router.Endpoint
import spock.lang.Specification

import java.util.function.Function
Expand Down Expand Up @@ -291,7 +292,7 @@ class DomainsRegistrationTest extends Specification {
DomainsRegistration.registerDomains(javalinApp, domains as Set<Class<? extends DomainConnector>>)

then:
expectedNumberOfAddHandlerCalls * javalinApp.addHandler(_ as HandlerType, _ as String, _ as Handler)
expectedNumberOfAddHandlerCalls * javalinApp.addEndpoint(_ as Endpoint)
}

def "an OpenAPI endpoint is registered and it sets it content-type as YAML"() {
Expand Down

0 comments on commit d2f92eb

Please sign in to comment.