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

Introduce JSON by default support RESTEasy Reactive #14167

Merged
merged 1 commit into from
Jan 7, 2021

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Jan 7, 2021

This is done when the JSON-B or Jackson extensions are used
and only applies to application classes and the most common
collection classes.

This is probably more complex than absolutely necessary, but it introduces a general way
to determine default produces Media Types.

Comment on lines -63 to -67
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive-jsonb-deployment</artifactId>
<scope>test</scope>
</dependency>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was never needed in the first place

@@ -21,7 +21,6 @@

@GET
@Path("/person")
@Produces(MediaType.APPLICATION_JSON)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The PR doesn't introduce any new tests, it just reuses the existing ones and removes @Produces(MediaType.APPLICATION_JSON) to ensure everything works properly

@geoand
Copy link
Contributor Author

geoand commented Jan 7, 2021

I have also already updated the testsuite to use the new property

return applyAdditionalDefaults(nonAsyncReturnType);
}

protected String[] applyAdditionalDefaults(Type nonAsyncReturnType) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done like this because I only wanted to touch default for the server endpoints

This is done when the jsonb or jackson extensions are used
and only applies to application classes and the most common
collection classes
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, but this is a temporary implementation, with a more comprehensive/pluggable implementation to be added later.

@geoand geoand merged commit 0771181 into quarkusio:master Jan 7, 2021
@ghost ghost added this to the 1.12 - master milestone Jan 7, 2021
@geoand geoand deleted the rr-json-default branch January 8, 2021 05:45
@gsmet gsmet modified the milestones: 1.12 - master, 1.11.0.Final Jan 11, 2021
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