Skip to content

Commit c2b1b9f

Browse files
committed
fix: address review feedback — revert Is() changes, deduplicate input type docs
- Revert Is() changes in github/method.go and wget/method.go to match open-component-model#1881 pattern (don't touch existing functions) - Register UPPER_TYPE input types without usage text to avoid duplicate entries in generated reference docs (all 8: dir, file, git, helm, maven, npm, utf8, wget) - Regenerate docs/reference/ — removes ~1000 lines of duplicated content On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com> Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
1 parent 0658e9e commit c2b1b9f

14 files changed

Lines changed: 10 additions & 1006 deletions

File tree

api/ocm/extensions/accessmethods/github/method.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func init() {
5353
}
5454

5555
func Is(spec accspeccpi.AccessSpec) bool {
56-
return spec != nil && (spec.GetKind() == Type || spec.GetKind() == LegacyType || spec.GetKind() == UpperType)
56+
return spec != nil && spec.GetKind() == Type || spec.GetKind() == LegacyType
5757
}
5858

5959
// AccessSpec describes the access for a GitHub registry.

api/ocm/extensions/accessmethods/wget/method.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func init() {
3434
}
3535

3636
func Is(spec accspeccpi.AccessSpec) bool {
37-
return spec != nil && (spec.GetKind() == Type || spec.GetKind() == UpperType)
37+
return spec != nil && spec.GetKind() == Type
3838
}
3939

4040
// New creates a new WGET accessor for http resources.

cmds/ocm/commands/ocmcmds/common/inputs/types/directory/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const (
1212

1313
func init() {
1414
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(TYPE, &Spec{}, usage, ConfigHandler()))
15-
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{}, usage, ConfigHandler()))
15+
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{}, "", ConfigHandler()))
1616
}
1717

1818
const usage = `

cmds/ocm/commands/ocmcmds/common/inputs/types/file/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ func init() {
1313
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(TYPE, &Spec{},
1414
Usage("The path must denote a file relative the resources file. "), ConfigHandler()))
1515
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{},
16-
Usage("The path must denote a file relative the resources file. "), ConfigHandler()))
16+
"", ConfigHandler()))
1717
}

cmds/ocm/commands/ocmcmds/common/inputs/types/git/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const (
1212

1313
func init() {
1414
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(TYPE, &Spec{}, usage, ConfigHandler()))
15-
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{}, usage, ConfigHandler()))
15+
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{}, "", ConfigHandler()))
1616
}
1717

1818
const usage = `

cmds/ocm/commands/ocmcmds/common/inputs/types/helm/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const (
1111

1212
func init() {
1313
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(TYPE, &Spec{}, usage, ConfigHandler()))
14-
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{}, usage, ConfigHandler()))
14+
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{}, "", ConfigHandler()))
1515
}
1616

1717
const usage = `

cmds/ocm/commands/ocmcmds/common/inputs/types/maven/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const (
1111

1212
func init() {
1313
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(TYPE, &Spec{}, usage, ConfigHandler()))
14-
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{}, usage, ConfigHandler()))
14+
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{}, "", ConfigHandler()))
1515
}
1616

1717
const usage = `

cmds/ocm/commands/ocmcmds/common/inputs/types/npm/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const (
1111

1212
func init() {
1313
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(TYPE, &Spec{}, usage, ConfigHandler()))
14-
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{}, usage, ConfigHandler()))
14+
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{}, "", ConfigHandler()))
1515
}
1616

1717
const usage = `

cmds/ocm/commands/ocmcmds/common/inputs/types/utf8/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func init() {
1414
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(TYPE, &Spec{},
1515
usage, ConfigHandler()))
1616
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{},
17-
usage, ConfigHandler()))
17+
"", ConfigHandler()))
1818
}
1919

2020
const usage = `

cmds/ocm/commands/ocmcmds/common/inputs/types/wget/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const (
1212

1313
func init() {
1414
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(TYPE, &Spec{}, usage, ConfigHandler()))
15-
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{}, usage, ConfigHandler()))
15+
inputs.DefaultInputTypeScheme.Register(inputs.NewInputType(UPPER_TYPE, &Spec{}, "", ConfigHandler()))
1616
}
1717

1818
const usage = `

0 commit comments

Comments
 (0)