-
Notifications
You must be signed in to change notification settings - Fork 218
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
openapi from odata error #5247
Comments
Hi @marcioatws For the parameter type this was introduced by microsoft/kiota-typescript#1248 and needs the corresponding generator changes to function properly #5163. You can use the latest preview release and re-generate the client. For the non-existent function, can you provide a repro description please? |
sry for late response. Repo for error: https://github.com/marcioatws/kiota-odata-error I will try to summarize the issue again. Sample Backend Controller:
Client Generation Command:
TypeScript Client Output:
However, calling productsWithId results in a "not a function" error. sorry for my english, it's not my language. |
Thank you for the additional information. |
I generated the openapi spec from an odata application and the typescript client in kiota didn't work with the url parentheses. for example, for the url http://aaaa.bbb/entities({id}) in the model, a method called entitiesWithId(type | undefined) was generated and when used it causes an error that entitiesWithId is not a function. i can generate some code for error reproduction if need it.
Another situation is that using the "strict" option in the typescript settings, the following error message is generated in all models:
src/app/models/contratoAggregate/index.ts:125:95 - error TS2345: Argument of type '(writer: SerializationWriter, contrato?: Partial | undefined) => void' is not assignable to parameter of type 'ModelSerializerFunction'.
Types of parameters 'contrato' and 'value' are incompatible.
Type 'Partial | null | undefined' is not assignable to type 'Partial | undefined'.
Type 'null' is not assignable to type 'Partial | undefined'.
The text was updated successfully, but these errors were encountered: