You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Endpoint:**`GET /openapi` (or custom path via `-openapi-path`)
87
+
88
+
**Availability:** Only when the server is started with the `-openapi` flag (or `OPENAPI_ENABLED=true`). Not exposed by default. Recommend use only for debugging or intranet.
89
+
90
+
**Description:** Returns the OpenAPI 3.0.x specification (JSON) for the webhook HTTP API. Use with Swagger UI, Swagger Editor, or client code generators.
Copy file name to clipboardExpand all lines: docs/en-US/Webhook-Parameters.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,6 +130,16 @@ This document describes all available command-line parameters and environment va
130
130
|`-audit-workers int`| Number of audit async write workers |`2`|
131
131
|`-audit-mask-ip`| Mask IP addresses in audit logs |`true`|
132
132
133
+
### OpenAPI
134
+
135
+
| Flag | Description | Default |
136
+
|------|-------------|---------|
137
+
|`-openapi`| Enable OpenAPI spec: serve at openapi-path and/or print to stdout; recommend only for debugging or intranet |`false`|
138
+
|`-openapi-path string`| HTTP path for OpenAPI spec when openapi is enabled |`/openapi`|
139
+
|`-openapi-print`| Print OpenAPI spec to stdout at startup when openapi is enabled |`false`|
140
+
141
+
*Note:* When `-openapi` is set, the spec is available via GET at `-openapi-path` (e.g. `/openapi`) and can be used with Swagger UI or client code generation. Use only in debugging or intranet environments. Do not set `-openapi-path` to a reserved path (e.g. `/`, `/health`, `/version`, `/metrics`, or the hooks prefix like `/hooks`); if you do, the OpenAPI route will not be registered and a warning will be logged.
142
+
133
143
### Other
134
144
135
145
| Flag | Description | Default |
@@ -256,6 +266,14 @@ All command-line parameters can also be set via environment variables:
Copy file name to clipboardExpand all lines: internal/flags/config.go
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,11 @@ func ParseConfig() AppFlags {
87
87
fs.Int("audit-workers", DEFAULT_AUDIT_WORKERS, "number of audit async write workers (default 2)")
88
88
fs.Bool("audit-mask-ip", DEFAULT_AUDIT_MASK_IP, "mask IP addresses in audit logs (default true)")
89
89
90
+
// OpenAPI flags (recommend only for debugging or intranet)
91
+
fs.Bool("openapi", DEFAULT_OPENAPI_ENABLED, "enable OpenAPI spec: serve at openapi-path and/or print to stdout; recommend only for debugging or intranet (default false)")
92
+
fs.String("openapi-path", DEFAULT_OPENAPI_PATH, "HTTP path for OpenAPI spec when openapi is enabled (default /openapi)")
93
+
fs.Bool("openapi-print", DEFAULT_OPENAPI_PRINT, "print OpenAPI spec to stdout at startup when openapi is enabled (default false)")
94
+
90
95
showVersion:=fs.Bool("version", false, "display webhook version and quit")
91
96
validateConfig:=fs.Bool("validate-config", false, "validate configuration and exit")
0 commit comments