hug
hug copied to clipboard
Need support for python "typing" module in schema specification
Hug code to replicate:
import hug
from typing import List
@hug.post('/hosts')
def post_hosts(ips: List[str]):
return {'ips': ips}
POST body:
{
"ips": ["10.201.7.250", "10.201.7.251"]
}
Error response:
{
"errors": {
"ips": "Type List cannot be instantiated; use list() instead"
}
}```