docs-api icon indicating copy to clipboard operation
docs-api copied to clipboard

/repos/xxx/hooks binding check error

Open actor168 opened this issue 2 years ago • 0 comments

gogs version: 0.14.0+dev

when calling with

curl -X POST -H "Content-Type: application/json" -d @test.json http://xxx/api/v1/repos/xxx/test/hooks?token=xxx

while test.json :

{
  "type": "gogs",
  "config": {
    "content_type": "json",
    "url": "http://xxx/hook"
  },
  "events": [
    "push"
  ],
  "active": true
}

it responses:

[
  {
    "fieldNames": [
      "Type"
    ],
    "classification": "RequiredError",
    "message": "Required"
  },
  {
    "fieldNames": [
      "Config"
    ],
    "classification": "RequiredError",
    "message": "Required"
  }
]

actor168 avatar Jul 14 '23 09:07 actor168