What you’ll need to do in this case is use the .requestSchema / .responseSchema methods on the web socket output. The schema can be derived, though you’ll need to transform it so that it’s a schema for WebSocketFrame: this disables run-time validations, but the documentations should be ok. For example:
case class MyFrame(data: String)
val myWsOutput = webSocketBodyRaw(AkkaStreams)
.requestsSchema(Schema.derived[MyFrame].as[WebSocketFrame])
endpoint.out(myWsOutput)