Closed vincentsarago closed 4 days ago
@vincentsarago How should we move ahead with this?
@jonhealy1 it's a big
breaking change IMO, and we should wait for 4.0 for this kind of change.
I think I changed my mind and we should ship this in 3.0 π
in π https://github.com/stac-utils/stac-fastapi/blob/51a756d904e4bab245da4a525e961d64bcbf1321/stac_fastapi/api/stac_fastapi/api/app.py#L255-L263
We check if the
FieldsExtension
extension is part of the allowed extension, and then remove output model validation if present (because when using fields, the output Item can be an invalid STAC Item).This works OK, but brings multiple issues:
fields
parameter is passed and the application is set to validate the items?stac-fastapi.api
depends onstac-fastapi.extensions
IMO, this is an implementation issue that
stac-fastapi.api
shouldn't take care.At the implementation level should could be dealt like:
βοΈ This pseudo code show that when a
fields
parameter is passed we should return thesearch_results
directly by returning aResponse
object, which won't bevalidated
by fastAPI