Path variable = "476%3B"
In a delete API, in path variable value, the character ';' is included in Id and is encoded as '%3B' The id is passed as a string and later on in the app, it is parsed as an integer using Integer.parseInt("476%3B") When this Id value goes thru the API gateway, somehow, the character ';' is getting stripped and using "476" instead of "476%3B" for Id. On execution of the app, I am expecting http code 400 (bad request) But I am getting 404 (not found) The Id can only be integer. Can someone explain the reason behind this?
You could look at this UrlPathHelper::setRemoveSemicolonContent. By default it is true.
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/util/UrlPathHelper.html#removeSemicolonContent(java.lang.String)
And you can configure it.