mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-01-11 08:28:11 -05:00
fix(sources/looker): Allow Looker to be configured without setting a Client Id or Secret (#1496)
Fixed a minor oversight from previous work on oauth.
This commit is contained in:
@@ -64,6 +64,7 @@ In this section, we will download Toolbox and run the Toolbox server.
|
||||
```bash
|
||||
export LOOKER_BASE_URL=https://looker.example.com
|
||||
export LOOKER_VERIFY_SSL=true
|
||||
export LOOKER_USE_CLIENT_OAUTH=true
|
||||
```
|
||||
|
||||
In some instances you may need to append `:19999` to
|
||||
|
||||
@@ -58,8 +58,8 @@ type Config struct {
|
||||
Name string `yaml:"name" validate:"required"`
|
||||
Kind string `yaml:"kind" validate:"required"`
|
||||
BaseURL string `yaml:"base_url" validate:"required"`
|
||||
ClientId string `yaml:"client_id" validate:"required"`
|
||||
ClientSecret string `yaml:"client_secret" validate:"required"`
|
||||
ClientId string `yaml:"client_id"`
|
||||
ClientSecret string `yaml:"client_secret"`
|
||||
SslVerification bool `yaml:"verify_ssl"`
|
||||
UseClientOAuth bool `yaml:"use_client_oauth"`
|
||||
Timeout string `yaml:"timeout"`
|
||||
|
||||
@@ -100,10 +100,8 @@ func TestFailParseFromYamlLooker(t *testing.T) {
|
||||
sources:
|
||||
my-looker-instance:
|
||||
kind: looker
|
||||
base_url: http://example.looker.com/
|
||||
client_id: jasdl;k;tjl
|
||||
`,
|
||||
err: "unable to parse source \"my-looker-instance\" as \"looker\": Key: 'Config.ClientSecret' Error:Field validation for 'ClientSecret' failed on the 'required' tag",
|
||||
err: "unable to parse source \"my-looker-instance\" as \"looker\": Key: 'Config.BaseURL' Error:Field validation for 'BaseURL' failed on the 'required' tag",
|
||||
},
|
||||
}
|
||||
for _, tc := range tcs {
|
||||
|
||||
Reference in New Issue
Block a user