Skip to content

feat: add UpperCamelCase aliases for remaining access and input types#1920

Merged
morri-son merged 4 commits intoopen-component-model:mainfrom
morri-son:add-upper-camel-case-types-v2
Apr 21, 2026
Merged

feat: add UpperCamelCase aliases for remaining access and input types#1920
morri-son merged 4 commits intoopen-component-model:mainfrom
morri-son:add-upper-camel-case-types-v2

Conversation

@morri-son
Copy link
Copy Markdown
Contributor

@morri-son morri-son commented Apr 17, 2026

On-behalf-of: Gerald Morrison (SAP) gerald.morrison@sap.com

What this PR does / why we need it

Completes the UpperCamelCase type alias registration started in #1881. That PR covered helm, localBlob, ociBlob (access) and dir, file, helm, utf8 (input) but missed several access methods and input types.

This PR adds UpperCamelCase aliases for all remaining types:

Access methods:

  • gitHub → alias GitHub / GitHub/v1
  • npm → alias NPM / NPM/v1
  • wget → alias Wget / Wget/v1
  • git → alias Git / Git/v1alpha1
  • maven → alias Maven / Maven/v1

Input types (CLI):

  • git → alias Git
  • maven → alias Maven
  • npm → alias NPM
  • wget → alias Wget

No behavior change: all existing lowercase type strings continue to work. The new aliases ensure components authored with the new open-component-model monorepo bindings (which emit UpperCamelCase as primary) can be read by this legacy CLI.

Note: NPM follows the acronym convention used by OCIImage, UTF8, etc.

Documentation:
UpperCamelCase aliases are registered with empty usage text, so they are excluded from --help output and generated reference docs. A preamble note was added to the input type documentation stating that UpperCamelCase type names are aliases — check the corresponding lowercase entry for full documentation.

Related

@morri-son morri-son requested a review from a team as a code owner April 17, 2026 11:04
@github-actions github-actions Bot added kind/feature new feature, enhancement, improvement, extension area/documentation Documentation related component/ocm-cli OCM Command Line Interface size/l Large labels Apr 17, 2026
@morri-son morri-son force-pushed the add-upper-camel-case-types-v2 branch 2 times, most recently from da019a7 to ec8e323 Compare April 17, 2026 11:12
Comment thread api/ocm/extensions/accessmethods/github/method.go
Comment thread api/ocm/extensions/accessmethods/github/method.go
Comment thread docs/reference/ocm_add_resources.md Outdated
Comment thread api/ocm/extensions/accessmethods/wget/method.go
@morri-son morri-son linked an issue Apr 17, 2026 that may be closed by this pull request
7 tasks
@github-actions github-actions Bot added the component/github-actions Changes on GitHub Actions or within `.github/` directory label Apr 17, 2026
@morri-son morri-son enabled auto-merge (squash) April 17, 2026 18:10
Copy link
Copy Markdown
Contributor

@frewilhelm frewilhelm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there so much documentation removed?

Add UpperCamelCase type aliases for all access methods and input types
that were missing after open-component-model#1881. This completes the type notation alignment
per ocm-project#962 and ocm-spec#141.

Access methods: GitHub/v1, NPM/v1, Wget/v1, Git/v1alpha1, Maven/v1
Input types: Git, Maven, NPM, Wget, Binary, Docker, DockerMulti, Spiff, OCIArtifact

On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
… 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>
Usage() checked the computed usage string which always includes options
text even for alias types. Check the raw usage field on DefaultInputType
instead, so UpperCamelCase aliases with empty usage are excluded from
--help and generated reference docs. Add preamble note explaining the
aliases.

On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com>
Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
@morri-son morri-son force-pushed the add-upper-camel-case-types-v2 branch from dd8464c to eb95505 Compare April 21, 2026 11:21
@morri-son
Copy link
Copy Markdown
Contributor Author

morri-son commented Apr 21, 2026

@frewilhelm

Why is there so much documentation removed?

The removed entries (Dir, File, Helm, UTF8) were UpperCamelCase aliases that were previously duplicating the full documentation already present under their lowercase counterparts (dir, file, helm, utf8). The aliases are now registered with empty usage text so the doc generator skips them, and a preamble note was added explaining that UpperCamelCase names are aliases — refer to the lowercase entry for full docs. No content is lost.

@morri-son morri-son merged commit f5af619 into open-component-model:main Apr 21, 2026
45 checks passed
@morri-son morri-son deleted the add-upper-camel-case-types-v2 branch April 21, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Documentation related component/github-actions Changes on GitHub Actions or within `.github/` directory component/ocm-cli OCM Command Line Interface kind/feature new feature, enhancement, improvement, extension size/l Large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

align type notation for access and input

5 participants