yaschema-ws-api
v3.1.0
Published
Web socket API support for yaschema
Downloads
520
Maintainers
Readme
yaschema-ws-api
Web socket API support for yaschema.
Basic Example
export const stream = makeWsApi({
routeType: 'stream',
url: '/stream',
requests: {
ping: schema.object({ echo: schema.string().allowEmptyString().optional() }).optional(),
hello: schema.any().optional()
},
responses: {
pong: schema.object({
body: schema.string()
}),
hello: schema.object({
body: schema.string()
})
}
});
Thanks
Thanks for checking it out. Feel free to create issues or otherwise provide feedback.
Be sure to check out our other TypeScript OSS projects as well.