You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
publish --delete-unmatched fails on APIs with revisions #260
When pruning an API that has multiple revisions, the delete set contains both the base
API (e.g. my-api) and its revision entries (e.g. my-api;rev=2). The CLI deletes the
individual revision(s) and then the base API. APIM rejects the base/current-revision
delete:
ERROR DELETE api/my-api: Async operation failed for apis/my-api:
[ValidationError] Cannot delete the current revision of an API.
Root cause
The delete phase treats API revisions as independent resources and issues a DELETE for
each, including one that resolves to the current revision. APIM does not allow deleting
the current revision of an API individually, the whole API must be deleted (which removes
all revisions), or all non-current revisions must be removed before the API itself.
Expected behavior
Deleting an API that has revisions should remove the entire API (and all revisions) in a
single operation against the base API id, or
Non-current revisions should be deleted first and the current revision only via the
whole-API delete, never as an individual current-revision delete.
Activity
[-]`publish` delete fails on APIs with revisions[/-][+]`publish` --delete-unmatched fails on APIs with revisions[/+]--delete-unmatchedbehavior. #169