-
Notifications
You must be signed in to change notification settings - Fork 0
Description
By default FastAPI has compatibility for lists in query params using multiple duplicates of the same param, without extras: q=1&q=2&q=3, however many client libraries build list parameters into query params adding square brackets to the param name: q[]=1&q[]=2&q[]=3, and even declaring the index of the value inside it if the order of the elements is relevant: q[0]=1&q[1]=2&q[2]=3.
This serialization is not standardized by any RFC, but is widely supported by client libraries like axios, which by default uses the second method here described.
It would be useful to avoid repeating code to integrate this method of parsing directly into LogicLayerModule; this is possible by subclassing the fastapi.Request and fastapi.routing.APIRoute classes. Implementations can then customize their methods by subclassing these or declaring their own Route class on the internal router object.