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

support strict mode for query parameter #320

Open
ota42y opened this issue May 22, 2021 · 1 comment
Open

support strict mode for query parameter #320

ota42y opened this issue May 22, 2021 · 1 comment
Labels

Comments

@ota42y
Copy link
Member

ota42y commented May 22, 2021

It is useful to make an error when undefined data is sent by query parameter.
OpenAPI 3 definition doesn't define this pattern but it's useful for users using strict option so we should support as committee's feature.
But this feature break backward compatibility, so we should add stric_query_parameter option.

#263

@ota42y ota42y added the ready label May 22, 2021
@ahx
Copy link

ahx commented Apr 3, 2023

In openapi_first I have implemented this so that it does not produce an error if the client does send unknown keys, but the params returned by the gem, env[committee.query_hash] in this case, do only include defined parameters. This makes sure that the API sticks to it's API description (OpenAPI), but does not break if a client sends a long meaningless unknown parameters (like _utm=1234).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants