conjure-java-runtime
                                
                                 conjure-java-runtime copied to clipboard
                                
                                    conjure-java-runtime copied to clipboard
                            
                            
                            
                        optional path parameter on retrofit
For a retrofit client with an optional path parameter e.g. @Query("foo") Optional<String> foo, passing in an Optional.empty() will result in the query parameter still being included in the request, just with a no value... e.g. GET my/path?foo=
then on the server side, this results in an Optional.of("") rather than the expected Optional.empty(). Not sure if there's something we can do here...
It looks like we can return null instead of the empty string for path params and it would fix this. Want to contribute a fix to https://github.com/palantir/http-remoting/blob/develop/retrofit2-clients/src/main/java/com/palantir/remoting2/retrofit2/OptionalObjectToStringConverterFactory.java to handle Query annotations differently from Path annotations?
This issue has been automatically marked as stale because it has not been touched in the last 60 days. Please comment if you'd like to keep it open, otherwise it'll be closed in 7 days time.
I'd like to keep this open and make sure the validation is baked into conjure-verification.
This issue has been automatically marked as stale because it has not been touched in the last 60 days. Please comment if you'd like to keep it open, otherwise it'll be closed in 7 days time.
This issue has been automatically marked as stale because it has not been touched in the last 60 days. Please comment if you'd like to keep it open, otherwise it'll be closed in 7 days time.