-
Notifications
You must be signed in to change notification settings - Fork 31
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
Added ability to use suffixes with a controller that has been already registered without suffixes. #23
base: master
Are you sure you want to change the base?
Conversation
… registered without suffixes.
Codecov Report
@@ Coverage Diff @@
## master #23 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 40 53 +13
=========================================
+ Hits 40 53 +13
Continue to review full report at Codecov.
|
Thanks for making this PR! It's July 4th long weekend, won't be able to review until next weekend. Appreciate your understanding. |
Hope you enjoyed the long weekend. I appreciate your update and look forward to your comments and merge this weekend. |
# should be passed twice so the suffix is registered | ||
# path should be called n + 1 times where n is the number of suffixes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless people read this README, they are not going to know about this convention.
Is there a better way to register resources? Would prefer to do it once versus n+1
times. Also, is there is a reason it's n+1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, Unfortunately not, due to how the ApiSpec plugin works. It calls each resource once, meaning if you use a controller twice only one path will be chosen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alysivji Any updates?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling something n+1 times is a sign of bad design. What if y'all add a new suffix but forgot to add the line? Having a manual process is a recipe for disaster.
There has to be a way of fixing it I would need to look into how the path_helper works... why can't we loop n+1 times inside there to get the information you need?
I have commitments until August 4th. I can definitely help out after then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alysivji Status?
Signed-off-by: Eric Benson <eric.benson@grainger.com>
Thanks for creating this PR! Is there any update regarding when this can be merged? |
Thanks for the ping. This slipped off my radar as other priorities came up. I'm not a fan of the I would need to take a closer look at what apispec is doing. I can take a look this weekend / early October (have some time devoted to Open Source during Hacktober) to see if I can come up with a better API. |
thanks! |
No description provided.