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

WIP: Reduce swagger docs boilerplate annotations #749

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mtac50
Copy link
Contributor

@mtac50 mtac50 commented May 18, 2023

What

Link to story

Describe what you did and why.

Checklist

Before you ask people to review this PR:

  • Tests should be passing: ./gradlew test
  • Github should not be reporting conflicts; you should have recently run git rebase main.
  • Avoid mixing whitespace changes with code changes in the same commit. These make diffs harder to read and conflicts more likely.
  • You should have looked at the diff against main and ensured that nothing unexpected is included in your changes.
  • You should have checked that the commit messages say why the change was made.

@mtac50 mtac50 requested a review from a team as a code owner May 18, 2023 09:19
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@stone-dj stone-dj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, it's always great to see a reduction in duplicated boiler plate code!

Once merged in we need to ensure the wider development team/reviewers are aware of these annotations and use them for any new dev. We also need a strategy to apply this standard across the whole MAAT API project.

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
@ApiResponse(
responseCode = "404",
Copy link
Contributor

@lkm0287 lkm0287 May 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing potential responses above show that HTTP 400 and 500 could be returned however this change makes the only expected response HTTP 404 (not previously an expected response). This seems to be changing our API documentation as well as removing boilerplate code?

@mtac50 mtac50 changed the title Reduce swagger docs boilerplate annotations WIP: Reduce swagger docs boilerplate annotations May 23, 2023
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.

3 participants