This repository serves as showcase for AutoGuard. AutoGuard is set up to report breaking REST API changes in pull and merge requests for GitHub and GitLab.
The repository contains a minimal Spring Boot web service with a single controller that consists of three REST API methods for adding and querying customer data models.
If you want to test AutoGuard's functionality, you can fork this repository. After forking, make sure to enable GitHub Actions in your repository settings.
Ensure you have the following installed before running or modifying the Spring Boot service:
- Java (JDK 11+)
- Maven
- Git
- An IDE of your choice (e.g., IntelliJ IDEA)
- Fork this repository on GitHub.
- Clone your fork and navigate into the project directory:
git clone https://github.com/YOUR-GITHUB-USERNAME/AutoGuard-example-project.git cd AutoGuard-example-project - Create a new branch in your fork:
git checkout -b feature-branch
- Introduce a breaking change in the REST API (e.g., renaming endpoints, modifying request/response models, changing parameters).
- Commit and push your changes:
git add . git commit -m "Introduce breaking change for testing AutoGuard" git push origin feature-branch
- Create a pull request (PR) in your forked repository (please not to the original repository).
- Wait for AutoGuard to analyze your changes. It runs automatically as part of the PR checks.
- Review the results in the GitHub Actions logs and artifacts on the job summary page.
We also provide a demonstration video on YouTube.
If you prefer not to install the prerequisites, you can perform all steps directly on GitHub:
- Fork this repository on GitHub.
- Go to your forked repository and click on the "Code" tab.
- Create a new branch: Click the "branch" dropdown, type a new branch name (e.g.,
feature-branch), and press Enter. - Introduce a breaking change in the REST API directly on GitHub by opening files and clicking the "Edit" button (e.g., renaming endpoints, modifying request/response models, changing parameters).
- Commit your changes: Scroll down to "Commit changes", enter a message, and select "Commit directly to
feature-branch". - Create a pull request (PR) in your forked repository (please not to the original repository):
- Go to the "Pull requests" tab in your forked repo.
- Click "New pull request".
- Select
feature-branchas the source branch. - Select a target branch in your own repository.
- Click "Create pull request".
- Wait for AutoGuard to analyze your changes. It runs automatically as part of the PR checks.
- Review the results in the GitHub Actions logs and artifacts on the job summary page.