encore icon indicating copy to clipboard operation
encore copied to clipboard

Fastify json schema to Encore validation

Open TriStarGod opened this issue 6 months ago • 1 comments

Hi, Really excited about what Encore has to offer. However, transitioning from Fastify is a challenge. Via schemez, I use json-schema and it's respective typescript types heavily in both the frontend and backend. Is there a json-schema to typescript convertor that uses encore's encore.dev/validate, provide the json-schema directly to encore (looks like rust code generates json-schema), or is there a better way to handle validation without having to go back to the days of building separate validations for frontend and backend?

TriStarGod avatar Aug 16 '25 09:08 TriStarGod

Not familiar with schemez, but generally with Encore you can do validation on the backend and generate a frontend client using encore client gen (https://encore.dev/docs/ts/frontend/request-client).

marcuskohlberg avatar Aug 28 '25 08:08 marcuskohlberg