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

Comments

Projects
None yet
2 participants
@nicolas-leydet
Copy link

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

This comment has been minimized.

Copy link
Owner

Bogdanp commented Sep 29, 2018

Thanks! I fixed this in 0.5.2.

@Bogdanp

This comment has been minimized.

Copy link
Owner

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