acdh-oeaw / vicav-vue3

Reimplementation of the VICAV Frontend based on Vue.js 3
https://vicav-vue.acdh-ch-dev.oeaw.ac.at
MIT License
0 stars 0 forks source link

Transform window content typing to zod schemata #100

Closed ttechnicus closed 7 months ago

ttechnicus commented 9 months ago

Investigate how the current type inheritance can be implemented with zod

If it is feasible in a fitting time frame, transform the current typescript typing of the window contents to zod to enable runtime validation of parameters

ctot-nondef commented 8 months ago

@ttechnicus has there been any progress on this issue? can you document your findings here? thanks!

ttechnicus commented 8 months ago

Hi @ctot-nondef , so far I only had time to read the manual at zod.dev

ttechnicus commented 8 months ago

@ctot-nondef @simar0at The types have been converted to zod schemas, and the code runs well right now. However, it would be nice to standardize the parameter names on the backend (see https://github.com/acdh-oeaw/vicav-app-api/issues/20) so that the arbitrary mappings can be removed here.

ctot-nondef commented 7 months ago

please move the zod definitions to a separate file (ie in the types folder as discussed)