diff --git a/docs/server/docs.go b/docs/server/docs.go index 8064f0c60f..31b8381ab1 100644 --- a/docs/server/docs.go +++ b/docs/server/docs.go @@ -279,8 +279,7 @@ const docTemplate = `{ "type": "boolean" }, "timeout": { - "example": "5m", - "type": "string" + "type": "integer" }, "token_url": { "type": "string" diff --git a/docs/server/swagger.json b/docs/server/swagger.json index 5d088cafa1..60f5420a1e 100644 --- a/docs/server/swagger.json +++ b/docs/server/swagger.json @@ -272,8 +272,7 @@ "type": "boolean" }, "timeout": { - "example": "5m", - "type": "string" + "type": "integer" }, "token_url": { "type": "string" diff --git a/docs/server/swagger.yaml b/docs/server/swagger.yaml index 06e62c5642..3621466d74 100644 --- a/docs/server/swagger.yaml +++ b/docs/server/swagger.yaml @@ -267,8 +267,7 @@ components: skip_browser: type: boolean timeout: - example: 5m - type: string + type: integer token_url: type: string use_pkce: diff --git a/pkg/auth/remote/config.go b/pkg/auth/remote/config.go index 049e5ab6b2..5921f819cb 100644 --- a/pkg/auth/remote/config.go +++ b/pkg/auth/remote/config.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "github.com/stacklok/toolhive-core/registry/types" + registry "github.com/stacklok/toolhive-core/registry/types" httpval "github.com/stacklok/toolhive-core/validation/http" ) @@ -23,7 +23,7 @@ type Config struct { ClientSecretFile string `json:"client_secret_file,omitempty" yaml:"client_secret_file,omitempty"` Scopes []string `json:"scopes,omitempty" yaml:"scopes,omitempty"` SkipBrowser bool `json:"skip_browser,omitempty" yaml:"skip_browser,omitempty"` - Timeout time.Duration `json:"timeout,omitempty" yaml:"timeout,omitempty" swaggertype:"string" example:"5m"` + Timeout time.Duration `json:"timeout,omitempty" yaml:"timeout,omitempty" swaggertype:"primitive,integer"` CallbackPort int `json:"callback_port,omitempty" yaml:"callback_port,omitempty"` UsePKCE bool `json:"use_pkce" yaml:"use_pkce"`