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
In 1.5, kiota generates a request builder for the quickstart that will not compile.
\kiota-samples\get-started\quickstart\cli\src\Client\Posts\PostsRequestBuilder.cs(24,63): error CS0161: 'Posts
RequestBuilder.this[string].get': not all code paths return a value [C:\Source\Repos\kiota-samples\get-started\quickstart\cli
\src\KiotaPostsCLI.csproj]
Offending code:
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]publicPostItemRequestBuilderthis[string position]{get{var urlTplParams =newDictionary<string,object>(PathParameters);if(!string.IsNullOrWhiteSpace(position))urlTplParams.Add("post%2Did",position);}}
This method wasn't present at all in the 1.4 generated client, and I verified that removing it fixes the issue (and the client still works).
The text was updated successfully, but these errors were encountered:
This seems to be a side effect of #3058. We should probably add a refiner method for CLI that removes those backward compatible indexers. @calebkiage do you need indexers at all in the CLI generation?
Thanks for the additional context. Yes we now have 2 indexers in some cases to avoid breaking binary compatibility in CSharp. One with the specific type, and another still with string and tagged as obsolete.
In 1.5, kiota generates a request builder for the quickstart that will not compile.
Offending code:
This method wasn't present at all in the 1.4 generated client, and I verified that removing it fixes the issue (and the client still works).
The text was updated successfully, but these errors were encountered: