Skip to content

Commit 65ec8b5

Browse files
ndeloofglours
authored andcommitted
introduce mode_var for model binding
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent cca8bd0 commit 65ec8b5

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

loader/loader_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3875,6 +3875,7 @@ services:
38753875
models:
38763876
foo:
38773877
endpoint_var: MODEL_URL
3878+
model_var: MODEL
38783879
38793880
models:
38803881
foo:
@@ -3895,6 +3896,7 @@ models:
38953896
assert.DeepEqual(t, p.Services["test_mapping"].Models, map[string]*types.ServiceModelConfig{
38963897
"foo": {
38973898
EndpointVariable: "MODEL_URL",
3899+
ModelVariable: "MODEL",
38983900
},
38993901
})
39003902
}

types/derived.gen.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

types/models.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ type ModelConfig struct {
2626

2727
type ServiceModelConfig struct {
2828
EndpointVariable string `yaml:"endpoint_var,omitempty" json:"endpoint_var,omitempty"`
29+
ModelVariable string `yaml:"model_var,omitempty" json:"model_var,omitempty"`
2930
Extensions Extensions `yaml:"#extensions,inline,omitempty" json:"-"`
3031
}

0 commit comments

Comments
 (0)