You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to understand why NamingHelper is making a decision about POST method name based on whether the tail is singular or plural.
It's very easy to fix, so I'll gladly do it if it's Ok.
As a result of this issue what we have is:
@RequestMapping(value = "/{bookingRef}/ogoneIframe", method = RequestMethod.POST)
public ResponseEntity<OgoneIframeResponseDto> updateOgoneIframe(...)
even though POST should normally be used for creation.
I would understand it if the decision would have been made based on whether the id is present in the url, but it's not the case.
@stojsavljevic , can you take a look and come up with a suggestion?
The text was updated successfully, but these errors were encountered:
This is done on purpose.
The reasoning behind this is that endpoints names should be in plural.
In case of singular name we consider that the resource can be only one. So in that case we don't generate method for creating new resource but to update the existing one.
This feature was point of confusion for a number of times.
And I tend to agree with you that we need more flexibility to cover different use cases and different approaches to model REST API.
Before we continue on this let's first finish #212 since there are changes in NamingHelper in both PRs.
I am trying to understand why
NamingHelper
is making a decision about POST method name based on whether thetail
is singular or plural.It's very easy to fix, so I'll gladly do it if it's Ok.
As a result of this issue what we have is:
even though POST should normally be used for creation.
I would understand it if the decision would have been made based on whether the
id
is present in the url, but it's not the case.@stojsavljevic , can you take a look and come up with a suggestion?
The text was updated successfully, but these errors were encountered: