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

Bbox improvements #50

Merged
merged 10 commits into from
Nov 4, 2020
Merged

Bbox improvements #50

merged 10 commits into from
Nov 4, 2020

Conversation

cholmes
Copy link
Collaborator

@cholmes cholmes commented Nov 2, 2020

Related Issue(s): #28 #47

Proposed Changes:

  1. Update the openapi yaml to only allow 4 or 6 element bbox arrays
  2. Link to examples and put in a bit more language around bbox

PR Checklist:

  • This PR has no breaking changes.
  • I have added my changes to the CHANGELOG or a CHANGELOG entry is not required.
  • API only: I have run npm run generate-all to update the generated OpenAPI files.

STAC-extensions.yaml Outdated Show resolved Hide resolved
api-spec.md Outdated
@@ -135,7 +135,7 @@ This Link should look like:

Unless otherwise noted by **Path-only**, these filters are passed as query string parameters, form parameters, or JSON
entity fields. For filters that represent a set of values, query and form parameters should use comma-separated
string values and JSON entity attributes should use JSON Arrays.
string values (with no outer brackets \[ or \]) and JSON entity attributes should use JSON Arrays.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused. So it's comma separated values, but "JSON entity attributes should use JSON Arrays"? Does that conflict? What does "JSON entity attributes should use JSON Arrays" actually mean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm 90% sure that this means:

  • If you are using query string parameters (GET request to /search/) you should do bbox=10,10,20,20
  • If you are using JSON requests (POST to /search/) then you should do "bbox": [10,10,20,20]

But obviously, that is not clear. If my explanation makes sense then I can expand this description out. It occurs to me we should also just remove the 'form parameters', and perhaps put it back in if we do #4

Copy link
Collaborator

@m-mohr m-mohr Nov 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see. Let's better improve that, too, but I'm approving anyway for now as the main issue has been solved.

@cholmes cholmes merged commit 0cf9af5 into master Nov 4, 2020
@cholmes cholmes deleted the bbox-fixes branch November 4, 2020 17:43
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

Successfully merging this pull request may close these issues.

2 participants