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

Support for Multi-Responders with the same method type #30

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Sylphe88
Copy link

This is my take on this feature about supporting multiple routes/Falcon responders, some of which may be suffixed and use the same HTTP method type, e.g. on_get and on_get_hello.
The plugin is still immutable when parsing the uris, and the only constraint for the user who wants to expose the docstring for all the routes is to register the path for all the suffixes just like in ebensonwwg's PR, but specifically passing this suffix. This does not look as "weird" as N+1 identical lines, and allows for selecting the suffix'ed methods to be registered.
As mentioned here, APISpec registers one and only one path per spec.path() call, and a path cannot have multiple GETs or POSTs, so we're kind of doomed to call spec.path() multiple times.

As a bonus I also improved the tox configuration, and used bump2version to easily bump new releases.

@Sylphe88
Copy link
Author

@alysivji it'd be nice if you could look into this PR or the others related to this feature, I believe it's a much needed improvement to the package (still had a friend/colleague last week asking for it and had to point him to my fork).
If you don't have time, you may search for additional maintainers so the package does not just die

@aescolastico
Copy link

aescolastico commented Jul 8, 2022

@alysivji Can we please get some attention for this PR? This is a very common use case in falcon for collection/singleton resource strategies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants