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
Update addError to give precedence to newly added schemas
HttpApiSchema.UnionUnify creates a union whose members are listed in the
order of `[...firstArgUnionMembers, ...secondArgUnionMembers]`. When
encoding a union, Schema will try each member in the order that they
appear.
So the `addError` method on each of the HttpApi* classes, by passing the
user-provided schema as a second argument, causes older schemas that
encompass newer schemas to take precedence over the newer ones.
By flipping the argument order, users are now able to use `addError`
with a schema that (partly) encompasses an older one, to override the
encoding behaviour of value conforming to that schema.
0 commit comments