Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Invalid values for parameters must lead to a 400? #234

Closed
m-mohr opened this issue May 17, 2021 · 4 comments
Closed

Invalid values for parameters must lead to a 400? #234

m-mohr opened this issue May 17, 2021 · 4 comments
Labels
Collections Applicable to Collections (consider to use Part 2 instead) Progress: solution merged

Comments

@m-mohr
Copy link

m-mohr commented May 17, 2021

Commons Part 1, §8.1.3, requirement 3 says:

The server SHALL respond with a response with the status code 400, if the request URI includes a query parameter that has an invalid value.

What is an invalid value?

Some examples:

  • You have a limit parameter defined, type number with maximum value 100 in the OpenAPI Schema: Is passing a limit of 200 valid? Related issue: Querying the maximum value for limit #173
  • You have a parameter to search for IDs. You pass ids=[1,2,3] but the server only has data with the IDs 2,3,4. Is that valid?
@cmheazel
Copy link
Contributor

@m-mohr Please see "/per/core/query-param-value-tolerance". This permission was added on May 18 in respose to issue #173 but I think it addresses your issue as well.

@cmheazel cmheazel added Collections Applicable to Collections (consider to use Part 2 instead) Progress: solution merged labels May 18, 2021
@m-mohr
Copy link
Author

m-mohr commented May 18, 2021

I can't find any mention of query-param-value-tolerance in this repository. Can you clarify where I can find this?

@cmheazel
Copy link
Contributor

@m-mohr You will find PER_query-param-value-tolerance.adoc under ogcapi-common/general/recommendations/general/.

@cmheazel
Copy link
Contributor

May 24, 2021 SWG - Agree that this issue can be closed.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Collections Applicable to Collections (consider to use Part 2 instead) Progress: solution merged
Projects
Development

No branches or pull requests

2 participants