How do I specify an enum type hint for a flask route parameter

Solution
from flask import Flask
from enum import Enum, unique
from werkzeug.routing import BaseConverter, ValidationError

@unique
class RequestType(str, Enum):
    TYPE1 = 'abc'
    TYPE2 = 'def'

class RequestTypeConverter(BaseConverter):

    def to_python(self, value):
        try:
            request_type = RequestType(value)
            return request_type
        except ValueError as err:
            raise ValidationError()

    def to_url(self, obj):
        return obj.value


app = Flask(__name__)
app.url_map.converters.update(request_type=RequestTypeConverter)

@app.route('/api/v1/', methods=['POST'])
def root(t):
    return f'{t.name} -> {t.value}'