snazy commented on PR #9940:
URL: https://github.com/apache/iceberg/pull/9940#issuecomment-2032202321

   > > I've got strong concerns about using `enum` here - special handling here 
and there, I think, that complicates things for adopters of any OpenAPI spec.
   > 
   > @snazy we use `enum` in the OpenAPI spec to list possible values of a 
string, which is also what's being documented in 
https://swagger.io/docs/specification/data-models/enums/. The underlying type 
of a capability is still a `string`. Do you have an alternative in mind for the 
issue you're seeing? Also I believe when code is generated from the OpenAPI 
spec, there should be an option to generate enums as literals
   
   The issue at hand is that an enum cannot (by default) handle unknown values 
- which is generally fine. But here we have to expect that endpoints to return 
values that are _not_ known by a client. (Not only generated) client's that did 
not handle this rather special case will fail to parse the result, which is a 
problem. I'm still in favor of just using a string.


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to