-
Notifications
You must be signed in to change notification settings - Fork 219
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
Wrong Record
type generated in Typescript client
#5027
Comments
Record
type in Typescript clientRecord
type generated in Typescript client
Hi @ThisIsDemetrio |
Hi @baywet! Thank you for your reply. Thanks as well for finding out the issue related to this. I tried a little search, but probably I should had dig more. Regarding the AdditionalDataHolder.. yes, I intentionally disabled during the experiments that I included here. We have a project that it is using Kiota with the additionalData, but this caused some confusion since we expected to use it for additional properties to the schema but it actually created a new property that we aren't actually using. Anyway, I'm following the issue you linked hoping for a quick implementation that we can use in our project. Thanks again! |
Thank you for the additional information here . |
Yes, please just considering that as a tentative to understand its usage and to simplify the code pasted when opening the issue. I've in plan to do additional test regarding Kiota. Am I supposed to expect that the |
Correct. Let us know if you have further questions or if we can close the issue. |
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?
Linux executable
Client library/SDK language
TypeScript
Describe the bug
Hi there. I'm having an issue generating a Typescript client from an OpenAPI v3 definition because properties with that includes the following schema:
Generates a client with the following interface for the GET:
The problem here is that I cannot use the
DictGetResponse_data
as intended, which means that the objectdata
might include any type of property with value string, like the following:Expected behavior
I'm expecting to have the Typescript definition with something like this:
How to reproduce
Simply run the
kiota generate
script with the JSON passed below.Open API description file
simple-client.json
This JSON file contains a definition which it can be used to reproduce the issue.
Kiota Version
1.16.0
Latest Kiota version known to work for scenario above?(Not required)
No response
Known Workarounds
No response
Configuration
Ubuntu 22.04
Debug output
Click to expand log
```dbug: Kiota.Builder.KiotaBuilder[0]
kiota version 1.16.0
info: Kiota.Builder.KiotaBuilder[0]
loaded description from local source
dbug: Kiota.Builder.KiotaBuilder[0]
step 1 - reading the stream - took 00:00:00.0065043
warn: Kiota.Builder.KiotaBuilder[0]
OpenAPI warning: #/ - A servers entry (v3) or host + basePath + schemes properties (v2) was not present in the OpenAPI description. The root URL will need to be set manually with the request adapter.
dbug: Kiota.Builder.KiotaBuilder[0]
step 2 - parsing the document - took 00:00:00.1028318
dbug: Kiota.Builder.KiotaBuilder[0]
step 3 - updating generation configuration from kiota extension - took 00:00:00.0001083
dbug: Kiota.Builder.KiotaBuilder[0]
step 4 - filtering API paths with patterns - took 00:00:00.0037455
warn: Kiota.Builder.KiotaBuilder[0]
No server url found in the OpenAPI document. The base url will need to be set when using the client.
dbug: Kiota.Builder.KiotaBuilder[0]
step 5 - checking whether the output should be updated - took 00:00:00.0238744
dbug: Kiota.Builder.KiotaBuilder[0]
step 6 - create uri space - took 00:00:00.0037604
dbug: Kiota.Builder.KiotaBuilder[0]
InitializeInheritanceIndex 00:00:00.0030867
dbug: Kiota.Builder.KiotaBuilder[0]
CreateRequestBuilderClass 00:00:00
dbug: Kiota.Builder.KiotaBuilder[0]
MapTypeDefinitions 00:00:00.0035410
dbug: Kiota.Builder.KiotaBuilder[0]
TrimInheritedModels 00:00:00
dbug: Kiota.Builder.KiotaBuilder[0]
CleanUpInternalState 00:00:00
dbug: Kiota.Builder.KiotaBuilder[0]
step 7 - create source model - took 00:00:00.0525411
dbug: Kiota.Builder.KiotaBuilder[0]
43ms: Language refinement applied
dbug: Kiota.Builder.KiotaBuilder[0]
step 8 - refine by language - took 00:00:00.0444799
dbug: Kiota.Builder.KiotaBuilder[0]
step 9 - writing files - took 00:00:00.0289156
info: Kiota.Builder.KiotaBuilder[0]
loaded description from local source
dbug: Kiota.Builder.KiotaBuilder[0]
step 10 - writing lock file - took 00:00:00.0086584
Generation completed successfully
dbug: Kiota.Builder.KiotaBuilder[0]
Api manifest path: /home/demetrio/mia/console-sdk/packages/console-client/apimanifest.json
The text was updated successfully, but these errors were encountered: