Skip to content

Commit

Permalink
feat: add features config
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanSpeakEasy committed Aug 3, 2023
1 parent 44884a5 commit e8ef96e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ type Config struct {
Generation Generation `yaml:"generation"`
Languages map[string]LanguageConfig `yaml:",inline"`
New bool `yaml:"-"`
Features map[string]string `yaml:"features,omitempty"`
}

type PublishWorkflow struct {
Expand Down Expand Up @@ -140,6 +141,7 @@ func GetDefaultConfig(getLangDefaultFunc GetLanguageDefaultFunc, langs ...string
},
},
Languages: map[string]LanguageConfig{},
Features: map[string]string{},
}

for _, lang := range langs {
Expand Down
10 changes: 9 additions & 1 deletion io_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ func TestLoad_Success(t *testing.T) {
SingleTagPerOp: false,
},
},
New: true,
New: true,
Features: map[string]string{},
},
},
{
Expand Down Expand Up @@ -75,6 +76,7 @@ func TestLoad_Success(t *testing.T) {
DisableComments: false,
},
},
Features: map[string]string{},
},
},
{
Expand Down Expand Up @@ -110,6 +112,9 @@ func TestLoad_Success(t *testing.T) {
OmitDescriptionIfSummaryPresent: true,
},
},
Features: map[string]string{
"core": "2.90.0",
},
},
},
{
Expand Down Expand Up @@ -145,6 +150,9 @@ func TestLoad_Success(t *testing.T) {
OmitDescriptionIfSummaryPresent: true,
},
},
Features: map[string]string{
"core": "2.90.0",
},
},
},
}
Expand Down
2 changes: 2 additions & 0 deletions testdata/current-gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ management:
docChecksum: 2bba3b8f9d211b02569b3f9aff0d34b4
docVersion: 0.3.0
speakeasyVersion: 1.3.1
features:
core: 2.90.0

0 comments on commit e8ef96e

Please sign in to comment.