How to update plugin to Goa 3.22? #3823
Unanswered
jachym-tousek-keboola
asked this question in
Q&A
Replies: 1 comment 4 replies
-
|
Good question! This change was needed to enable JSON-RPC code generation where the HTTP expressions have to be modified in-situ. It was not possible to keep the global variable to avoid affecting the standard HTTP code generation. The set of HTTP services should now be computed on-demand from the root expression as follows: import "goa.design/goa/v3/expr"
import "goa.design/goa/v3/codegen/service"
import httpcodegen "goa.design/goa/v3/http/codegen"
// ...
services := service.NewServicesData(expr.Root)
httpServices := httpcodegen.NewServicesData(services, expr.Root.API.HTTP)see https://github.com/goadesign/goa/blob/v3/codegen/generator/transport.go for details. Sorry about the breaking change! |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We have a plugin which was using
codegen.HTTPServices: https://github.com/keboola/keboola-as-code/blob/7e9dd5a81872aaffb7df871247a6dfcd97cfa8b3/internal/pkg/service/common/goaextension/errormsg/error.go#L28Now in Goa 3.22 this global variable was removed: c0023b3#diff-a7bccd2240d1b5ac8c9932db99fc5aee8a4f45e81273ad7f2537a51fccec8f35
Can I get some advice how to correctly adjust the plugin?
Beta Was this translation helpful? Give feedback.
All reactions