Hello @jessy visch !
Welcome to Microsoft QnA!
The issue you're encountering in Azure API Management when importing an OpenAPI specification is related to how API Management distinguishes different operations. Azure API Management uses a combination of the HTTP method and the URL path to identify unique operations. In your case, the two operations have the same HTTP method (GET
) and the URL path (/api/group-users/{parameter}
), even though they have different path parameter names (id
and guidId
) and types.
Azure API Management doesn't distinguish between different path parameters when they are in the same position in the URL. It treats /api/group-users/{id}
and /api/group-users/{guidId}
as the same operation because it sees them both as /api/group-users/{parameter}
.
To resolve this issue:
- Modify the Paths: You need to make the paths distinct in a way that Azure API Management can recognize. This often means changing the actual URL structure. For example:
jsonCopy code "/api/group-users/by-id/{id}":
- Operation Overloading: If you cannot modify the paths (for instance, if they are already established and used by clients), you might need to consider operation overloading in a single endpoint. This would involve handling the logic of differentiating between
id
andguidId
within the same operation, based on their formats.
So adjusting the URL paths as described above is a common workaround for this limitation. This approach requires changes to your API design, but it ensures compatibility with Azure API Management's operation identification mechanism.
--
I hope this helps!
The answer or portions of it may have been assisted by AI Source: ChatGPT Subscription
Kindly mark the answer as Accepted and Upvote in case it helped or post your feedback to help !
Regards