WithSwaggerRoutePrefix prepends the given prefix to every route walked from the chi router. Use this when calling VerifySwaggerDefinitions with a subrouter (for example api.APIHandler at /api/v2) so that routes line up with the absolute paths used in @Router annotations.
(prefix string)
| 159 | // subrouter (for example api.APIHandler at /api/v2) so that routes line up |
| 160 | // with the absolute paths used in @Router annotations. |
| 161 | func WithSwaggerRoutePrefix(prefix string) SwaggerOption { |
| 162 | return func(o *swaggerOptions) { |
| 163 | o.routePrefix = prefix |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | func isExperimentalEndpoint(route string) bool { |
| 168 | return strings.HasPrefix(route, "/api/v2/workspaceagents/me/experimental/") |
no outgoing calls