Skip to content

How to disallow unknown query parameter? #2511

Description

@smikulcik

The operation object allows folks to specify parameters, but how can I express that no unnamed parameters may be accepted?

We've had issues where clients are passing in query parameters thinking that they're accepted when actually they are not.

How do folks feel about introducing something like additionalQueryParameters for parameters?

/foo:
  get:
    parameters:
      limit:
        in: query
      offset:
        in: query
    additionalQueryParameters: false
    ...

Then when folks do GET /foo?start=xxx-xxx-xxx they'll get an error instead of a silent failure.

Other links on the web:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

param serializationIssues related to parameter and/or header serialization

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions