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

syntax error: expected ':' | 'IDENT' | 'INT', got '(' #3848

Closed
cloudmer opened this issue Jan 14, 2024 · 1 comment
Closed

syntax error: expected ':' | 'IDENT' | 'INT', got '(' #3848

cloudmer opened this issue Jan 14, 2024 · 1 comment

Comments

@cloudmer
Copy link

cloudmer commented Jan 14, 2024

Describe the bug

@server(
    group: user
    prefix: user
    jwt: JwtAuth
    middleware: Authorization, Casbin
)

service manage {

    @doc "user list"
    @handler List
    post /list (UserListRequest) returns (UserListResponse)

    @doc "create user"
    @handler Create
    post / (CreateUserRequest) returns (CreateUserResponse)

}
goctl api go -api *.api -dir ../  --style=goZero
syntax error: expected ':' | 'IDENT' | 'INT', got '('

The location of the problem is

    post / (CreateUserRequest) returns (CreateUserResponse)

Expected behavior

post / 

The goctl API seems to force me to write an address, hoping that previous versions do not force me to write an address

Screenshots
image

Environments (please complete the following information):

  • OS: [macOS sonoma version:14.2.1]
  • go-zero version [github.com/zeromicro/go-zero v1.6.1]
  • goctl version [goctl version 1.6.1 darwin/arm64]
@kesonan
Copy link
Collaborator

kesonan commented Jan 16, 2024

This issue has been fixed in #3834

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

No branches or pull requests

2 participants