WinterFramework / winter

Web Framework with focus on python typing, dataclasses and modular design
MIT License
17 stars 18 forks source link

Support container's type as an argument for a method of controller #138

Closed mikhaillazko closed 5 years ago

mikhaillazko commented 5 years ago
@winter.route_post('/')
@winter.request_body('dtos')
def create(self, account: Account, dtos: List[DTO]):
    pass

In some cases, we want to send a simple array of objects. It looks like normal, but currently, I need to create additional DTO with a named argument that change API contract. I can't rewrite old API without breaking changes.