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

Calling generate_openapi_document fail when using a method as handler #13

Closed
nicolas-leydet opened this issue Sep 24, 2018 · 2 comments
Closed
Labels

Comments

@nicolas-leydet
Copy link

@nicolas-leydet nicolas-leydet commented Sep 24, 2018

The following line

if not isinstance(handler, FunctionType):

should probably be replaced by

if not isinstance(handler, (FunctionType, MethodType)):
@nicolas-leydet nicolas-leydet changed the title generate_openapi_document fail when using a method as handler calling generate_openapi_document fail when using a method as handler Sep 24, 2018
@nicolas-leydet nicolas-leydet changed the title calling generate_openapi_document fail when using a method as handler Calling generate_openapi_document fail when using a method as handler Sep 24, 2018
@Bogdanp Bogdanp added the bug label Sep 24, 2018
@Bogdanp Bogdanp closed this in a2e5abc Sep 29, 2018
@Bogdanp
Copy link
Owner

@Bogdanp Bogdanp commented Sep 29, 2018

Thanks! I fixed this in 0.5.2.

@Bogdanp
Copy link
Owner

@Bogdanp Bogdanp commented Sep 30, 2018

Oh hey, btw, I'd be super curious about your use case here. How come you're using methods as your handlers? Can you show me an example?

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

Successfully merging a pull request may close this issue.

None yet
2 participants