Skip to content

Support Marshmallow Schemas in Function Based Views #341

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

Merged
merged 2 commits into from
Oct 1, 2019

Conversation

sonthonaxrk
Copy link
Contributor

Currently this will not work as flasgger only supports using schemas in the SwaggerView. Not sure if this deliberate, or just that cool people don't use function based views (it was quite confusing that it didn't work with swag_from).

@views.route('/abc/', methods=['GET'])
@swag_from({
    'responses': {
        HTTPStatus.OK.value: {
            'schema': MySchema
        }
    }
})
def endpoint():
     ....

@sonthonaxrk
Copy link
Contributor Author

Hey anyone around to review? :)

@billyrrr billyrrr self-requested a review September 26, 2019 20:29
@sonthonaxrk
Copy link
Contributor Author

Any word on if this will be merged? Using my own branch for a project.

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