Skip to content

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

@duhow

Description

@duhow

Search before asking

  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugThis issue is a bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions