[CLI-3777] Update the description of the --context-type flag for schema exporter to reflect current options#3239
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
Pull request overview
This PR updates the --context-type flag description for the Cloud confluent schema-registry exporter create and update commands to include the "default" option, which is already accepted by the backend and documented publicly but was missing from the CLI help text.
Key changes:
- Modified the
addContextTypeFlagfunction to conditionally include "default" as a valid context type for Cloud environments - Updated test fixtures to reflect the new help text output
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/schema-registry/command_exporter.go | Updated addContextTypeFlag to conditionally add "default" option for Cloud and sort the options alphabetically |
| internal/schema-registry/command_exporter_create.go | Updated call to addContextTypeFlag to pass cloud login status |
| internal/schema-registry/command_exporter_update.go | Updated call to addContextTypeFlag to pass cloud login status |
| test/fixtures/output/schema-registry/exporter/create-help.golden | Updated expected help text to include "default" option |
| test/fixtures/output/schema-registry/exporter/update-help.golden | Updated expected help text to include "default" option |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|




Release Notes
Breaking Changes
New Features
Bug Fixes
--context-typeflag for the Cloudconfluent schema-registry exporter [create | update]commands to include the "default" optionChecklist
Whatsection below whether this PR applies to Confluent Cloud, Confluent Platform, or both.Test & Reviewsection below.Blast Radiussection below.What
Our public Cloud documentation lists "DEFAULT" as a valid
context-type: https://docs.confluent.io/cloud/current/sr/schema-linking.htmlThe backend also accepts this value. But our flag description only listed the other three, so this PR is to correct that.
Edit: Only implemented for Cloud; the On-Prem API documentation does not list "default" as an accepted option.
Blast Radius
Zero. This is a documentation change. The underlying functionality is unchanged.
References
Test & Review
Help menu:
Same for update:
Next, some sanity checking that this context type is accepted by the backend.
Create:
Create w/ an invalid context type to double check that the backend doesn't accept arbitrary values:
Update: