Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generated cli: expected type, found newline #3527

Closed
gregwebs opened this issue Jun 7, 2024 · 4 comments · Fixed by #3532
Closed

generated cli: expected type, found newline #3527

gregwebs opened this issue Jun 7, 2024 · 4 comments · Fixed by #3532

Comments

@gregwebs
Copy link

gregwebs commented Jun 7, 2024

	Method("proxy-sentry", func() {
		HTTP(func() {
			POST("/proxy/sentry")
			SkipRequestBodyEncodeDecode()
		})
	})
.../gen/http/cli/customer/cli.go:349:9: expected type, found newline

========
Content:
// Code generated by goa v3.16.2, DO NOT EDIT.

...
				data, err = customerpublicc.BuildEnrollmentScreeningPayload(*customerPublicEnrollmentScreeningBodyFlag, )
			case "proxy-sentry":
				endpoint = c.ProxySentry()
				var err error
var val
err = json.Unmarshal([]byte(*customerPublicProxySentryStreamFlag), &val)
data = val
if err != nil {
return nil, nil, fmt.Errorf("invalid JSON for customerPublicProxySentryStreamFlag, \nerror: %!s(MISSING), \nexample of valid JSON:\n%!s(MISSING)", err, "\"goa.png\"")
}
					data, err = customerpublicc.BuildProxySentryStreamPayload(data, *customerPublicProxySentryStreamFlag)
			}
@gregwebs
Copy link
Author

gregwebs commented Jun 7, 2024

Is there an option to not generate the CLI?

@tchssk
Copy link
Member

tchssk commented Jun 9, 2024

There is no such feature as standard, but it can be resolved with a plugin.
https://github.com/tchssk/goaplugins/tree/master/codegendisabler

import  _ "github.com/tchssk/goaplugins/v3/codegendisabler/gen/http/cli/cli"

@gregwebs
Copy link
Author

@tchssk thank you that was a nice workaround.

@raphael
Copy link
Member

raphael commented Jun 15, 2024

Thanks for bringing this up, #3532 should fix the original code generation issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants