Skip to content

Commit

Permalink
Back in black
Browse files Browse the repository at this point in the history
  • Loading branch information
Yrob committed Jun 7, 2024
1 parent 4b2e257 commit 7a779c7
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/dso_api/dynamic_api/filters/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from schematools.types import DatasetFieldSchema, DatasetTableSchema, Temporal

from dso_api.dynamic_api.filters import parser
from dso_api.dynamic_api.filters.parser import QueryFilterEngine, ALLOWED_SCALAR_LOOKUPS
from dso_api.dynamic_api.filters.parser import ALLOWED_SCALAR_LOOKUPS, QueryFilterEngine

RE_GEOJSON_TYPE = re.compile(r"^https://geojson\.org/schema/(?P<geotype>[a-zA-Z]+)\.json$")

Expand Down Expand Up @@ -101,15 +101,17 @@ def get_table_filter_params(table_schema: DatasetTableSchema) -> list[dict]: #
lookups = ALLOWED_SCALAR_LOOKUPS[start.format or start.type]

for lookup in lookups:
openapi_params.append({
"name": name if lookup == "" else f"{name}[{lookup}]",
"in": "query",
# TODO: add description
"schema": {
"type": start.type,
"format": start.format,
},
})
openapi_params.append(
{
"name": name if lookup == "" else f"{name}[{lookup}]",
"in": "query",
# TODO: add description
"schema": {
"type": start.type,
"format": start.format,
},
}
)

return openapi_params

Expand Down

0 comments on commit 7a779c7

Please sign in to comment.