Open rafalkrupinski opened 8 months ago
Same for maps in Responses/code
maps:
Responses({
'200': {
'application/json': ResultType,
}
})
# same as
Responses({
'200': ResultType,
}
})
Not adding option of omitting the response code, to encourage declaring errors.
Lapidary shouldn't read type hints, only WebArg annotations.
Annotated[ResultType, Responses({'200': ResultType})] # OK - matches content-type: application/json
Annotated(RequestBodyType, Body(RequestBodyType) # OK - sends content-type: application/json
The typical usage of RequestBody annotation is:
with a single key-value pair, where
These alternative shortcut forms could be allowed, to better support human authors: