Open-EO / openeo-api

The openEO API specification
http://api.openeo.org
Apache License 2.0
91 stars 11 forks source link

UDF support with no runtimes #511

Open soxofaan opened 1 year ago

soxofaan commented 1 year ago

Stumbled on this while looking into UDF capability listings in the wild through hub.openeo.org for #510.

EODC backend has "User-defined functions (UDF)" as supported functionalities, but it lists zero UDF runtimes.

This is probably valid spec-wise, but feels against the spirit of this capability listing.

Shouldn't there a minimum of 1 item in the /udf_runtimes listing?

image

m-mohr commented 1 year ago

Yes, indeed. The capabilities listing is currently only based on the list of endpoints as it's a Vue Component that only gets the GET / response as input. Vue Components itself don't do any HTTP requests though. Backends shouldn't expose endpoints that don't provide any value. For lists we could require a minimum number of entries, but for objects we can't do that in OpenAPI yet (I think).

m-mohr commented 1 year ago

I'd love to solve this just by setting the minimum number of entries for objects (JSON Schema: minProperties), but AFAIK OpenAPI only supports this for arrays. So we can only solve this via documentation for now.

Todo: Require at least one entry for /service_types and /udf_runtimes via docs, add it to the schema once we migrate to OpenAPI 3.1 #299