jmcarp / jmcarp/flask-apispec

marshal_with should support inference of view function return type

Open
#87 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
652
Forks
151
PR merge metrics
No merged PRs in 30d

Description

It would be nice that when passing a schema class to the marshal_with decorator to have infer if serializing the response should be a list or single object (Schema(many = True or False)).

This would allow to to use MethodView's for APIs as suggested in http://flask.pocoo.org/docs/0.12/views/ . Where the "get" method can dispatch a single object or a list in a restful escenario.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.