-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
The following fails
gorun --org=$ORG --region=us-central1 apihub apis versions specs update \
--api-id=apigeecli-api-v1 \
--id=spec-v1_0_0_0 \
--version=v1_0_0_0 \
--display-name=apigeecli-api-v1-spec-v1_0_0_0 \
--file=apihub/foodtrucks.yaml
{
"error": {
"code": 400,
"message": "source_uri cannot be updated if spec contains contents",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "SPEC_INVALID_ARGUMENT",
"domain": "apihub.googleapis.com"
}
]
}
}
Couple issues:
spec_type cannot be specified in updateMask
documentation is not supported in updateMask
contents and source_uri are mutually exclusive.
See docs for details: https://cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.apis.versions.specs/patch
In hub.go
q.Set("updateMask", "display_name,source_uri,documentation,contents,spec_type")
should be built dynamically based on the input command.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working