Open enesflow opened 1 year ago
because it's a get request which upgrades to websocket connection. OpenApi specification doesn't support websockets
you can use separate AsyncApi spec
.ws
routes do not even end up in the documentation at all in my app.
I am using elysiajs 1.0.13 and @elysiajs/swagger 1.0.3.
This is what ends up in the path property of the openapi config:
/v1/chat/{monitor-id}: {
$internalws: {
operationId: "$internalwsV1ChatByMonitor-id",
parameters: [
{
schema: {
type: "string"
},
in: "path",
name: "monitor-id",
required: true
}
],
responses: {
200: { }
}
}
},
hey @jonasfroeller OpenAPI is specific for REST based APIs
AsyncAPI is event driven APIs! I wonder if we should do an additional integration for AsyncAPI? and merge the two documents somehow. Honestly, something I've been thinking a lot about is having @scalar support both AsyncAPI + OpenAPI in one interface 🤔 maybe we should make this a higher priority!
app.ws()
doesnt seem to have thedetail
property and all the websocket routes are generated as if they are aGET
route