-
Notifications
You must be signed in to change notification settings - Fork 240
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
Guid param in API path throws in TS client on GET #4902
Comments
Oh might be resolved in microsoft/kiota-typescript#1116 edit: actually that seems to be query param focused, will it apply to path params? |
Thanks for raising this @IkeOTL Any chance you can confirm the version of the abstractions packages you are using? I believe this was resolved with microsoft/kiota-typescript#1226 for both path and query params. |
@andrueastman I'm on version |
Apologies, @IkeOTL, Looks like the changes for microsoft/kiota-typescript#1226 are unreleased. Authored microsoft/kiota-typescript#1253 to create a new release. |
What are you generating using Kiota, clients or plugins?
API Client/SDK
In what context or format are you using Kiota?
Nuget tool
Client library/SDK language
TypeScript
Describe the bug
I have a TypeScript client generated from a Swagger,json that was generated by Swashbuckle. In this client there is an endpoint where there is a path param that is of type
Guid
. In the generated TS client I'm submitting a GET to this endpoint like so:let g = uploadRes.guid!;
const dl = await audioClient.audio.download.byGuid(g).get();
note: uploadRes is response from another endpoint that produces a
Guid
in the same clientThis throws
Error: Illegal class passed as substitution, found function
Work when I do this:
const dl = await audioClient.audio.download.byGuid(g.toString() as any).get();
Expected behavior
Endpoint works when
Guid
is used since thats the type the Kiota generated client is using.How to reproduce
Execute (from a Kiota generated TS client) an endpoint where there is a path param of swagger schema type:
string
/ format:uuid
. ex:/Audio/download/{guid}
Open API description file
swagger.json
Kiota Version
1.14.0+fc4b39c65d89f7bfc8c7f1813c197e95e206da09
Latest Kiota version known to work for scenario above?(Not required)
No response
Known Workarounds
Instead of using the
Guid
class directly do thisguid.toString() as any
Configuration
No response
Debug output
Click to expand log
```The text was updated successfully, but these errors were encountered: