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

issue267: basic check for removal of schemas #270

Merged
merged 13 commits into from
Jun 1, 2023

Conversation

wtrocki
Copy link
Contributor

@wtrocki wtrocki commented May 31, 2023

Fix for #267

This PR adds a new optional check that allows us to fail when a model is removed.

Testing

./oasdiff -include-checks api-schema-removed -check-breaking -base ./data/openapi-test1.yaml -revision ./data/openapi-test3.yaml

For some reason, localisation is not picked up:

error   [api-schema-removed] at components.schemas.rules
        in API Unknown rules
                messages.api-schema-removed

List of changes

  • Add new checker option to readme & optional check flag
  • Add the new checker
  • Add unit test to the checker
  • Update breaking-changes.md file
  • Add localization strings and update localizations file with go generate
  • Run tests script

Note: please let me know if there is any further tests I can run to validate my PR.

@wtrocki wtrocki marked this pull request as ready for review May 31, 2023 21:13
@wtrocki
Copy link
Contributor Author

wtrocki commented May 31, 2023

To make reviews easier I will leave this PR for maintainers consideration.
Then create separate PR to support differences in refs for request/response body objects that could cover more edge cases.
Then we can have PR that updates this rule to report on endpoints where model refs have been changed.
Rule on its own is quite useful for me right now in current form.

@reuvenharrison
Copy link
Collaborator

Fixed localization issue above by running go-localize -input checker/localizations_src -output checker/localizations

@reuvenharrison reuvenharrison merged commit 30448f0 into Tufin:main Jun 1, 2023
@wtrocki wtrocki deleted the issue267 branch June 1, 2023 09:24
@wtrocki
Copy link
Contributor Author

wtrocki commented Jun 1, 2023

@reuvenharrison Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants