incubator-devlake icon indicating copy to clipboard operation
incubator-devlake copied to clipboard

[Bug][Module Name] WebhookDeployTaskRequest.StartedDate is not optional

Open duhow opened this issue 2 months ago • 0 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

{"code":0,"success":false,"message":"input json error (400)
Wraps: (2) Key: 'WebhookDeployTaskRequest.StartedDate' Error:Field validation for 'StartedDate' failed on the 'required' tag
Error types: (1) *hintdetail.withDetail (2) validator.ValidationErrors","causes":null,"data":null}

What do you expect to happen

Update curl command in Webhook deployment example command, to state the field is required, not optional. image

How to reproduce

curl https://devlake.localhost.com/api/rest/plugins/webhook/connections/2/deployments -X 'POST' \
-H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
-d '{ "deploymentCommits":[ { "commit_sha":"the sha of deployment commit1", "repo_url":"the repo URL of the deployment commit" } ] }'

Note start_time is not indicated in JSON query.

Anything else

No response

Version

1.0.0-beta5

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

duhow avatar Apr 23 '24 14:04 duhow