3 ms·
Does it? I don't use Zod on my JVM backend. How would I? In addition to using OpenAPI, I generate TS interfaces from my data classes in a Gradle task.
by esafak 1y ago
Does it? I don't use Zod on my JVM backend. How would I?
In addition to using OpenAPI, I generate TS interfaces from my data classes in a Gradle task.
- skybrian 1y agoOne way might be to convert the Zod schema to a JSON schema and then to Java? I found a library to do that. [1] But I don’t know how lossy that would be. A purpose-built converter might do better. [1] https://jsontypedef.com/docs/java-codegen/ https://jsontypedef.com/docs/java-codegen/
- presentation 1y agoLooks like there are libraries for generating zod schemas from OpenAPI definitions and others. https://zod.dev/ecosystem?id=x-to-zod https://zod.dev/ecosystem?id=x-to-zod