-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
When using "allOf", breaking changes are not detected. #164
Comments
@JFCote The way you defined the override file is incorrect. For a change to be detected at "/something/else/*", we also need to define the changes for "/something" as well as "/something/else". The process is explained here: #19 I think the docs needs to communicate it better. And better yet, if somehow we could detect "/something/else/*" directly without having those intermediate classifications. I'll start thinking of improving the lib in that way :) For now, here's the classification you need to put in your override file: "/components/schemas/*": {
"add": "non-breaking",
"remove": "breaking",
"edit": "breaking"
},
"/components/schemas/*/allOf": {
"add": "breaking",
"remove": "breaking",
"edit": "breaking"
},
"/components/schemas/*/allOf/*": {
"add": "breaking",
"remove": "breaking",
"edit": "breaking"
},
"/components/schemas/*/allOf/*/required": {
"add": "breaking",
"remove": "breaking",
"edit": "breaking"
},
"/components/schemas/*/allOf/*/required/*": {
"add": "breaking",
"remove": "breaking",
"edit": "breaking"
}, Thanks! |
Thanks! That did the trick!! |
This issue has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
seems to be solved |
Describe the bug
When using
allOf
in a model, breaking changes are not detected.How to Reproduce
Using these 2 spec files:
spec1.yaml
spec1.yaml
Breaking change rules:
Breaking Change Rules
I then use this command:
asyncapi diff ./spec1.yaml ./spec2.yaml -o breaking-changes-override.json -t breaking -f json
Notice that no breaking changes are detected even if we deleted a required statement.
Expected behavior
The breaking changes should be detected by this section of the rules:
The text was updated successfully, but these errors were encountered: