Skip to content

Conversation

@mgajda
Copy link

@mgajda mgajda commented Jan 22, 2026

Summary

This PR improves how parameter types are displayed in the OCI CLI help text, making it clearer what kind of input each parameter expects.

Changes

1. New CliOcidType for OCID Parameters

  • OCID parameters now display as OCID instead of TEXT in help text
  • Updated 284 service files with proper OCID parameter types
  • Helps users immediately identify which parameters expect Oracle Cloud Identifiers

2. Enhanced CliComplexType for JSON Parameters

  • Complex parameters now display as JSON instead of COMPLEX TYPE
  • Updated help text to clarify "JSON object" expectation
  • Added foundation for future schema-specific type hints

Examples

Before:

-c, --compartment-id TEXT       The OCID of the compartment. [required]
--agent-config COMPLEX TYPE     This is a complex type whose value must be...
--shape-config COMPLEX TYPE     This is a complex type whose value must be...
--subnet-id TEXT                The OCID of the subnet where the VNIC

After:

-c, --compartment-id OCID       The OCID of the compartment. [required]
--agent-config JSON             This is a JSON object whose value must be...
--shape-config JSON             This is a JSON object whose value must be...
--subnet-id OCID                The OCID of the subnet where the VNIC

Testing

Tested locally with:

oci compute instance launch --help

The parameter types now clearly indicate whether they expect an OCID or JSON input, improving the user experience.

Impact

  • User Experience: Clearer parameter type information in help text
  • No Breaking Changes: Only affects help text display, not functionality
  • Backward Compatible: All existing scripts and commands continue to work

Files Changed

  • Added src/oci_cli/custom_types/cli_ocid_type.py - New OCID type
  • Modified src/oci_cli/custom_types/cli_complex_type.py - Enhanced for JSON display
  • Updated src/oci_cli/custom_types/__init__.py - Export new type
  • Updated 284 service CLI files with proper type annotations

@oracle-contributor-agreement
Copy link

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Jan 22, 2026
This commit introduces improvements to how parameter types are displayed in the OCI CLI help text:

1. Added new CliOcidType custom type for OCID parameters
   - OCID parameters now show as "OCID" instead of "TEXT" in help
   - Covers 284 service files with OCID parameter updates
   - Helps users understand which parameters expect Oracle Cloud Identifiers

2. Enhanced CliComplexType to show "JSON" instead of "COMPLEX TYPE"
   - Complex parameters now clearly indicate they expect JSON input
   - Added support for schema-specific type hints (future enhancement)
   - Updated help text to clarify JSON object expectation

These changes improve the user experience by providing clearer type information
in command help text, making it easier to understand what kind of input each
parameter expects.
@mgajda mgajda force-pushed the improve-parameter-type-descriptions branch from c327fa7 to ebae7f3 Compare January 22, 2026 23:54
@oracle-contributor-agreement
Copy link

Thank you for signing the OCA.

@oracle-contributor-agreement oracle-contributor-agreement bot added OCA Verified All contributors have signed the Oracle Contributor Agreement. and removed OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. labels Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant