Skip to content

add java.util.Optional support #103

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jul 20, 2021
Merged

add java.util.Optional support #103

merged 1 commit into from
Jul 20, 2021

Conversation

ITurchenko
Copy link
Contributor

Allow usage Optional<T>? in @QueryParam

data class OptionalRequest(
    @QueryParam("strictly optional", allowEmptyValues = true) val optInt: Optional<Int>? = null
)

Result
/request?optInt=1 > Optional.of(1)
/request?optInt= > Optional.empty()
/request?optInt=null > Optional.empty()
/request > null

@Wicpar Wicpar merged commit ec7d012 into papsign:master Jul 20, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants