Summary
Live CLI validation against API7 EE found that several update commands fail when using flag mode because they send only the changed fields to endpoints that require a full PUT payload.
Affected commands:
a7 credential update: omits existing name and plugins when only --desc or --labels is provided.
a7 proto update: omits existing content when only --desc or --labels is provided.
a7 gateway-group update: omits required name when only --description or --labels is provided.
Expected behavior
Flag-based update commands should behave as partial updates from the user perspective:
- Read the current resource.
- Merge only the fields provided by flags.
- Send a full PUT payload that satisfies the API schema.
File-based update mode should keep replacing the resource with the provided file payload.
Validation target
Add unit tests to ensure the generated PUT payload preserves existing required fields when omitted by flags.
Summary
Live CLI validation against API7 EE found that several update commands fail when using flag mode because they send only the changed fields to endpoints that require a full PUT payload.
Affected commands:
a7 credential update: omits existingnameandpluginswhen only--descor--labelsis provided.a7 proto update: omits existingcontentwhen only--descor--labelsis provided.a7 gateway-group update: omits requirednamewhen only--descriptionor--labelsis provided.Expected behavior
Flag-based update commands should behave as partial updates from the user perspective:
File-based update mode should keep replacing the resource with the provided file payload.
Validation target
Add unit tests to ensure the generated PUT payload preserves existing required fields when omitted by flags.