palantir / palantir/conjure-java-runtime

optional path parameter on retrofit

Open
#384 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
95
Forks
96
Avg merge
3h 38m
Merged PRs (30d)
33

Description

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...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Reproduce the Java client/server request with an empty Optional path parameter, then trace how the parameter is serialized and interpreted; done means Optional.empty() is preserved rather than becoming an empty string.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.