NYCPlanning / ae-zoning-api

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

Update findCapitalProjectsByCityCouncilDistrict to use the transform pipe in param decorators #340

Open TangoYankee opened 3 months ago

TangoYankee commented 3 months ago
          Oh, interesting. The way we solved this on Horatio's branch was to merge the definitions. Merging the defintions fits the prefixed pipes pattern better. However, it kinda waters down the schema definitions because it relies on "partial".

Using the pipe in each type of parameter might actually be more powerful because it uses the zod schema definition as-is

https://github.com/NYCPlanning/ae-zoning-api/blob/3a2ef3808bfd802fe4751b97aedbbbbdcfd39791/src/city-council-district/city-council-district.controller.ts#L57

_Originally posted by @TangoYankee in https://github.com/NYCPlanning/ae-zoning-api/pull/327#discussion_r1655455147_