question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LLC does not add api-version to LRO URI in `UpdateStatus()`

See original GitHub issue

While working on the LLC for Question Answering authoring, @AhmedLeithy found that the api-version query parameter was not being added to the URI returned by the Operation-Location header. This was causing a 404 but, even if the service handled that, assuming the latest api-version could result in unexpected response models.

Talking with Jeff and Johan, an api-version in a Operation-Location is not required for LROs, so the client should add one if not already set (some services do pass the api-version back e.g., Key Vault).

On a related note, the nextLink model property for paged results should include an api-version, but it might be good to implement the same behavior described in this bug just to make sure we are consistent.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
fengzhou-msftcommented, Jan 6, 2022

The guidance should be the same: replace the version path segment with the version the client wants to use. How hard is this too implement?

The API version is set in the ClientOption when creating a Client, and all requests sent by the client would use that version except the LRO cases we discuss here. If I understand correctly, we need to either add the API version or replace it for the link returned from service for LRO. That would be a simple change from https://github.com/Azure/autorest.csharp/pull/1749.

2reactions
mikekistlercommented, Dec 15, 2021

@JeffreyRichter I do not see the logic here. This is completely contrary to Operation-Location being an “opaque absolute URL”. We are now asking users to crack apart the URL and add a query parameter before issuing the GET. At the very least this breaks with our previous guidance.

Can we please review this in the API Stewardship leadership team before we advise teams to go off and implement this guidance?

Read more comments on GitHub >

github_iconTop Results From Across the Web

AspnetCore 3.1 API giving UnsupportedApiVersion
I have created a simple reproduction of the problem in this repo. If you navigate to the /swagger page and try v1 or...
Read more >
How to Apply API Versioning in ASP.NET Core
A URI is an easy way to pass version details to the versioning service. We can use a query string or a URI...
Read more >
REST API and Resource Versions
When you specify the API version in the URI of a request, do not include the update release value. For example, when you...
Read more >
Azure App Configuration REST API - versioning
Unsupported API version. This error occurs when a client requested API version doesn't match any of the supported API versions by the server....
Read more >
Implementing Modern API Versioning in .NET - YouTube
NET 6, but this approach can be used for Web APIs as well. ... video: https://www.youtube.com/watch?v=iVHtKG0eU_s Don't forget to comment, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found