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

[Greencity API] Incorrect 404 Not Found Response in Swagger Documentation for Greencity API Endpoints #8017

Open
marim87 opened this issue Jan 10, 2025 · 0 comments
Assignees

Comments

@marim87
Copy link

marim87 commented Jan 10, 2025

Environment: Windows 10 Pro, Google Chrome Version 130.0.6723.117 (Official Build) (64-bit).
Reproducible: always
Build found: commit [487e4c0] (ita-social-projects/GreenCityClient@487e4c0)

The Swagger documentation for the Greencity API currently specifies that a 404 Not Found response code can be returned for the following requests:

GET /friends/not-friends-yet
GET /friends/friendRequests
However, these endpoints do not include any path parameters, and as such, the 404 Not Found response code should not be supported in the Swagger documentation for these specific requests.

Additionally, when executing requests for non-existent resources (exasmple: GET /friends/not-friends-yetyet or GET /friends/friendRequestsSS), the API returns a 403 Forbidden response code instead of the expected 404 Not Found response code for non-existent resources. This discrepancy between expected and actual behavior should be addressed.
Please find attached examples of requests from Postman.

image
image

Acceptance Criteria
Remove the 404 Not Found response code from the Swagger documentation for GET /friends/not-friends-yet and GET /friends/friendRequests endpoints.
Update the Swagger documentation to reflect the correct expected response codes for these endpoints.
Investigate and correct the API behavior to return 404 Not Found for non-existent resources, instead of 403 Forbidden.

@github-project-automation github-project-automation bot moved this to Sprint Backlog in GreenCity Jan 13, 2025
@marim87 marim87 moved this from Sprint Backlog to Bugs in GreenCity Jan 13, 2025
@Cr1stal423 Cr1stal423 self-assigned this Jan 13, 2025
@Cr1stal423 Cr1stal423 moved this from Bugs to Bugs in progress in GreenCity Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Bugs in progress
Development

No branches or pull requests

2 participants