title: Convert json field in body to enum with flask-restx
body: <p>I have the following api definition for flask-restx (though should also work with flask-restplus).
  Is there someway to convert the <code>enum</code>-field in the request body the the Enum <code>MyEnum</code> without too much overhead or using DAOs?</p>
  <pre class="lang-py prettyprint-override"><code>class MyEnum(Enum):
      FOO = auto()
      BAR = auto()
  
  
  @dataclass(frozen=True)
  class MyClass:
      enum: MyEnum
  
  
  api = Namespace('ns')
  
  model = api.model('Model', {
      'enum': fields.String(enum=[x.name for x in MyEnum]),
  })
  
  @api.route('/')
  class MyClass(Resource):
  
      @api.expect(Model)
      def post(self) -&gt; None:
          c = MyClass(**api.payload)
          print(type(c.enum))  # &lt;class 'str'&gt; (but I want &lt;enum 'MyEnum'&gt;)
          assert(type(c.enum) == MyEnum)  # Fails
  </code></pre>