Currently the equality operator might return false when comparing a union initialized with its implicit default value and the same generated by another middleware. This is because we expects the discriminator's value should be equal, but it is not mandatory. This PR fixes this.
Contributor Checklist
[x] Commit messages follow the project guidelines.
N/A Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
N/A New feature has been documented/Current behavior is correctly described in the documentation.
N/A Applicable backports have been included in the description.
Reviewer Checklist
[x] The PR has a milestone assigned.
[x] The title and description correctly express the PR's purpose.
[x] Check contributor checklist is correct.
[x] Check CI results: changes do not issue any warning.
[x] Check CI results: failing tests are unrelated with the changes.
Description
Currently the equality operator might return
false
when comparing a union initialized with its implicit default value and the same generated by another middleware. This is because we expects the discriminator's value should be equal, but it is not mandatory. This PR fixes this.Contributor Checklist
Reviewer Checklist