Closed JermineHu closed 4 years ago
My dsl code:
Method("broker", func() { NoSecurity() Payload(func() { Field(1, "token", String, "JWTAuth token used to perform authorization", func() { }) Field(2, "host_id", UInt64, "host_id", func() { }) Required("host_id") }) StreamingPayload(func() { Field(1, "type", String, "type value", func() { Enum("heartbeat", "keyboard") }) Field(2, "keyboard_info", Keyboard, "keyboard info") Field(3, "ext", String, "other info") }) StreamingResult(func() { Field(1, "type", String, "type value", func() { Enum("heartbeat", "keyboard") }) Field(2, "keyboard_info", Keyboard, "keyboard info") Field(3, "ext", String, "other info") }) Error("BadRequest") HTTP(func() { GET("/broker/{host_id}") Response(StatusOK) Header("token:Authorization", String, "Auth token", func() { //Pattern("^Bearer [^ ]+$") }) Response("BadRequest", StatusBadRequest) }) GRPC(func() { Response(CodeOK) Response("BadRequest", CodeFailedPrecondition) }) })
My code compile error info :
../../gen/http/keyboard/server/websocket.go:133:36: cannot use &body (type **BrokerStreamingBody) as type *BrokerStreamingBody in argument to ValidateBrokerStreamingBody
Thank you for the detailed report, looks like a bug.
Thank you for the report and for including a repro. This is now fixed.
My dsl code:
My code compile error info :