fix: fix Swagger @Tag

This commit is contained in:
Yang Luo 2024-01-15 23:35:40 +08:00
parent b469928780
commit a4524e9996
7 changed files with 24 additions and 18 deletions

View File

@ -916,7 +916,7 @@ func (c *ApiController) HandleSamlLogin() {
} }
// HandleOfficialAccountEvent ... // HandleOfficialAccountEvent ...
// @Tag HandleOfficialAccountEvent API // @Tag System API
// @Title HandleOfficialAccountEvent // @Title HandleOfficialAccountEvent
// @router /webhook [POST] // @router /webhook [POST]
// @Success 200 {object} object.Userinfo The Response object // @Success 200 {object} object.Userinfo The Response object
@ -947,7 +947,7 @@ func (c *ApiController) HandleOfficialAccountEvent() {
} }
// GetWebhookEventType ... // GetWebhookEventType ...
// @Tag GetWebhookEventType API // @Tag System API
// @Title GetWebhookEventType // @Title GetWebhookEventType
// @router /get-webhook-event [GET] // @router /get-webhook-event [GET]
// @Success 200 {object} object.Userinfo The Response object // @Success 200 {object} object.Userinfo The Response object

View File

@ -24,7 +24,7 @@ import (
// Enforce // Enforce
// @Title Enforce // @Title Enforce
// @Tag Enforce API // @Tag Enforcer API
// @Description Call Casbin Enforce API // @Description Call Casbin Enforce API
// @Param body body []string true "Casbin request" // @Param body body []string true "Casbin request"
// @Param permissionId query string false "permission id" // @Param permissionId query string false "permission id"
@ -151,7 +151,7 @@ func (c *ApiController) Enforce() {
// BatchEnforce // BatchEnforce
// @Title BatchEnforce // @Title BatchEnforce
// @Tag Enforce API // @Tag Enforcer API
// @Description Call Casbin BatchEnforce API // @Description Call Casbin BatchEnforce API
// @Param body body []string true "array of casbin requests" // @Param body body []string true "array of casbin requests"
// @Param permissionId query string false "permission id" // @Param permissionId query string false "permission id"

View File

@ -18,7 +18,7 @@ import "github.com/casdoor/casdoor/object"
// GetDashboard // GetDashboard
// @Title GetDashboard // @Title GetDashboard
// @Tag GetDashboard API // @Tag System API
// @Description get information of dashboard // @Description get information of dashboard
// @Success 200 {object} controllers.Response The Response object // @Success 200 {object} controllers.Response The Response object
// @router /get-dashboard [get] // @router /get-dashboard [get]

View File

@ -20,7 +20,7 @@ import (
// GetPrometheusInfo // GetPrometheusInfo
// @Title GetPrometheusInfo // @Title GetPrometheusInfo
// @Tag Prometheus API // @Tag System API
// @Description get Prometheus Info // @Description get Prometheus Info
// @Success 200 {object} object.PrometheusInfo The Response object // @Success 200 {object} object.PrometheusInfo The Response object
// @router /get-prometheus-info [get] // @router /get-prometheus-info [get]

View File

@ -273,6 +273,7 @@ func (c *ApiController) RefreshToken() {
// IntrospectToken // IntrospectToken
// @Title IntrospectToken // @Title IntrospectToken
// @Tag Login API
// @Description The introspection endpoint is an OAuth 2.0 endpoint that takes a // @Description The introspection endpoint is an OAuth 2.0 endpoint that takes a
// parameter representing an OAuth 2.0 token and returns a JSON document // parameter representing an OAuth 2.0 token and returns a JSON document
// representing the meta information surrounding the // representing the meta information surrounding the

View File

@ -734,7 +734,7 @@
"/api/batch-enforce": { "/api/batch-enforce": {
"post": { "post": {
"tags": [ "tags": [
"Enforce API" "Enforcer API"
], ],
"description": "Call Casbin BatchEnforce API", "description": "Call Casbin BatchEnforce API",
"operationId": "ApiController.BatchEnforce", "operationId": "ApiController.BatchEnforce",
@ -1493,7 +1493,7 @@
"/api/enforce": { "/api/enforce": {
"post": { "post": {
"tags": [ "tags": [
"Enforce API" "Enforcer API"
], ],
"description": "Call Casbin Enforce API", "description": "Call Casbin Enforce API",
"operationId": "ApiController.Enforce", "operationId": "ApiController.Enforce",
@ -1826,7 +1826,7 @@
"/api/get-dashboard": { "/api/get-dashboard": {
"get": { "get": {
"tags": [ "tags": [
"GetDashboard API" "System API"
], ],
"description": "get information of dashboard", "description": "get information of dashboard",
"operationId": "ApiController.GetDashboard", "operationId": "ApiController.GetDashboard",
@ -2696,7 +2696,7 @@
"/api/get-prometheus-info": { "/api/get-prometheus-info": {
"get": { "get": {
"tags": [ "tags": [
"Prometheus API" "System API"
], ],
"description": "get Prometheus Info", "description": "get Prometheus Info",
"operationId": "ApiController.GetPrometheusInfo", "operationId": "ApiController.GetPrometheusInfo",
@ -3436,7 +3436,7 @@
"/api/get-webhook-event": { "/api/get-webhook-event": {
"get": { "get": {
"tags": [ "tags": [
"GetWebhookEventType API" "System API"
], ],
"operationId": "ApiController.GetWebhookEventType", "operationId": "ApiController.GetWebhookEventType",
"responses": { "responses": {
@ -3703,6 +3703,9 @@
}, },
"/api/login/oauth/introspect": { "/api/login/oauth/introspect": {
"post": { "post": {
"tags": [
"Login API"
],
"description": "The introspection endpoint is an OAuth 2.0 endpoint that takes a", "description": "The introspection endpoint is an OAuth 2.0 endpoint that takes a",
"operationId": "ApiController.IntrospectToken", "operationId": "ApiController.IntrospectToken",
"parameters": [ "parameters": [
@ -5306,7 +5309,7 @@
"/api/webhook": { "/api/webhook": {
"post": { "post": {
"tags": [ "tags": [
"HandleOfficialAccountEvent API" "System API"
], ],
"operationId": "ApiController.HandleOfficialAccountEvent", "operationId": "ApiController.HandleOfficialAccountEvent",
"responses": { "responses": {

View File

@ -474,7 +474,7 @@ paths:
/api/batch-enforce: /api/batch-enforce:
post: post:
tags: tags:
- Enforce API - Enforcer API
description: Call Casbin BatchEnforce API description: Call Casbin BatchEnforce API
operationId: ApiController.BatchEnforce operationId: ApiController.BatchEnforce
parameters: parameters:
@ -963,7 +963,7 @@ paths:
/api/enforce: /api/enforce:
post: post:
tags: tags:
- Enforce API - Enforcer API
description: Call Casbin Enforce API description: Call Casbin Enforce API
operationId: ApiController.Enforce operationId: ApiController.Enforce
parameters: parameters:
@ -1182,7 +1182,7 @@ paths:
/api/get-dashboard: /api/get-dashboard:
get: get:
tags: tags:
- GetDashboard API - System API
description: get information of dashboard description: get information of dashboard
operationId: ApiController.GetDashboard operationId: ApiController.GetDashboard
responses: responses:
@ -1751,7 +1751,7 @@ paths:
/api/get-prometheus-info: /api/get-prometheus-info:
get: get:
tags: tags:
- Prometheus API - System API
description: get Prometheus Info description: get Prometheus Info
operationId: ApiController.GetPrometheusInfo operationId: ApiController.GetPrometheusInfo
responses: responses:
@ -2238,7 +2238,7 @@ paths:
/api/get-webhook-event: /api/get-webhook-event:
get: get:
tags: tags:
- GetWebhookEventType API - System API
operationId: ApiController.GetWebhookEventType operationId: ApiController.GetWebhookEventType
responses: responses:
"200": "200":
@ -2414,6 +2414,8 @@ paths:
$ref: '#/definitions/object.TokenError' $ref: '#/definitions/object.TokenError'
/api/login/oauth/introspect: /api/login/oauth/introspect:
post: post:
tags:
- Login API
description: The introspection endpoint is an OAuth 2.0 endpoint that takes a description: The introspection endpoint is an OAuth 2.0 endpoint that takes a
operationId: ApiController.IntrospectToken operationId: ApiController.IntrospectToken
parameters: parameters:
@ -3467,7 +3469,7 @@ paths:
/api/webhook: /api/webhook:
post: post:
tags: tags:
- HandleOfficialAccountEvent API - System API
operationId: ApiController.HandleOfficialAccountEvent operationId: ApiController.HandleOfficialAccountEvent
responses: responses:
"200": "200":