mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-03 12:43:48 +00:00
Correct OpenApi LookupOrg router path (#5351)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
This commit is contained in:
parent
e702b32363
commit
5ecdcc99ec
2 changed files with 38 additions and 38 deletions
|
@ -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": {
|
"/orgs": {
|
||||||
"get": {
|
"get": {
|
||||||
"description": "Returns all registered orgs in the system. Requires admin rights.",
|
"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}": {
|
"/orgs/{id}": {
|
||||||
"delete": {
|
"delete": {
|
||||||
"description": "Deletes the given org. Requires admin rights.",
|
"description": "Deletes the given org. Requires admin rights.",
|
||||||
|
|
|
@ -109,10 +109,10 @@ func GetOrgPermissions(c *gin.Context) {
|
||||||
// LookupOrg
|
// LookupOrg
|
||||||
//
|
//
|
||||||
// @Summary Lookup an organization by full name
|
// @Summary Lookup an organization by full name
|
||||||
// @Router /org/lookup/{org_full_name} [get]
|
// @Router /orgs/lookup/{org_full_name} [get]
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 200 {object} Org
|
// @Success 200 {object} Org
|
||||||
// @Tags Organizations
|
// @Tags Orgs
|
||||||
// @Param Authorization header string true "Insert your personal access token" default(Bearer <personal access token>)
|
// @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"
|
// @Param org_full_name path string true "the organizations full name / slug"
|
||||||
func LookupOrg(c *gin.Context) {
|
func LookupOrg(c *gin.Context) {
|
||||||
|
|
Loading…
Reference in a new issue