Open-EO / openeo-api

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

PUT '/process_graphs/{process_graph_id}' response #498

Closed soxofaan closed 1 year ago

soxofaan commented 1 year ago

PUT '/process_graphs/{process_graph_id}' https://github.com/Open-EO/openeo-api/blob/c5a45b4647b06e313a4f099e9119bfa3cca5c6a3/openapi.yaml#L2426-L2429

defines 200 response, but does not define its content type. Other 200 responses have:

          content:
            application/json:

Is there a body in that response, or isn't there (and should it be a 201/202 or 204?)

soxofaan commented 1 year ago

(came up while automatically parsing the api doc in context of https://github.com/Open-EO/openeo-python-client/issues/439)

m-mohr commented 1 year ago

This is intentional:

  1. No response body as for most other resources that create (POST /services etc)
  2. 201 usually are accompanied by a Location header to show where the resource lives and which ID has been generated. Here, this is not required as the ID is provided and known by the user. Also, the PUT method is used here to Create and Update. So 200 seemed a bit more reasonable than 201. Both would be fine, but changing it now would be breaking.