But this is not recognized in TiTiler because the validation of the colormap parameter is expecting a str instead of a dict.
I was able to fix this locally by dumping the JSON dict back into a str when constructing the LayerDict, but I don't know if this is the best solution.
We are trying to use a custom
colormap
configured in the STAC render extension, following the color map JSON definition. https://github.com/stac-extensions/render?tab=readme-ov-file#render-objectBut this is not recognized in TiTiler because the validation of the colormap parameter is expecting a
str
instead of adict
.I was able to fix this locally by dumping the JSON
dict
back into astr
when constructing theLayerDict
, but I don't know if this is the best solution.https://github.com/developmentseed/titiler-stacapi/blob/aaf424912107ee7edebb79a8ca58cf30233673e8/titiler/stacapi/factory.py#L650-L652