Open
Description
Environment details
- Programming language: Go
- OS: Mac OS
- Language runtime version: 1.19
- Package version: google.golang.org/api/classroom/v1 , google.golang.org/api v0.87.0
Steps to reproduce
running this code snippet (given valid course id, coursework id and submission id...):
_,err = service.Courses.CourseWork.StudentSubmissions.TurnIn(submission.CourseID, submission.courseWorkID, submission.ID, &classroom.TurnInStudentSubmissionRequest{}).Context(ctx).Do()
gives this error:
googleapi: Error 400: Invalid JSON payload received. Unknown name "": Root element must be a message.
Details:
[
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"description": "Invalid JSON payload received. Unknown name \"\": Root element must be a message."
}
]
}
]
I read the docs and found no information on what TurnInStudentSubmissionRequest
is. It seem its only purpose is to provide an empty request body. So, my assumption is to just include an empty struct, but i am left with a 400 bad request error stating above issue.
Am I writing this call incorrectly?