-
Notifications
You must be signed in to change notification settings - Fork 30
better queryables #427
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
base: main
Are you sure you want to change the base?
better queryables #427
Conversation
…generic attributes
"$schema" to the one from pgstac (seems newer and more advanced) "$id" made it dynamic
@@ -20,6 +21,7 @@ class EsAsyncBaseFiltersClient(AsyncBaseFiltersClient): | |||
async def get_queryables( | |||
self, collection_id: Optional[str] = None, **kwargs | |||
) -> Dict[str, Any]: | |||
request: Optional[Request] = kwargs.get("request").url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, you put code before a docstring, which I believe removes the docstring from the method. This typing : Optional[Request]
also seems incorrect. url with either be of Url or str type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks :)
@@ -38,8 +40,8 @@ async def get_queryables( | |||
Dict[str, Any]: A dictionary containing the queryables for the given collection. | |||
""" | |||
queryables: Dict[str, Any] = { | |||
"$schema": "https://json-schema.org/draft/2019-09/schema", | |||
"$id": "https://stac-api.example.com/queryables", | |||
"$schema": "https://json-schema.org/draft-07/schema#", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An empty fragment #
in links does nothing. May as well remove the extra character to keep the link clean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks :)
added missing copy(), updated DEFAULT_QUERYABLES so it contains only generic attributes
Description:
PR Checklist:
pre-commit run --all-files
)make test
)