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

Swagger UI: Endpoints with IDs cause 404 #129

Closed
MRichards99 opened this issue Jun 10, 2020 · 0 comments · Fixed by #132
Closed

Swagger UI: Endpoints with IDs cause 404 #129

MRichards99 opened this issue Jun 10, 2020 · 0 comments · Fixed by #132
Assignees

Comments

@MRichards99
Copy link
Collaborator

MRichards99 commented Jun 10, 2020

An example of this is with /users/{id} - making use of the ID parameter causes a 404:
image
This is because the user's input isn't transmitted into the request URL (this can be seen in the above screenshot). Fixing this issue is just a case of changing the name of the parameter in the Swagger docs (in the endpoint files) so that it uses id rather than ID. Swagger is case sensitive, as per: https://swagger.io/docs/specification/describing-parameters/#path-parameters

Other endpoints that utilise this ID parameter should also be checked and corrected where needed.

MRichards99 added a commit that referenced this issue Jun 10, 2020
- Swagger is case sensitive when using parameters
- This change means endpoints with an ID parameter (e.g. /users/{id}) will now work using the Swagger UI user input for said ID
@MRichards99 MRichards99 self-assigned this Jun 10, 2020
@MRichards99 MRichards99 linked a pull request Jun 10, 2020 that will close this issue
MRichards99 added a commit that referenced this issue Jun 11, 2020
Conflicts:
	src/swagger/openapi.yaml
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 a pull request may close this issue.

1 participant