mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-03-15 17:13:46 +01:00
Correct OpenApi LookupOrg router path (#5351)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
This commit is contained in:
@@ -907,42 +907,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/org/lookup/{org_full_name}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Organizations"
|
||||
],
|
||||
"summary": "Lookup an organization by full name",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"default": "Bearer \u003cpersonal access token\u003e",
|
||||
"description": "Insert your personal access token",
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "the organizations full name / slug",
|
||||
"name": "org_full_name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Org"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/orgs": {
|
||||
"get": {
|
||||
"description": "Returns all registered orgs in the system. Requires admin rights.",
|
||||
@@ -990,6 +954,42 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/orgs/lookup/{org_full_name}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Orgs"
|
||||
],
|
||||
"summary": "Lookup an organization by full name",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"default": "Bearer \u003cpersonal access token\u003e",
|
||||
"description": "Insert your personal access token",
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "the organizations full name / slug",
|
||||
"name": "org_full_name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Org"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/orgs/{id}": {
|
||||
"delete": {
|
||||
"description": "Deletes the given org. Requires admin rights.",
|
||||
|
||||
@@ -109,10 +109,10 @@ func GetOrgPermissions(c *gin.Context) {
|
||||
// LookupOrg
|
||||
//
|
||||
// @Summary Lookup an organization by full name
|
||||
// @Router /org/lookup/{org_full_name} [get]
|
||||
// @Router /orgs/lookup/{org_full_name} [get]
|
||||
// @Produce json
|
||||
// @Success 200 {object} Org
|
||||
// @Tags Organizations
|
||||
// @Tags Orgs
|
||||
// @Param Authorization header string true "Insert your personal access token" default(Bearer <personal access token>)
|
||||
// @Param org_full_name path string true "the organizations full name / slug"
|
||||
func LookupOrg(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user