-
Notifications
You must be signed in to change notification settings - Fork 84
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
"ById" is not taking empty resource name into account #212
Comments
Hi, so it's done on purpose assuming that path variable is an
method generated will be What we can improve is recognizing an Another thing I don't like is that generated method name depends on other parts of resource - |
HI, @stojsavljevic . |
Sorry, @stojsavljevic , I didn't get it. |
I tested this on your branch:
gives:
while this:
produces:
And raml snippets are almost the same!
will lead to different results but this:
So, the way resources are organized influences creation of controller and the name of methods. What you want to change in your PR is the first case where you still get
And we need few tests to cover this issue :) Create something like |
@stojsavljevic , I don't know what we are doing differently, but using my branch I get a completely different result. |
@stojsavljevic , I added |
Sorry again for the confusion with file names - I explained it in #217 But when it comes to method names (which is the subject of the issue) - I still see different behaviors. |
@stojsavljevic , please check my last commit. I just realised that what I really didn't like and what was really confusing is the way the URL was reduced. I actually wanted to report it a long time ago, but now I think maybe we can simply fix it in scope of this ticket.
|
Can you give me an example? Do you need some more work for this?
Agree that contracts should be neat and straightforward. But as we discussed, there more than one way to do things. Some people might use
Well.. It's not very clear but it was even worse before. So.. 👍
That's definitely a good thing. Can we fix remaining test please?
Much better indeed 👍 |
@stojsavljevic , you are right. With my latest commit both |
Tests fixed. Give it a look, @stojsavljevic . |
Hello, @stojsavljevic . Are you there? We haven't lost you for Xmas, have we?:) |
Hi @yuranos no, you haven't lost me for Xmas, I'm Orthodox and my Xmas is in January :) I will try to merge your PR today, but as stated in #65, I will work more to consolidate naming before next release. |
In
NamingHelper
:peek
can be empty and I'm sure it would be preferable for everyone to have"By" + StringUtils.capitalize(segment.substring(1, segment.length()-1));
As an example:
For raml:
I'd rather have:
Then:
Now, there's another issue with the way
resource.getUri()
is built, but I will report it separately.The text was updated successfully, but these errors were encountered: