You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to add a route with a name of 58 characters. I am getting the following error: {"code":10004,"message":"input validate failed: Key: 'UpdateInput.Route.Name' Error:Field validation for 'Name' failed on the 'max' tag","data":null,"request_id":"e4ff8fea-7a46-492b-9d0d-b0b81c12ad75"}
In schema.json file route name is defined with the following values (line number 409):
However in entity.go file the Route struct is defined as the following:
type Route struct {
BaseInfo
URI string `json:"uri,omitempty"`
Uris []string `json:"uris,omitempty"`
` Name string `json:"name" validate:"max=50"``
Desc string `json:"desc,omitempty" validate:"max=256"`
Priority int `json:"priority,omitempty"`
Methods []string `json:"methods,omitempty"`
Host string `json:"host,omitempty"`
Hosts []string `json:"hosts,omitempty"`
RemoteAddr string `json:"remote_addr,omitempty"`
RemoteAddrs []string `json:"remote_addrs,omitempty"`
Vars []interface{} `json:"vars,omitempty"`
FilterFunc string `json:"filter_func,omitempty"`
Script interface{} `json:"script,omitempty"`
ScriptID interface{} `json:"script_id,omitempty"` // For debug and optimization(cache), currently same as Route's ID
Plugins map[string]interface{} `json:"plugins,omitempty"`
PluginConfigID interface{} `json:"plugin_config_id,omitempty"`
Upstream *UpstreamDef `json:"upstream,omitempty"`
ServiceID interface{} `json:"service_id,omitempty"`
UpstreamID interface{} `json:"upstream_id,omitempty"`
ServiceProtocol string `json:"service_protocol,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
EnableWebsocket bool `json:"enable_websocket,omitempty"`
Status Status `json:"status"`
}
There seems to be an inconsistence between the two.
Expected behavior
According to the schema.json file I am expecting to be able to add a route with a name of 100 characters. Even if that would seem too much, at least I think 64 characters should be supported in the naming convention.
How to Reproduce
Add a route with a name of more than 50 characters.
Screenshots
No response
Environment
apisix-dashboard version 2.13.0
Additional context
No response
The text was updated successfully, but these errors were encountered:
Issue description
I am trying to add a route with a name of 58 characters. I am getting the following error:
{"code":10004,"message":"input validate failed: Key: 'UpdateInput.Route.Name' Error:Field validation for 'Name' failed on the 'max' tag","data":null,"request_id":"e4ff8fea-7a46-492b-9d0d-b0b81c12ad75"}
In schema.json file route name is defined with the following values (line number 409):
However in entity.go file the Route struct is defined as the following:
There seems to be an inconsistence between the two.
Expected behavior
According to the schema.json file I am expecting to be able to add a route with a name of 100 characters. Even if that would seem too much, at least I think 64 characters should be supported in the naming convention.
How to Reproduce
Add a route with a name of more than 50 characters.
Screenshots
No response
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: