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

Body param duplicated in query param on mutation routes #1356

Open
antoineandrieu opened this issue Jun 15, 2023 · 0 comments
Open

Body param duplicated in query param on mutation routes #1356

antoineandrieu opened this issue Jun 15, 2023 · 0 comments

Comments

@antoineandrieu
Copy link

I've noticed an issue when generating mutation route schemas with the current version of SOFA. Specifically, I observed that the variables appear in both the request body and in the query parameters. You can find this behavior occurring here.

It's not clear to me what the rationale behind this behavior is. In the use case I'm working on, the more logical approach would be to place the mutation-specific variables exclusively in the request body. This would create a clear separation between the two and follow RESTful best practices more closely.
However, I understand there could be cases where query or path parameters might be necessary for routes that modify resources. So, a straightforward removal might not be the best solution.

Would it be possible to discuss this further and potentially reconsider how this is currently implemented? A configuration option to control this behavior could be one possible approach. I'm open to contributing to the solution.

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