Skip to content

Commit 601cd01

Browse files
committed
Added required validation for flags in hasura config.
1 parent c927d31 commit 601cd01

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

config/config.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ type Hasura struct {
5757
RowsLimit uint64 `yaml:"select_limit" validate:"gt=0"`
5858
EnableAggregations bool `yaml:"allow_aggregation"`
5959
AddSource bool `yaml:"add_source"`
60-
Source *HasuraSource `yaml:"source" validate:"omitempty"`
60+
Source *HasuraSource `yaml:"source"`
6161
Rest *bool `yaml:"rest"`
6262
}
6363

6464
type HasuraSource struct {
6565
Name string `yaml:"name" validate:"required"`
66-
DatabaseHost string `yaml:"database_host" validate:"omitempty"`
67-
UsePreparedStatements bool `yaml:"use_prepared_statements"`
68-
IsolationLevel string `yaml:"isolation_level"`
66+
DatabaseHost string `yaml:"database_host"`
67+
UsePreparedStatements bool `yaml:"use_prepared_statements" validate:"required"`
68+
IsolationLevel string `yaml:"isolation_level" validate:"required"`
6969
}
7070

7171
// UnmarshalYAML -

0 commit comments

Comments
 (0)