@@ -35,12 +35,17 @@ type ArangoRouteSpecDestination struct {
3535 // Endpoints defines service upstream reference - which is used to find endpoints
3636 Endpoints * ArangoRouteSpecDestinationEndpoints `json:"endpoints,omitempty"`
3737
38+ // Redirect defines redirect instruction
39+ Redirect * ArangoRouteSpecDestinationRedirect `json:"redirect,omitempty"`
40+
3841 // Schema defines HTTP/S schema used for connection
42+ // +doc/default: http
3943 // +doc/enum: http|HTTP Connection
4044 // +doc/enum: https|HTTPS Connection (HTTP with TLS)
4145 Schema * ArangoRouteSpecDestinationSchema `json:"schema,omitempty"`
4246
4347 // Protocol defines http protocol used for the route
48+ // +doc/default: http1
4449 // +doc/enum: http1|HTTP 1.1 Protocol
4550 // +doc/enum: http2|HTTP 2 Protocol
4651 Protocol * ArangoRouteDestinationProtocol `json:"protocol,omitempty"`
@@ -68,6 +73,14 @@ func (a *ArangoRouteSpecDestination) GetService() *ArangoRouteSpecDestinationSer
6873 return a .Service
6974}
7075
76+ func (a * ArangoRouteSpecDestination ) GetRedirect () * ArangoRouteSpecDestinationRedirect {
77+ if a == nil || a .Redirect == nil {
78+ return nil
79+ }
80+
81+ return a .Redirect
82+ }
83+
7184func (a * ArangoRouteSpecDestination ) GetEndpoints () * ArangoRouteSpecDestinationEndpoints {
7285 if a == nil || a .Endpoints == nil {
7386 return nil
@@ -132,9 +145,10 @@ func (a *ArangoRouteSpecDestination) Validate() error {
132145 }
133146
134147 if err := shared .WithErrors (
135- shared .ValidateExclusiveFields (a , 1 , "Service" , "Endpoints" ),
148+ shared .ValidateExclusiveFields (a , 1 , "Service" , "Endpoints" , "Redirect" ),
136149 shared .ValidateOptionalInterfacePath ("service" , a .Service ),
137150 shared .ValidateOptionalInterfacePath ("endpoints" , a .Endpoints ),
151+ shared .ValidateOptionalInterfacePath ("redirect" , a .Redirect ),
138152 shared .ValidateOptionalInterfacePath ("schema" , a .Schema ),
139153 shared .ValidateOptionalInterfacePath ("protocol" , a .Protocol ),
140154 shared .ValidateOptionalInterfacePath ("tls" , a .TLS ),
0 commit comments