[BUG][java][resttemplate] openapi-generator-maven-plugin version 5.4.0 java using rest template not encoding path param values
Created by: samuelo
when using java resttemplate client code generation generated code encodes only query parameter values.
encoding of query params is done in the generated ApiClient in function generateQueryUri, and DefaultUriBuilderFactory encoding mode is set to none.
if a path param is used e.g. petstore get user by user name /user/{username}
if for example we supply 'abc def' as the username the url created is invalid, the space is not encoded to %5.0.0
expected
https://petstore.swagger.io/v2/user/abc%20def
but got:
https://petstore.swagger.io/v2/user/abc def
PR: #11922