Skip to content

Commit 7fc074f

Browse files
jliusantadelesh
andauthored
Fix wrong parsing logic for module name config for swagger with major version suffix. (#25613)
* fix suffix * update version * Update CHANGELOG.md --------- Co-authored-by: Chenjie Shi <[email protected]>
1 parent 84007fb commit 7fc074f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

eng/tools/generator/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release History
22

3+
## 0.3.1 (2025-11-13)
4+
5+
### Bugs Fixed
6+
7+
- Fix wrong parsing logic for module name config for swagger with major version suffix.
8+
39
## 0.3.0 (2025-11-11)
410

511
### Features Added

eng/tools/generator/cmd/v2/common/fileProcessor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func ReadV2ModuleNameToGetNamespace(path string) (map[string][]PackageInfo, erro
112112
for _, line := range section {
113113
if strings.HasPrefix(line, swagger_md_module_name_prefix) {
114114
modules := strings.Split(strings.TrimSpace(line[len(swagger_md_module_name_prefix):]), "/")
115-
if len(modules) != 4 {
115+
if len(modules) != 4 && len(modules) != 5 {
116116
return nil, fmt.Errorf("cannot parse module name from `track2` section")
117117
}
118118
namespaceName := strings.TrimSuffix(strings.TrimSuffix(modules[3], "\n"), "\r")

eng/tools/generator/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ package main
55

66
const (
77
moduleName = "github.com/Azure/azure-sdk-for-go/eng/tools/generator"
8-
moduleVersion = "v0.3.0"
8+
moduleVersion = "v0.3.1"
99
)

0 commit comments

Comments
 (0)