flask-mongorest icon indicating copy to clipboard operation
flask-mongorest copied to clipboard

Validate related_resource forms

Open anemitz opened this issue 12 years ago • 1 comments

class FooResource(Resource):
   form = FooForm
   document = FooDocument

class BarResource(Resource):
    document = BarDocument
    related_resources = {
        'foos': FooResource
    }

In the above scenario, submitting a BarDocument with a list of Foo's should validate using the FooResource.form before saving.

anemitz avatar Sep 11 '12 19:09 anemitz

We moved away from forms and are using schemas instead. That being said, it would be ideal if a similar logic applied to Foo#schema.

wojcikstefan avatar May 09 '16 18:05 wojcikstefan