-
Notifications
You must be signed in to change notification settings - Fork 16
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
Refactoring endpoints and fix some of them #396
Comments
In
I'm not sure if moving the actual endpoint definitions out of the individual method definitions would serve any purpose. With everything (endpoint, method, parameter lists) defined in the same place, it is in my opinion much easier to see what's going on. |
I have already started cleaning up a bit in #410 but one item of discussion came up: How do we want to handle endpoints in tests? I think the cleanest solution with least amount of overhead would be to define the Another one would be to copy the Any opinion on that? @bocops @andregasser @G10xy |
I think setting the |
I agree with the suggestion made by @andregasser. Keep going with the cleanest solution of setting endpoints as internal 👍🏼 |
Since I have seen that sometimes the endpoint is set as a private variable within the class to be called within all methods of that class, sometimes it is rewritten in each method, sometimes it is rewritten in the corresponding test class, I was wondering if it might be useful and nicer to group them all in a companion object, so that they can then be called statically when and where needed.
What do you think?
Indeed, I have seen that, regarding endpoints, sometimes they start with the slash "/" (for example: /api/v1/endorsements), sometimes they start without the slash "/" (for example: api/v1/accounts).
Which structure is the wrong one?
The text was updated successfully, but these errors were encountered: