Similarityoung commented on code in PR #948:
URL: https://github.com/apache/dubbo-go-pixiu/pull/948#discussion_r3339497130


##########
pkg/filter/http/apiconfig/api_config.go:
##########
@@ -74,8 +69,8 @@ func (factory *FilterFactory) Config() any {
 func (factory *FilterFactory) Apply() error {
        factory.apiService = api.NewLocalMemoryAPIDiscoveryService()
 
-       if factory.cfg.Dynamic && (factory.cfg.EnableOpenAPIValidation || 
factory.cfg.OpenAPIPath != "") {
-               return errors.New("dynamic api config does not support openapi 
validation")
+       if factory.cfg.OpenAPIPath != "" || factory.cfg.EnableOpenAPIValidation 
{

Review Comment:
   [P1] 这里可以拦住 `openapi_path` 非空和 `enable_openapi_validation: true`,但仍无法识别 
deprecated key 是否出现过。升级用户如果显式写了 `enable_openapi_validation: false` 或 
`openapi_path: ""`,这段逻辑会静默接受,和“旧 OpenAPI 配置键已迁移,出现就应提示迁移”的目标不一致。建议把 deprecated 
字段改成可检测 presence 的类型/自定义 unmarshal,只要 key 出现在 apiconfig 配置里就 fail fast,并补对应回归测试。



-- 
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]

Reply via email to