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

Port rest-data-panache to RESTEasy Reactive #19801

Merged
merged 9 commits into from
Sep 2, 2021
Merged

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Aug 31, 2021

This also contains a bunch of small fixes for bugs that surfaced during the port

Resolves: #19771

@quarkus-bot quarkus-bot bot added area/core area/hibernate-validator Hibernate Validator area/panache area/rest area/spring Issues relating to the Spring integration labels Aug 31, 2021
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Looks good, nice work.

I added a question though, it's slightly unrelated but I think we need to discuss it and decide what to do.

.and().body("parameterViolations[0].path", equalTo("add.arg0.title"))
.and().body("parameterViolations[0].message", equalTo("must not be blank"));
.and().body("violations[0].field", equalTo("add.arg0.title"))
.and().body("violations[0].message", equalTo("must not be blank"));
Copy link
Member

Choose a reason for hiding this comment

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

Hmmm. Why do we have a difference here? Shouldn't we try to stay on par with what RESTEasy classic does?

Copy link
Contributor Author

@geoand geoand Aug 31, 2021

Choose a reason for hiding this comment

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

I don't think so.

This different structure of the response has been part of RESTEasy Reactive from day 1.
Furthermore, this behavior is not part of the spec, so RESTEasy's was just doing its own thing, and FWIW, it didn't seem to be emulated by other frameworks. What we have here is very similar to what popular approaches like Zalando Problem have.
Of course the case can be made that we should follow RESTEasy's lead for most things, but I would say that we should only do that for things that really do make sense.

Copy link
Member

Choose a reason for hiding this comment

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

Well, the problem is that we introduce a difference for absolutely no value. field is definitely less correct than path and we will have people migrating from RESTEasy classic soon and they will have problems with it.

I would rather fix it now and be consistent rather than having a difference between the two implementations for absolutely no value that will haunt us forever.

I don't even understand why you did things differently in the first place and it should probably have been discussed. If there is a value I don't see, I'm all ears.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I personally thought the RESTEasy format sucked, so I looked for what other options existed, eventually settling on what Reactive Routes was doing.
I am very much inclined to not change this, unless everyone else thinks otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is my proposal: Since this work is pretty much unrelated to the violations report, we get this in (barring of course whatever other changes may be needed) and then I send an email to dev list asking peoples opinion. If the majority think we should change it, I'll do that.

@geoand
Copy link
Contributor Author

geoand commented Sep 1, 2021

@stuartwdouglas @FroMage are you OK with this?

@geoand geoand merged commit 006d2ec into quarkusio:main Sep 2, 2021
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Sep 2, 2021
@geoand geoand deleted the #19771 branch September 2, 2021 05:38
Sgitario added a commit to Sgitario/quarkus that referenced this pull request Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core area/hibernate-validator Hibernate Validator area/panache area/rest area/spring Issues relating to the Spring integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port rest-data-panache to RESTEasy Reactive
3 participants