You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When uploading event attachment, the request is refused with error
{"error":{"code":"UnprocessableType","message":"Cannot process input of abstract type 'microsoft.graph.attachment'"}}
To Reproduce
Try to upload FileAttachment object to existing event. Sample code;
This serializes the object as:
{"isInline":false,"name":"empty.txt","size":5,"contentBytes":"ZW1wdHk="}
i.e. without FileAttachment type specification.
In v4, the object is serialized as
{"contentBytes":"ZW1wdHk=","isInline":false,"name":"empty.txt","size":5,"@odata.type":"microsoft.graph.fileAttachment"}
Expected behavior
Specify correct odata.type during serialization
Client version
5.6.0-preview
Desktop (please complete the following information):
OS: Win 10 x64
Browser: N/A, WinForms application using standard HttpClient
Version: N/A
The text was updated successfully, but these errors were encountered:
Thanks for raising this @gaspik and trying out the new preview.
This is related to microsoft/OpenAPI.NET.OData#243 which is not emitting the @odata.type property in the object's reference schema. We'll close this once the openApi conversion library fixes this and make a release with the corresponding schema update.
For now you should be able to work around this by placing adding the property in the additionalData bag.
Describe the bug
When uploading event attachment, the request is refused with error
{"error":{"code":"UnprocessableType","message":"Cannot process input of abstract type 'microsoft.graph.attachment'"}}
To Reproduce
Try to upload FileAttachment object to existing event. Sample code;
This serializes the object as:
{"isInline":false,"name":"empty.txt","size":5,"contentBytes":"ZW1wdHk="}
i.e. without FileAttachment type specification.
In v4, the object is serialized as
{"contentBytes":"ZW1wdHk=","isInline":false,"name":"empty.txt","size":5,"@odata.type":"microsoft.graph.fileAttachment"}
Expected behavior
Specify correct odata.type during serialization
Client version
5.6.0-preview
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: