-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guidance on extensible enums #412
Comments
@JonKohler Thanks for sharing this with us. We decided for adding the extension keyword
doesn't fit well to our needs. The same with Personally, I can live without description on enumeration values, as I think if the value is not self-speaking it should be changed, but I could understand requirements for more description. |
Haven't had the time to discuss this in last guild meeting. Trying to do it next week. |
I somehow missed this until now ... JSON schema's
One could say that it is now obsolete because OpenAPI 3.0's As I understand, the approach by Azure is to use just OpenAPI's (and JSON schema's) As said by Tronje, we wanted to avoid redefining the meaning |
@JonKohler any progress on the I noted that the schema object is inconsistent in the way that it is based on JSON Schema Validation (Draft 6) without I think we could commit to this, as we although see the need for documenting enums - fixed set as well as extensible ones. Unfortunately, JSON Schema Validation (Draft 7) does not solve this consistently, as |
Closing, as there is currently nothing we want/can do here. |
@JonKohler please reopen this issue, if you have new information about this. |
issue about introducing x-extensible-enum is that it breaks the semantic of at a point of time a restriction of the value of a string. and here will be discarded by most of the JSon Schema validator , that is kind of worrying |
hey Zalando team! We're looking to leverage some of the great restful API guidance that you all have produced as part of an effort to standardize our rest API design at our company, and I had a quick question about extensible enums, as defined here: https://opensource.zalando.com/restful-api-guidelines/#112
Earlier this year, I referenced this configuration in a feature request to openapi upstream, here: OAI/OpenAPI-Specification#1552
Specifically around upstream adopting some sort of extensible enum support.
Since then, I've been looking around more at what some others are doing, and I've come across the Microsoft Azure way of doing things, here: https://github.com/Azure/autorest/blob/master/docs/extensions/readme.md#x-ms-enum
IMHO, I really like the what that Azure has approached this problem, as not only do you work around the static enum issues that have plagued coding styles forever, but you get the opportunity to add even more extensiblity than just a simple growable list.
I'm curious to get your teams sage guidance on this, and see if there is a way to potentially parlay all of these efforts together to come up with a single community standard, that then we could perhaps help the openapi upstream community adopt.
Lemme know!
jon@nutanix.com, github.com/nutanix
The text was updated successfully, but these errors were encountered: