Baoyuantop commented on issue #3376:
URL: 
https://github.com/apache/apisix-dashboard/issues/3376#issuecomment-4221802310

   The root cause is that the Zod schema is too restrictive.
   
   src/types/schema/apisix/upstreams.ts:
   
   ```
   const UpstreamDiscovery = z.object({
      discovery_type: z.string().optional(),
      service_name: z.string().optional(),
      discovery_args: z.object({}).optional(),  // ← this is the issue
    });
   ```
   
    z.object({}) defines an object in Zod that does not contain any known 
properties. Zod’s default behavior is to strip unknown properties; that is, 
when a user enters {“group_name”: “my-group”}, Zod parses it into {}, 
discarding all key-value pairs.
   
   Welcome to create a PR to fix it.


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

Reply via email to