-
Notifications
You must be signed in to change notification settings - Fork 418
Deprecate x-extensible-enum #837
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
base: main
Are you sure you want to change the base?
Conversation
Implements #831.
invalid team IDThe team ID in your You can follow this guideline for help. |
2 similar comments
invalid team IDThe team ID in your You can follow this guideline for help. |
invalid team IDThe team ID in your You can follow this guideline for help. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the PR -- LGTM!
I provided some (mostly editorial) change proposals.
There are other occurrences of x-extensible-enum
in the following rules that need to be updated:
The Event Type specification: rule #197 also uses x-extensible-enum
. However, the rule anyway needs to be cleaned-up -- see Issue: Optimize the Event Guidelines for its usage with Nakadi. So I propose to handle this via a separate PR for the Event Guideline Clean-Up issue.
Additionally, I propose to add a log entry to the Change History.
@@ -124,8 +124,11 @@ Service clients should apply the robustness principle: | |||
http://martinfowler.com/bliki/TolerantReader.html["TolerantReader"] post), | |||
i.e. ignore new fields but do not eliminate them from payload if needed for | |||
subsequent {PUT} requests. | |||
** Be prepared that {x-extensible-enum} return parameters (see <<112, rule 112>>) may deliver new values; | |||
either be agnostic or provide default behavior for unknown values, and do not eliminate them. | |||
** Be prepared that "extensible enum" return parameters (see <<112, rule 112>>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
** Be prepared that "extensible enum" return parameters (see <<112, rule 112>>) | |
** Be prepared that <<112, extensible enum>> return parameters |
** Be prepared that "extensible enum" return parameters (see <<112, rule 112>>) | ||
may deliver new values; | ||
either be agnostic or provide default behavior for unknown values, and | ||
do not eliminate them if needed for subsequent {PUT} requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not eliminate them if needed for subsequent {PUT} requests. | |
do not eliminate them when passed with subsequent {PUT} requests. |
intermediaries (but that was rarely implemented). | ||
It was visible in a few tools (e.g. Swagger UI), but ignored by most others. | ||
|
||
An open-ended list of values was specified as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would move this example up after ... with a similar semantic:
.
|
||
We also thought we could have some validations (e.g. by our event bus Nakadi), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also thought we could have some validations (e.g. by our event bus Nakadi), | |
We also thought we could provide validations in our infrastructure |
@@ -953,23 +953,29 @@ maintain compatibility as they will not be in a position to serve | |||
versioned media types on demand. | |||
|
|||
For event schema, these are considered backward compatible changes, as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For event schema, these are considered backward compatible changes, as | |
For event schema, these are considered full compatible changes, as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, Nakadi has the three levels of compatibility (compatible, forward, none), while we here only describe the difference between the first two. Not sure if naming these "full compatible" and "incompatible" is the right thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let us use the Nakadi wording, i.e. compatible
instead of full compatible
(= backward and forward compatible). Let us use non-compatibel
as opposed to compatible
.
Let us avoid defining the other 'compatibility modes' of Nakadi -- will be linked when we do the Nakadi / Guideline clean-up.
* Removing an individual value from an enumeration. | ||
* Adding new value to a {x-extensible-enum} field (see <<112, rule 112>> and <<108, rule 108>>). | ||
* Adding new values to extensible enum fields (see <<112, rule 112>> and <<108, rule 108>>). | ||
|
||
These are considered backwards-incompatible changes, as seen by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are considered backwards-incompatible changes, as seen by | |
These are considered *in*compatible changes, as seen by |
Co-authored-by: Thomas Frauenstein <[email protected]>
@ePaul I just discovered that 'examples' in OpenAPI 3.0 is not yet consistent with JSON Schema -- this was only fixed with OpenAPI 3.1! In OpenAPI 3.0 |
As OpenAPI 3.0 doesn't have |
Implements #831.
Also some minor changes to clarify things elsewhere.