Skip to content

Commit 50c6cdc

Browse files
fixes
1 parent bdd0757 commit 50c6cdc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tools/cli/internal/apiversion/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func Parse(contentType string) (string, error) {
157157
}
158158

159159
if len(matches) == 3 {
160-
return fmt.Sprintf("%s-%s-%s", matches[1], matches[2], matches[3]), nil
160+
return fmt.Sprintf("%s-%s-%s", matches[2], matches[3], matches[4]), nil
161161
}
162162

163163
return matches[1], nil

tools/cli/internal/openapi/filter/info.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"github.com/mongodb/openapi/tools/cli/internal/apiversion"
2121
)
2222

23-
// Filter: InfoFilter is a filter that modifies the Info object in the OpenAPI spec.
23+
// InfoFilter is a filter that modifies the Info object in the OpenAPI spec.
2424
type InfoFilter struct {
2525
oas *openapi3.T
2626
metadata *Metadata
@@ -44,6 +44,6 @@ func replaceVersion(input string, v *apiversion.APIVersion) string {
4444
return input // No match found, return the original string
4545
}
4646

47-
replacement := fmt.Sprintf("application/vnd.atlas.%s+%s", v.String(), matches[4])
47+
replacement := fmt.Sprintf("application/vnd.atlas.%s+%s", v.String(), matches[5])
4848
return apiversion.ContentPattern.ReplaceAllString(input, replacement)
4949
}

0 commit comments

Comments
 (0)