APIKey defines the attribute used to provide the API key to an endpoint secured with API keys. The parameters and usage of APIKey are the same as the Attribute function except that it accepts an extra first argument corresponding to the name of the API key security scheme. The generated code produc
(scheme, name string, args ...any)
| 507 | // }) |
| 508 | // }) |
| 509 | func APIKey(scheme, name string, args ...any) { |
| 510 | args = useDSL(args, func() { Meta("security:apikey:"+scheme, scheme) }) |
| 511 | Attribute(name, args...) |
| 512 | } |
| 513 | |
| 514 | // APIKeyField is syntactic sugar to define an API key attribute with the |
| 515 | // "rpc:tag" meta set with the value of the first argument. |