Skip to content

feat: support JSON file input for API Hub deployment create/update (#680, #698)#722

Open
saiflayouni wants to merge 1 commit into
apigee:mainfrom
saiflayouni:fix/apihub-deployment-from-file
Open

feat: support JSON file input for API Hub deployment create/update (#680, #698)#722
saiflayouni wants to merge 1 commit into
apigee:mainfrom
saiflayouni:fix/apihub-deployment-from-file

Conversation

@saiflayouni

Copy link
Copy Markdown

Summary

  • Adds --file/-f flag to both apigeecli apihub deployments create and update
  • When --file is set, the command reads raw JSON from the file and POSTs/PATCHes it directly, bypassing individual field flags
  • This enables users to specify custom attributes (and any other API fields) that have no dedicated CLI flags
  • Adds hub.CreateDeploymentFromFile and hub.UpdateDeploymentFromFile to the hub client package

Test plan

  • apigeecli apihub deployments create --file deployment.json creates the deployment using the file body
  • apigeecli apihub deployments update --id <id> --file deployment.json patches using the file body
  • Existing flag-based create/update still works when --file is not set

Closes #680, #698

🤖 Generated with Claude Code

@google-cla

google-cla Bot commented Jun 30, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

…pigee#680, apigee#698)

- Add `CreateDeploymentFromFile` and `UpdateDeploymentFromFile` to the hub client
  to POST/PATCH raw JSON, which allows any attribute supported by the API
- Add `--file`/`-f` flag to `apigeecli apihub deployments create` and `update`
- When `--file` is provided the individual field flags are ignored, enabling
  users to pass custom attributes that have no dedicated flags
@saiflayouni
saiflayouni force-pushed the fix/apihub-deployment-from-file branch from c191f87 to 3494ae8 Compare July 1, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR] Add possibility to pass a -f JSON file to apihub deployments create

1 participant