You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "OAS" section should have a section on how to handle "mutually exclusive fields", and include the snippet outlined below as well as note that this is equivalent to a protobuf oneOf. We shouldn't call this section "oneOf" because that would overlap with the JsonSchema concept that is more common to OAS.
In the section of "mutually exclusive" section on OAS, note that it's fine to not document this schema given it's complexity. Validation should be handled server-side.
Example schema of how to translate protobuf OneOf to JsonSchema:
After a live discussion around how to document mutually exclusive field behavior (protobuf oneofs) in OpenAPI, we came up with the following ideas:
Example schema of how to translate protobuf OneOf to JsonSchema:
The text was updated successfully, but these errors were encountered: