-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot apply indexing with [] #6053
Comments
Hi @TomaszGrzmilas Can you please share the OpenAPI description you're using to generate the client? |
Hi, sure: |
Thank you for the additional information. And for your patience. There's no path item equal to or starting with Why would you expect an indexer to be generated in those conditions? I can also see this description contains path items with Let us know if you have any additional comments or questions. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
What are you generating using Kiota, clients or plugins?
API Client/SDK
In what context or format are you using Kiota?
Windows executable
Client library/SDK language
Csharp
Describe the bug
I'm trying to get data as described in the documentation, using []:
https://learn.microsoft.com/en-us/openapi/kiota/request-builders
I' using .NET 9 and client was generated using Kiota 1.22.3:
I get error: Cannot apply indexing with [] to an expression of type 'UsersRequestBuilder'
Expected behavior
I think that this should work as described in documentation.
How to reproduce
var tokenProvider = new IFSAccessTokenProvider();
var authProvider = new BaseBearerTokenAuthenticationProvider(tokenProvider);
var pnfr = new ParseNodeFactoryRegistry();
var json = new JsonParseNodeFactory();
pnfr.ContentTypeAssociatedFactories.TryAdd(json.ValidContentType, json);
var adapter = new HttpClientRequestAdapter(authProvider, pnfr);
var client = new UserHandlingClient(adapter);
var user = await client.Users["user1"].GetAsync();
Open API description file
No response
Kiota Version
1.22.3
Latest Kiota version known to work for scenario above?(Not required)
No response
Known Workarounds
No response
Configuration
No response
Debug output
Click to expand log
```The text was updated successfully, but these errors were encountered: