title: how can I create a dynamic marshmallow field (aka change the fields used for serialization programmatically)?
body: <p>Let's say that I have two models and two serializers:</p>
  
  <pre><code>class AuthorSchema(ma.ModelSchema):
      class Meta:
          model = Author
          fields = ('id', 'name')
  
  
  class BookSchema(ma.ModelSchema):
      class Meta:
          model = Book
          authors = fields.Nested(AuthorSchema, many=True)
          fields = ('id', 'title', 'authors')
  </code></pre>
  
  <p>I'm trying to create some API where the user could both require a book and a book + its authors.</p>
  
  <p>The real situation is much more complex and the user should be able to require a book + a lot of other fields, so creating multiple schemas is not really an option.</p>
  
  <p>How can I create a model that is flexible and where the fields (in this case nested fields) can be added programmatically?</p>