Use the interface
keyword to define REST API shapes.
interface API
Multiple definitions are also supported.
interface API1
interface API2
Each definition is transpiled to the target languageโs equivalent of an interface during code generation.
Inside an interface, define methods with the function
keyword.
You can specify argument and return types. Arguments map to query parameters.
interface API
Use the @body
keyword to specify the HTTP request body type.
type BodyType
interface API