Here's a situation you've probably been in before: # Your OpenAPI spec says this: requestBody: content: application/json: schema: type: object required: [name, email] properties: name: { type: string, minLength: 1 } email: { type: string, format: email } // Your validation layer says this: const schema = z.object({ name: z.string().min(1), email: z.string().email(), }); Two definitions of t
InversifyJS + OpenAPI: One Schema to Validate Them All
notaphplover·Dev.to··1 min read
D
Continue reading on Dev.to
This article was sourced from Dev.to's RSS feed. Visit the original for the complete story.