FAQ

1. How do I experience new API features?

api New Feature is currently in the testing stage. If you want to experience a new feature, you can install the latest goctl tool by commanding, and you need to turn on GOCTL_EXPERIMENTAL.

  1. $ goctl env -w GOCTL_EXPERIMENTAL=on

Support for API new features starting from version 1.5.1, including:

  1. Data type supports array type
  2. Support Tag Ignore
  3. Pure numbers are supported by routes, e.g. /abc/123/
  4. api resolver migrated from antlr4 to goparser

Surely 1.5.1 If new features are enabled, there are some incompatible places

  1. syntax header is required

Data type is referenced Type Statement • Examples in goctl 1.5.1 some description

2. goctl api generated error: multiple service names defined…

Declares multiple services are not supported in api syntax files such as writing below as unsupported:

  1. service foo {
  2. @handler fooPing
  3. get /foo/ping
  4. }
  5. service bar {
  6. @handler barPing
  7. get /bar/ping
  8. }

The grey bottom texture section foo and bar is not supported and can only declare a service like:

  1. service foo {
  2. @handler fooPing
  3. get /foo/ping
  4. }
  5. service foo {
  6. @handler barPing
  7. get /bar/ping
  8. }

3. goctl api does not support any type

Generic and weak types are not supported in api syntax.