Correct OpenApi LookupOrg router path (#5351)

Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
This commit is contained in:
Henrik Huitti 2025-07-23 19:18:27 +03:00 committed by GitHub
parent e702b32363
commit 5ecdcc99ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 38 additions and 38 deletions

View file

@ -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.",

View file

@ -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) {