Skip to content
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

False-positive breaking change when adding anyOf to a response-property-type-changed #398

Closed
ashb opened this issue Oct 13, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ashb
Copy link

ashb commented Oct 13, 2023

Describe the bug

I have a response property of nextRunAt that was before defined as:

          "nextRunAt": {
            "description": "Time at which the next DagRun can be created",
            "format": "date-time",
            "title": "Next Run At",
            "type": "string"
          },

And now it's changed to the following:

          "nextRunAt": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time at which the next DagRun can be created",
            "title": "Next Run At"
          },

(It's a question if it should be anyOf or oneOf, but oasdiff does the same)

A clear and concise description of what the bug is.

To Reproduce
Sorry it's not a full snippet. Hopefully the above is enough detail.

Expected behavior

Since this is adding a new type that can now be returned (null) but the existing type was still there this should not be a breaking change.

@ashb ashb added the bug Something isn't working label Oct 13, 2023
@ashb
Copy link
Author

ashb commented Oct 25, 2023

Thinking more about it I guess this could be a breaking change, as if a value (a string) was always expected before, but it could now be null then the client could break.

@ashb ashb closed this as completed Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant