Follow HTML standards for query string List #349
vincentsarago
started this conversation in
General
Replies: 1 comment
-
Side note: Removing if dependency defines correct options we could then do something like: @dataclass
class DefaultDependency:
"""Dataclass with dict unpacking"""
def keys(self):
return self.__dict__.keys()
def __getitem__(self, key):
return self.__dict__[key]
@dataclass
class BidxParams(DefaultDependency):
"""Band Indexes parameters."""
indexes: Optional[List[str]] = Query(
None, title="Band indexes", description="band indexes",
)
def tile(
z: int = Path(..., ge=0, le=30, description="Mercator tiles's zoom level"),
x: int = Path(..., description="Mercator tiles's column"),
y: int = Path(..., description="Mercator tiles's row"),
src_path: DatasetPathParams = Depends(),
layer_params: BidxParams = Depends(),
)
with COGReader( src_path) as src_dst:
data = src_dst.tile(
x,
y,
z,
**layer_params, # previously **layer_params.kwargs
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
ref: #347, #262 (comment)
Problem description
Historically we choose to allow passing list values (
bidx
,bands
,assets
) as comma delimited value encoded in string (e.gbidx=1,2,3
), which is then decoded to listtitiler/src/titiler/core/titiler/core/dependencies.py
Lines 89 to 101 in 1879706
This works fine BUT is not standard.
Breaking change
this will be a breaking change but I feel it's better to follow standard.
Beta Was this translation helpful? Give feedback.
All reactions