|
74 | 74 | from openeo.rest.graph_building import CollectionProperty |
75 | 75 | from openeo.rest.job import BatchJob, RESTJob |
76 | 76 | from openeo.rest.mlmodel import MlModel |
| 77 | +from openeo.rest.models.general import ValidationResponse |
77 | 78 | from openeo.rest.result import SaveResult |
78 | 79 | from openeo.rest.service import Service |
79 | 80 | from openeo.rest.udp import RESTUserDefinedProcess |
@@ -2499,13 +2500,20 @@ def download( |
2499 | 2500 | on_response_headers=on_response_headers, |
2500 | 2501 | ) |
2501 | 2502 |
|
2502 | | - def validate(self) -> List[dict]: |
| 2503 | + def validate(self) -> ValidationResponse: |
2503 | 2504 | """ |
2504 | 2505 | Validate a process graph without executing it. |
2505 | 2506 |
|
2506 | | - :return: list of errors (dictionaries with "code" and "message" fields) |
| 2507 | + :return: container of validation of errors (dictionaries with "code" and "message" fields) |
| 2508 | +
|
| 2509 | + .. versionchanged:: 0.38.0 |
| 2510 | + returns a :py:class:`~openeo.rest.models.general.ValidationResponse` object |
| 2511 | + instead of a simple list of error dictionaries. |
2507 | 2512 | """ |
2508 | | - return self._connection.validate_process_graph(self.flat_graph()) |
| 2513 | + # TODO this method implementation does not really override something |
| 2514 | + # it is just kept to override the doc. |
| 2515 | + # At some point this should be removed for simplicity. |
| 2516 | + return super().validate() |
2509 | 2517 |
|
2510 | 2518 | def tiled_viewing_service(self, type: str, **kwargs) -> Service: |
2511 | 2519 | return self._connection.create_service(self.flat_graph(), type=type, **kwargs) |
|
0 commit comments