update swagger.yaml

This commit is contained in:
ginuerzh
2022-09-03 20:28:35 +08:00
parent ba4b0b8e0f
commit 05bfeb8a0f
2 changed files with 1235 additions and 1163 deletions
+87 -16
View File
@@ -37,8 +37,12 @@ definitions:
reload:
$ref: '#/definitions/Duration'
reverse:
description: DEPRECATED by whitelist since beta.4
type: boolean
x-go-name: Reverse
whitelist:
type: boolean
x-go-name: Whitelist
type: object
x-go-package: github.com/go-gost/x/config
AuthConfig:
@@ -86,8 +90,12 @@ definitions:
reload:
$ref: '#/definitions/Duration'
reverse:
description: DEPRECATED by whitelist since beta.4
type: boolean
x-go-name: Reverse
whitelist:
type: boolean
x-go-name: Whitelist
type: object
x-go-package: github.com/go-gost/x/config
ChainConfig:
@@ -97,6 +105,10 @@ definitions:
$ref: '#/definitions/HopConfig'
type: array
x-go-name: Hops
metadata:
additionalProperties: {}
type: object
x-go-name: Metadata
name:
type: string
x-go-name: Name
@@ -104,6 +116,17 @@ definitions:
$ref: '#/definitions/SelectorConfig'
type: object
x-go-package: github.com/go-gost/x/config
ChainGroupConfig:
properties:
chains:
items:
type: string
type: array
x-go-name: Chains
selector:
$ref: '#/definitions/SelectorConfig'
type: object
x-go-package: github.com/go-gost/x/config
Config:
properties:
admissions:
@@ -163,8 +186,7 @@ definitions:
auth:
$ref: '#/definitions/AuthConfig'
metadata:
additionalProperties:
type: object
additionalProperties: {}
type: object
x-go-name: Metadata
tls:
@@ -179,8 +201,7 @@ definitions:
auth:
$ref: '#/definitions/AuthConfig'
metadata:
additionalProperties:
type: object
additionalProperties: {}
type: object
x-go-name: Metadata
tls:
@@ -217,9 +238,15 @@ definitions:
x-go-package: github.com/go-gost/x/config
ForwarderConfig:
properties:
nodes:
items:
$ref: '#/definitions/NodeConfig'
type: array
x-go-name: Nodes
selector:
$ref: '#/definitions/SelectorConfig'
targets:
description: DEPRECATED by nodes since beta.4
items:
type: string
type: array
@@ -233,12 +260,18 @@ definitions:
auther:
type: string
x-go-name: Auther
authers:
items:
type: string
type: array
x-go-name: Authers
chain:
type: string
x-go-name: Chain
chainGroup:
$ref: '#/definitions/ChainGroupConfig'
metadata:
additionalProperties:
type: object
additionalProperties: {}
type: object
x-go-name: Metadata
retries:
@@ -257,6 +290,11 @@ definitions:
bypass:
type: string
x-go-name: Bypass
bypasses:
items:
type: string
type: array
x-go-name: Bypasses
hosts:
type: string
x-go-name: Hosts
@@ -320,12 +358,18 @@ definitions:
auther:
type: string
x-go-name: Auther
authers:
items:
type: string
type: array
x-go-name: Authers
chain:
type: string
x-go-name: Chain
chainGroup:
$ref: '#/definitions/ChainGroupConfig'
metadata:
additionalProperties:
type: object
additionalProperties: {}
type: object
x-go-name: Metadata
tls:
@@ -389,6 +433,11 @@ definitions:
bypass:
type: string
x-go-name: Bypass
bypasses:
items:
type: string
type: array
x-go-name: Bypasses
connector:
$ref: '#/definitions/ConnectorConfig'
dialer:
@@ -399,6 +448,10 @@ definitions:
interface:
type: string
x-go-name: Interface
metadata:
additionalProperties: {}
type: object
x-go-name: Metadata
name:
type: string
x-go-name: Name
@@ -521,9 +574,19 @@ definitions:
admission:
type: string
x-go-name: Admission
admissions:
items:
type: string
type: array
x-go-name: Admissions
bypass:
type: string
x-go-name: Bypass
bypasses:
items:
type: string
type: array
x-go-name: Bypasses
forwarder:
$ref: '#/definitions/ForwarderConfig'
handler:
@@ -536,6 +599,10 @@ definitions:
x-go-name: Interface
listener:
$ref: '#/definitions/ListenerConfig'
metadata:
additionalProperties: {}
type: object
x-go-name: Metadata
name:
type: string
x-go-name: Name
@@ -567,15 +634,23 @@ definitions:
certFile:
type: string
x-go-name: CertFile
commonName:
type: string
x-go-name: CommonName
keyFile:
type: string
x-go-name: KeyFile
organization:
type: string
x-go-name: Organization
secure:
type: boolean
x-go-name: Secure
serverName:
type: string
x-go-name: ServerName
validity:
$ref: '#/definitions/Duration'
type: object
x-go-package: github.com/go-gost/x/config
info:
@@ -632,8 +707,7 @@ paths:
security:
- basicAuth:
- '[]'
summary: Create a new admission, the name of admission must be unique in admission
list.
summary: Create a new admission, the name of admission must be unique in admission list.
tags:
- ConfigManagement
/config/admissions/{admission}:
@@ -691,8 +765,7 @@ paths:
security:
- basicAuth:
- '[]'
summary: Create a new auther, the name of the auther must be unique in auther
list.
summary: Create a new auther, the name of the auther must be unique in auther list.
tags:
- ConfigManagement
/config/authers/{auther}:
@@ -924,8 +997,7 @@ paths:
security:
- basicAuth:
- '[]'
summary: Create a new resolver, the name of the resolver must be unique in resolver
list.
summary: Create a new resolver, the name of the resolver must be unique in resolver list.
tags:
- ConfigManagement
/config/resolvers/{resolver}:
@@ -983,8 +1055,7 @@ paths:
security:
- basicAuth:
- '[]'
summary: Create a new service, the name of the service must be unique in service
list.
summary: Create a new service, the name of the service must be unique in service list.
tags:
- ConfigManagement
/config/services/{service}:
+3 -2
View File
@@ -247,13 +247,14 @@ type ServiceConfig struct {
Handler *HandlerConfig `yaml:",omitempty" json:"handler,omitempty"`
Listener *ListenerConfig `yaml:",omitempty" json:"listener,omitempty"`
Forwarder *ForwarderConfig `yaml:",omitempty" json:"forwarder,omitempty"`
Metadata map[string]any `yaml:",omitempty" json:"metadata,omitempty"`
}
type ChainConfig struct {
Name string `json:"name"`
Selector *SelectorConfig `yaml:",omitempty" json:"selector,omitempty"`
Hops []*HopConfig `json:"hops"`
Metadata map[string]any `yaml:",omitempty", json:"metadata,omitempty"`
Metadata map[string]any `yaml:",omitempty" json:"metadata,omitempty"`
}
type ChainGroupConfig struct {
@@ -284,7 +285,7 @@ type NodeConfig struct {
Hosts string `yaml:",omitempty" json:"hosts,omitempty"`
Connector *ConnectorConfig `yaml:",omitempty" json:"connector,omitempty"`
Dialer *DialerConfig `yaml:",omitempty" json:"dialer,omitempty"`
Metadata map[string]any `yaml:",omitempty", json:"metadata,omitempty"`
Metadata map[string]any `yaml:",omitempty" json:"metadata,omitempty"`
}
type Config struct {