Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Support for collection of java.time in query params #42731

Merged
merged 1 commit into from
Aug 27, 2024
Merged

Support for collection of java.time in query params #42731

merged 1 commit into from
Aug 27, 2024

Conversation

indalaterre
Copy link

Hello, we need to support collection of dates in our endpoint.

This PR enable to usage of this kind of endpoints

public void myEndpoint(@RestQuery Set<LocalDate> dates)

@indalaterre
Copy link
Author

@geoand can you please review this PR? If it's ok would it be possible to have this in the 3.14.1? Thank you very much.

@geoand
Copy link
Contributor

geoand commented Aug 23, 2024

Thanks for this.

I'm on PTO currently, I'll review when I get back

@geoand
Copy link
Contributor

geoand commented Aug 23, 2024

cc @FroMage

@geoand geoand requested a review from FroMage August 26, 2024 06:04
Copy link
Member

@FroMage FroMage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, except the condition which should be simplified and harmonised, but great work, thanks :)

@@ -676,6 +678,14 @@ private ParameterConverterSupplier extractConverter(String elementType, IndexVie
|| elementType.equals(InputStream.class.getName())) {
// this is handled by MultipartFormParamExtractor
return null;
} else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think something like this would be a better condition:

        } else if (SUPPORT_TEMPORAL_PARAMS.contains(DotName.createSimple(elementType))) {

This is what is done in handleOptionalParam already.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now should be ok. Thanks

@FroMage
Copy link
Member

FroMage commented Aug 26, 2024

Oh, and could you also please merge your commits?

@indalaterre
Copy link
Author

Oh, and could you also please merge your commits?

Done

This comment has been minimized.

Copy link

quarkus-bot bot commented Aug 27, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit a7c18f1.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ Gradle Tests - JDK 17 Windows

📦 integration-tests/gradle

io.quarkus.gradle.devmode.MavenExclusionInExtensionDependencyDevModeTest.main - History

  • Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 1 minutes 30 seconds. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 1 minutes  30 seconds.
	at app//org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at app//org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at app//org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at app//org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1006)
	at app//org.awaitility.core.ConditionFactory.until(ConditionFactory.java:975)
	at app//io.quarkus.test.devmode.util.DevModeClient.getHttpResponse(DevModeClient.java:164)
	at app//io.quarkus.gradle.devmode.QuarkusDevGradleTestBase.getHttpResponse(QuarkusDevGradleTestBase.java:164)

Copy link
Member

@FroMage FroMage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@FroMage FroMage merged commit 03b025c into quarkusio:main Aug 27, 2024
46 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.16 - main milestone Aug 27, 2024
@indalaterre
Copy link
Author

@FroMage is it possible to have this in a patch of 3.14?

@FroMage
Copy link
Member

FroMage commented Aug 27, 2024

@FroMage is it possible to have this in a patch of 3.14?

@gsmet ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants