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

Fix Reactive Route stream serialization without relying on the Multi sub-type #21643

Merged

Conversation

cescoffier
Copy link
Member

@cescoffier cescoffier commented Nov 23, 2021

Provide another way to generate streams from Reactive Routes that do not require a specific Multi sub-type.

Sub-typing Multi does not work when the route is protected using @RolesAllowed as the security interceptor changes the returned Multi actual type.

The previous approach is still supported but is deprecated. The documentation mentions the new approach and explains why the previous approach should be avoided.

CC @michalszynkiewicz

Fix #21044

@mkouba
Copy link
Contributor

mkouba commented Nov 24, 2021

This a breaking change, right? Because previously, the Route#produces() value was only used for content based routing.

@cescoffier
Copy link
Member Author

Yes, it is breaking if you were configuring ‘produces.’ However, in practice, it should not happen too much (still needs to be mentioned.

Copy link
Contributor

@mkouba mkouba left a comment

Choose a reason for hiding this comment

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

I've added few minor comments..

…not require a specific Multi sub-type.

Sub-typing Multi does not work when the route is protected using @RolesAllowed as the security interceptor changes the returned Multi actual type.

The previous approach is still supported but is deprecated. The documentation mentions the new approach and explains why the previous approach should be avoided.
@mkouba mkouba merged commit bd87966 into quarkusio:main Nov 25, 2021
@quarkus-bot quarkus-bot bot added this to the 2.6 - main milestone Nov 25, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Nov 25, 2021

Milestone is already set for some of the items:

We haven't automatically updated the milestones for these items.

This message is automatically generated by a bot.

@mkouba
Copy link
Contributor

mkouba commented Nov 25, 2021

@cescoffier Pls add a note to the migration guide.

@cescoffier
Copy link
Member Author

@mkouba Done: https://github.com/quarkusio/quarkus/wiki/Migration-Guide-2.6#reactive-routes-produces-changes

@cescoffier cescoffier deleted the reactive-routes-multi-serialization branch November 25, 2021 08:23
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.

Reactive routes incorrect json serialization
2 participants