Skip to content

Commit 6feed2e

Browse files
committed
Fix tests
1 parent 08fa3bc commit 6feed2e

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

tools/cli/internal/apiversion/stabilitylevel.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ var supportedValues = []string{StableStabilityLevel, PublicPreviewSabilityLevel,
3030

3131
// IsPreviewSabilityLevel checks if the version is a preview version, public or private.
3232
func IsPreviewSabilityLevel(value string) bool {
33-
// we also need string match given private preview versions like "private-preview-<name>"
3433
return IsPrivatePreviewSabilityLevel(value) || IsPublicPreviewSabilityLevel(value)
3534
}
3635

tools/cli/internal/apiversion/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func withContent(contentType string) Option {
104104
// WithFullContent returns an Option to generate a new APIVersion given the contentType and contentValue.
105105
func WithFullContent(contentType string, contentValue *openapi3.MediaType) Option {
106106
return func(v *APIVersion) error {
107-
if !IsPreviewSabilityLevel(contentType) {
107+
if !strings.Contains(contentType, PreviewStabilityLevel) {
108108
return withContent(contentType)(v)
109109
}
110110

0 commit comments

Comments
 (0)