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

Path parameter duplicated in body. #1366

Open
RolandsThinAirLabs opened this issue Jul 26, 2023 · 1 comment
Open

Path parameter duplicated in body. #1366

RolandsThinAirLabs opened this issue Jul 26, 2023 · 1 comment

Comments

@RolandsThinAirLabs
Copy link

Similar to issue#1356

path parameters provided in the RouteConfig interface are also displayed as parameters in the body of the request in Swagger docs.

for example

{
  method: 'PATCH',
  path: '/user/:id/name/:newName'
}

Will generate a swagger doc that has both path parameters and body parameters as arguments for the route.
The body is not required and the resolver will not receive the body parameters as arguments.

There could be a check to see if the mutation's variables are already accounted for in the path as parameters and then those variables could be skipped when building the request's expected body for swagger.

@RolandsThinAirLabs
Copy link
Author

I've come up with a solution #1367 I'm not sure how to proceed from here.

@Urigo if you could advise on how to submit my solution for review, it would be appreciated.

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

No branches or pull requests

1 participant