OK, seems this behavior is actually documented in:
https://learn.microsoft.com/en-us/azure/api-management/api-management-api-import-restrictions#update-an-existing-api-via-openapi-import
Update an existing API via OpenAPI import During import, the existing API operation:
- Changes to match the API described in the OpenAPI document.
- Matches to an operation in the OpenAPI document by comparing its
operationId
value to the existing operation's Azure resource name.- If a match is found, existing operation’s properties are updated "in-place".
- If a match isn't found:
- A new operation is created by combining HTTP method and path template, for example,
get-foo
. - For each new operation, the import will attempt to copy policies from an existing operation with the same HTTP method and path template.
- If a match isn't found:
- A new operation is created by combining HTTP method and path template, for example,
- If a match is found, existing operation’s properties are updated "in-place".
All existing unmatched operations are deleted. To make import more predictable, follow these guidelines:
- Specify
operationId
property for every operation. - Refrain from changing
operationId
after initial import. - Never change
operationId
and HTTP method or path template at the same time. Update an existing API via OpenAPI import During import, the existing API operation:- Changes to match the API described in the OpenAPI document.
- Matches to an operation in the OpenAPI document by comparing its
operationId
value to the existing operation's Azure resource name.- If a match is found, existing operation’s properties are updated "in-place".
- If a match isn't found:
- A new operation is created by combining HTTP method and path template, for example,
get-foo
. - For each new operation, the import will attempt to copy policies from an existing operation with the same HTTP method and path template.
- If a match isn't found:
- A new operation is created by combining HTTP method and path template, for example,
- If a match is found, existing operation’s properties are updated "in-place".
All existing unmatched operations are deleted. To make import more predictable, follow these guidelines:
- Specify
operationId
property for every operation.- Refrain from changing
operationId
after initial import.- Never change
operationId
and HTTP method or path template at the same time. [...]
...so in other words - one needs to cross-check his updated OpenAPI doc/Swagger file against previously imported one - even though one would think new one is perfectly valid formally.