Skip to content

openapi from odata error #5247

Closed
Closed

Description

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'.

writer.writeCollectionOfObjectValues<Contrato>("value", contratoCollectionResponse.value, serializeContrato);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

TypeScriptPull requests that update Javascript codetype:bugA broken experience

Type

No type

Projects

  • Status

    Done ✔️

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions