yaschema-ws-api

yaschema-ws-api

Downloads Size

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.

API Docs

Be sure to check out our other TypeScript OSS projects as well.

Generated using TypeDoc