NYCPlanning / ae-zoning-api

This application is API for serving data related to zoning and tax lots.
2 stars 0 forks source link

176/document spatial filter #185

Closed TangoYankee closed 6 months ago

TangoYankee commented 6 months ago

@TylerMatteo

If memory serves, you're working on a way to coerce query parameters from strings into their documented types. Zod will likely hit a limit when we start to implement array query parameters for things like coordinates.

So, I explored de-serialization tools and came across serialize-query-params. We can make a separate pipe to first decode the params. Then, Zod can parse them without any trickery.

In this example, I hand-write the decode schema. But for my next trick, I will attempt to build the decode schema from the zod schema