-
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
Enum Serialization doing wrongly according to docs #2385
Comments
Thanks for raising this @gabrieligbastos According to the metadata used to generate the SDK, the properties are camelCased which is inconsistent with the docs. Just to confirm, if you make the request with the properties starting with an uppercase, are you able to get a successful response when using the Graph Explorer or Postman? |
Hey @andrueastman So, what happened, i was getting failed request from SDK. Tried on Postman, and it was working, then, I checked my Fiddler to see what the SDK was requesting and i noted this difference. The actually problem is with the first letter. It says the EnumType is But actually, it is not with lower case 'a' in the first letter, but upper case. And it worked.. But as soon as it is fixed here, i can get this hard-coded code manually making first letter uppercase cleared :) This payload on Postman works:
|
Here is a link to another doc i found also saying the first letter is upper case. Oh and thanks by the way for quick reply on this :) |
Describe the bug
Im trying to report policy violation API in Teams, using the /v1.0/chats/{chat-id}/messages/{message-id} Endpoint.
The serialization is defined to be camel case starting with lower case, but documentation says it should be camelCase starting with UpperCase, so Im getting 400 Bad Request - Invalid request body was sent! message
To Reproduce
Steps to reproduce the behavior:
var chatId = turnContext.Activity.Conversation.Id;
var messageId = turnContext.Activity.Id;
Expected behavior
Success message without exception being thrown
Screenshots
Dotnet SDK
Dotnet 6.0
Microsoft.Graph 5.44.0
Additional context
The payload built through
is being serialized to:
But according to doc at: https://learn.microsoft.com/pt-br/graph/api/chatmessage-update?view=graph-rest-1.0&tabs=http
It should starts with Upper case (BlockAccess and AllowFalsePositiveOverride and AllowOverrideWithJustification)
So, because of that, im getting the error back from API
The text was updated successfully, but these errors were encountered: