File tree Expand file tree Collapse file tree
src/main/java/dev/zenith/web Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package dev .zenith .web ;
22
3+ import com .fasterxml .jackson .databind .DeserializationFeature ;
34import com .zenith .Globals ;
45import com .zenith .command .api .CommandContext ;
56import com .zenith .discord .EmbedSerializer ;
910import dev .zenith .web .model .CommandResponse ;
1011import io .javalin .Javalin ;
1112import io .javalin .http .util .NaiveRateLimit ;
13+ import io .javalin .json .JavalinJackson ;
1214import org .eclipse .jetty .util .thread .ExecutorThreadPool ;
1315
1416import java .util .List ;
@@ -49,6 +51,9 @@ private Javalin createServer() {
4951 threadPool .setName ("ZenithProxy-WebAPI-%d" );
5052 config .jetty .threadPool = threadPool ;
5153 config .http .defaultContentType = "application/json" ;
54+ var objectMapper = JavalinJackson .defaultMapper ()
55+ .configure (DeserializationFeature .FAIL_ON_UNKNOWN_PROPERTIES , false );
56+ config .jsonMapper (new JavalinJackson (objectMapper , false ));
5257 })
5358 .beforeMatched (ctx -> {
5459 var authHeaderValue = ctx .header ("Authorization" );
You can’t perform that action at this time.
0 commit comments