@@ -86,9 +86,12 @@ class DatabaseClient(ogc_api_processes_fastapi.clients.BaseClient):
86
86
@exceptions .exception_logger
87
87
def get_processes (
88
88
self ,
89
- limit : int | None = fastapi .Query (10 , ge = 1 , le = 10000 ),
89
+ limit : int | None = fastapi .Query (
90
+ 10 , ge = 1 , le = 10000 , description = "Maximum number of results to return."
91
+ ),
90
92
sortby : utils .ProcessSortCriterion | None = fastapi .Query (
91
- utils .ProcessSortCriterion .resource_uid_asc
93
+ utils .ProcessSortCriterion .resource_uid_asc ,
94
+ description = "Sorting criterion." ,
92
95
),
93
96
cursor : str | None = fastapi .Query (None , include_in_schema = False ),
94
97
back : bool | None = fastapi .Query (None , include_in_schema = False ),
@@ -148,7 +151,7 @@ def get_processes(
148
151
def get_process (
149
152
self ,
150
153
response : fastapi .Response ,
151
- process_id : str = fastapi .Path (...),
154
+ process_id : str = fastapi .Path (..., description = "Process identifier." ),
152
155
portals : tuple [str ] | None = fastapi .Depends (utils .get_portals ),
153
156
) -> ogc_api_processes_fastapi .models .ProcessDescription :
154
157
"""Implement OGC API - Processes `GET /processes/{process_id}` endpoint.
@@ -201,7 +204,7 @@ def get_process(
201
204
def post_process_execution (
202
205
self ,
203
206
request : fastapi .Request ,
204
- process_id : str = fastapi .Path (...),
207
+ process_id : str = fastapi .Path (..., description = "Process identifier." ),
205
208
execution_content : models .Execute = fastapi .Body (...),
206
209
auth_info : models .AuthInfo = fastapi .Depends (auth .get_auth_info ),
207
210
) -> models .StatusInfo :
@@ -330,18 +333,30 @@ def post_process_execution(
330
333
@exceptions .exception_logger
331
334
def get_jobs (
332
335
self ,
333
- processID : list [str ] | None = fastapi .Query (None ),
336
+ processID : list [str ] | None = fastapi .Query (
337
+ None ,
338
+ description = (
339
+ "Processes identifiers. Only jobs associated to the specified "
340
+ "processes shall be included in the response."
341
+ ),
342
+ ),
334
343
status : list [models .StatusCode ] | None = fastapi .Query (
335
344
[
336
345
ogc_api_processes_fastapi .models .StatusCode .accepted ,
337
346
ogc_api_processes_fastapi .models .StatusCode .running ,
338
347
ogc_api_processes_fastapi .models .StatusCode .successful ,
339
348
ogc_api_processes_fastapi .models .StatusCode .failed ,
340
- ]
349
+ ],
350
+ description = (
351
+ "Job statuses. Only jobs with the specified statuses shall be included in "
352
+ "the response."
353
+ ),
354
+ ),
355
+ limit : int | None = fastapi .Query (
356
+ 10 , ge = 1 , le = 10000 , description = "Maximum number of results to return."
341
357
),
342
- limit : int | None = fastapi .Query (10 , ge = 1 , le = 10000 ),
343
358
sortby : utils .JobSortCriterion | None = fastapi .Query (
344
- utils .JobSortCriterion .created_at_desc
359
+ utils .JobSortCriterion .created_at_desc , description = "Sorting criterion."
345
360
),
346
361
cursor : str | None = fastapi .Query (None , include_in_schema = False ),
347
362
back : bool | None = fastapi .Query (None , include_in_schema = False ),
@@ -459,12 +474,21 @@ def get_jobs(
459
474
@exceptions .exception_logger
460
475
def get_job (
461
476
self ,
462
- job_id : str = fastapi .Path (...),
463
- qos : bool = fastapi .Query (False ),
464
- request : bool = fastapi .Query (False ),
465
- log : bool = fastapi .Query (False ),
477
+ job_id : str = fastapi .Path (..., description = "Job identifier." ),
478
+ qos : bool = fastapi .Query (
479
+ False , description = "Whether to include job qos info in the response."
480
+ ),
481
+ request : bool = fastapi .Query (
482
+ False ,
483
+ description = "Whether to include the sumbitted request in the response." ,
484
+ ),
485
+ log : bool = fastapi .Query (
486
+ False , description = "Whether to include the job's log in the response."
487
+ ),
466
488
log_start_time : datetime .datetime | None = fastapi .Query (
467
- None , alias = "logStartTime"
489
+ None ,
490
+ alias = "logStartTime" ,
491
+ description = "Datetime of the first log message to be returned." ,
468
492
),
469
493
auth_info : models .AuthInfo = fastapi .Depends (auth .get_auth_info ),
470
494
) -> models .StatusInfo :
@@ -589,7 +613,7 @@ def get_job(
589
613
@exceptions .exception_logger
590
614
def get_job_results (
591
615
self ,
592
- job_id : str = fastapi .Path (...),
616
+ job_id : str = fastapi .Path (..., description = "Job identifier." ),
593
617
auth_info : models .AuthInfo = fastapi .Depends (auth .get_auth_info ),
594
618
) -> ogc_api_processes_fastapi .models .Results :
595
619
"""Implement OGC API - Processes `GET /jobs/{job_id}/results` endpoint.
@@ -652,7 +676,7 @@ def get_job_results(
652
676
@exceptions .exception_logger
653
677
def delete_job (
654
678
self ,
655
- job_id : str = fastapi .Path (...),
679
+ job_id : str = fastapi .Path (..., description = "Job identifier." ),
656
680
auth_info : models .AuthInfo = fastapi .Depends (auth .get_auth_info ),
657
681
) -> ogc_api_processes_fastapi .models .StatusInfo :
658
682
"""Implement OGC API - Processes `DELETE /jobs/{job_id}` endpoint.
0 commit comments