mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-14 01:34:47 +08:00
fix: 补全 swagger 文档 (#1022)
This commit is contained in:
parent
46e13d754f
commit
afa9eecf35
@ -138,7 +138,7 @@ func (b *BaseApi) OperateIPRule(c *gin.Context) {
|
|||||||
// @Param request body dto.BatchRuleOperate true "request"
|
// @Param request body dto.BatchRuleOperate true "request"
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Router /hosts/firewall/ip [post]
|
// @Router /hosts/firewall/batch [post]
|
||||||
func (b *BaseApi) BatchOperateRule(c *gin.Context) {
|
func (b *BaseApi) BatchOperateRule(c *gin.Context) {
|
||||||
var req dto.BatchRuleOperate
|
var req dto.BatchRuleOperate
|
||||||
if err := c.ShouldBindJSON(&req); err != nil {
|
if err := c.ShouldBindJSON(&req); err != nil {
|
||||||
@ -188,7 +188,7 @@ func (b *BaseApi) UpdatePortRule(c *gin.Context) {
|
|||||||
// @Param request body dto.AddrRuleUpdate true "request"
|
// @Param request body dto.AddrRuleUpdate true "request"
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Router /hosts/firewall/update/ip [post]
|
// @Router /hosts/firewall/update/addr [post]
|
||||||
func (b *BaseApi) UpdateAddrRule(c *gin.Context) {
|
func (b *BaseApi) UpdateAddrRule(c *gin.Context) {
|
||||||
var req dto.AddrRuleUpdate
|
var req dto.AddrRuleUpdate
|
||||||
if err := c.ShouldBindJSON(&req); err != nil {
|
if err := c.ShouldBindJSON(&req); err != nil {
|
||||||
|
@ -5377,7 +5377,7 @@ var doc = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/hosts/firewall/ip": {
|
"/hosts/firewall/batch": {
|
||||||
"post": {
|
"post": {
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
@ -5410,6 +5410,49 @@ var doc = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/hosts/firewall/ip": {
|
||||||
|
"post": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"ApiKeyAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "创建防火墙 IP 规则",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"Firewall"
|
||||||
|
],
|
||||||
|
"summary": "Create group",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "request",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/dto.AddrRuleOperate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-panel-log": {
|
||||||
|
"BeforeFuntions": [],
|
||||||
|
"bodyKeys": [
|
||||||
|
"strategy",
|
||||||
|
"address"
|
||||||
|
],
|
||||||
|
"formatEN": "create address rules [strategy][address]",
|
||||||
|
"formatZH": "添加 ip 规则 [strategy] [address]",
|
||||||
|
"paramKeys": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/hosts/firewall/operate": {
|
"/hosts/firewall/operate": {
|
||||||
"post": {
|
"post": {
|
||||||
"security": [
|
"security": [
|
||||||
@ -5534,7 +5577,7 @@ var doc = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/hosts/firewall/update/ip": {
|
"/hosts/firewall/update/addr": {
|
||||||
"post": {
|
"post": {
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
|
@ -5363,7 +5363,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/hosts/firewall/ip": {
|
"/hosts/firewall/batch": {
|
||||||
"post": {
|
"post": {
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
@ -5396,6 +5396,49 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/hosts/firewall/ip": {
|
||||||
|
"post": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"ApiKeyAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "创建防火墙 IP 规则",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"Firewall"
|
||||||
|
],
|
||||||
|
"summary": "Create group",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "request",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/dto.AddrRuleOperate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-panel-log": {
|
||||||
|
"BeforeFuntions": [],
|
||||||
|
"bodyKeys": [
|
||||||
|
"strategy",
|
||||||
|
"address"
|
||||||
|
],
|
||||||
|
"formatEN": "create address rules [strategy][address]",
|
||||||
|
"formatZH": "添加 ip 规则 [strategy] [address]",
|
||||||
|
"paramKeys": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/hosts/firewall/operate": {
|
"/hosts/firewall/operate": {
|
||||||
"post": {
|
"post": {
|
||||||
"security": [
|
"security": [
|
||||||
@ -5520,7 +5563,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/hosts/firewall/update/ip": {
|
"/hosts/firewall/update/addr": {
|
||||||
"post": {
|
"post": {
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
|
@ -6461,7 +6461,7 @@ paths:
|
|||||||
summary: Load firewall base info
|
summary: Load firewall base info
|
||||||
tags:
|
tags:
|
||||||
- Firewall
|
- Firewall
|
||||||
/hosts/firewall/ip:
|
/hosts/firewall/batch:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
@ -6481,6 +6481,34 @@ paths:
|
|||||||
summary: Create group
|
summary: Create group
|
||||||
tags:
|
tags:
|
||||||
- Firewall
|
- Firewall
|
||||||
|
/hosts/firewall/ip:
|
||||||
|
post:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: 创建防火墙 IP 规则
|
||||||
|
parameters:
|
||||||
|
- description: request
|
||||||
|
in: body
|
||||||
|
name: request
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/dto.AddrRuleOperate'
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: ""
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Create group
|
||||||
|
tags:
|
||||||
|
- Firewall
|
||||||
|
x-panel-log:
|
||||||
|
BeforeFuntions: []
|
||||||
|
bodyKeys:
|
||||||
|
- strategy
|
||||||
|
- address
|
||||||
|
formatEN: create address rules [strategy][address]
|
||||||
|
formatZH: 添加 ip 规则 [strategy] [address]
|
||||||
|
paramKeys: []
|
||||||
/hosts/firewall/operate:
|
/hosts/firewall/operate:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@ -6560,7 +6588,7 @@ paths:
|
|||||||
summary: Page firewall rules
|
summary: Page firewall rules
|
||||||
tags:
|
tags:
|
||||||
- Firewall
|
- Firewall
|
||||||
/hosts/firewall/update/ip:
|
/hosts/firewall/update/addr:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
Loading…
x
Reference in New Issue
Block a user