The Group parameters are broken with the latest pydantic version.
from __future__ import annotations
import logging
from aiohttp import web
from aiohttp_pydantic import PydanticView
from aiohttp_pydantic.injectors import Group
logging.basicConfig(level=logging.DEBUG)
class Test(Group):
name: str
age: int = 123
class TestView(PydanticView):
async def get(self, test: Test):
return web.Response(text=test.name)
app = web.Application()
app.router.add_view("/test", TestView)
web.run_app(app)
Query to http://0.0.0.0:8080/test?name=foo returns
The
Group
parameters are broken with the latest pydantic version.Query to
http://0.0.0.0:8080/test?name=foo
returns