Alanxtl commented on code in PR #948:
URL: https://github.com/apache/dubbo-go-pixiu/pull/948#discussion_r3308656556
##########
pkg/filter/http/apiconfig/config.go:
##########
@@ -23,10 +23,8 @@ import (
// ApiConfigConfig the config for api_config filter
type ApiConfigConfig struct {
- APIMetaConfig *model.APIMetaConfig `yaml:"api_meta_config"
json:"api_meta_config,omitempty"`
- Path string `yaml:"path"
json:"path,omitempty"`
- Dynamic bool `yaml:"dynamic"
json:"dynamic,omitempty"`
- DynamicAdapter string `yaml:"dynamic_adapter"
json:"dynamic_adapter,omitempty"`
- OpenAPIPath string `yaml:"openapi_path"
json:"openapi_path,omitempty"`
- EnableOpenAPIValidation bool
`yaml:"enable_openapi_validation" json:"enable_openapi_validation,omitempty"`
+ APIMetaConfig *model.APIMetaConfig `yaml:"api_meta_config"
json:"api_meta_config,omitempty"`
+ Path string `yaml:"path" json:"path,omitempty"`
+ Dynamic bool `yaml:"dynamic"
json:"dynamic,omitempty"`
+ DynamicAdapter string `yaml:"dynamic_adapter"
json:"dynamic_adapter,omitempty"`
}
Review Comment:
removing `openapi_path` and `enable_openapi_validation` silently disables
validation for existing deployments. `ParseConfig` uses plain YAML unmarshal,
so old keys are ignored rather than rejected, and `apiconfig.Apply()` no longer
warns/errors. Users upgrading with the old config will think OpenAPI validation
is still enabled, but requests will pass unvalidated unless they manually add
the new `dgp.filter.http.openapi` filter. Keep deprecated fields and fail fast
or warn with a migration message; add a regression test for legacy config keys.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]