Descriptions for primitive type handler arguments


In 0.3.9, a description could be added to hander arguments for otherwise primitive types by using the typed version. i…e

def my_handler(my_arg: Integer(description='This is my description')):
    # do my thing

This description would then be used in the documentation generation. I don’t remember if it was also available in the schema.

However, in 0.4.3, actual types must be used, so the function becomes:

def my_handler(my_arg: int):
    # do my thing

I realise generated documentation isn’t a thing in 0.4.3, and I’m not familiar enough with the schema generator to know if descriptions on primitives is available, but it would be nice to have descriptions on handler arguments for when documentation is available.


Yeah, I’m also wondering how to validate args. I want to validate that handler argument is an UUID.


I created a PR that allows using validators.Validator instances as type annotations in handlers: