interagent / committee

A collection of Rack middleware to support JSON Schema.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support strict mode for query parameter

ota42y opened this issue · comments

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

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).