Closed azzamsa closed 4 years ago
In flask-resplus marshall, I can use:
@api.marshal_with(User, envelope="data")
I don't find this in response. I would like to use something like:
@responds(schema=User, api=api, many=True, envlope='data')
I also can't do something like:
users = user_service.get_users() return {"data": users}
My current workaround is to use @api.expect(User) (to include those param into swagger doc) and schema.dump()
@api.expect(User)
schema.dump()
@api.expect(User) def get(self): """List all available users""" try: users = user_service.get_users() return {"data": user_schema.dump(users)}
In flask-resplus marshall, I can use:
I don't find this in response. I would like to use something like:
I also can't do something like:
My current workaround is to use
@api.expect(User)
(to include those param into swagger doc) andschema.dump()