Skip to content

Incomplete / Misleading Hooks section documentation in Swagger #9039

Closed
@pecastro

Description

@pecastro

HI,

  • Gitea version 1.9.3
  • Git version: Not relevant
  • Operating system:
  • Database (use [x]):
    • [x ] PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • [x ] Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

The swagger definitions for all of the hooks API's are incomplete and wrong.

curl -H "accept: application/json" -X GET "http://user:[email protected]/api/v1/repos/TestOrg/TestRepo/hooks/1" | jq .
{
  "id": 1,
  "type": "gitea",
  "config": {
    "content_type": "json",
    "url": "http://jenkins.xxx.xxx/gitea-webhook/post"
  },
  "events": [
    "push"
  ],
  "active": true,
  "updated_at": "2019-11-03T23:15:32Z",
  "created_at": "2019-11-03T23:09:59Z"
}

Screenshots

image

content_type is a required field also not mentioned in Swagger.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/docsThis PR mainly updates/creates documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions