Skip to content

Commit e68403f

Browse files
committed
OAProc: add Prefer header to OpenAPI document
1 parent bfeb0c3 commit e68403f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pygeoapi/api/processes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,16 @@ def get_oas_30(cfg: dict, locale: str) -> tuple[list[dict[str, str]], dict[str,
725725
'description': md_desc,
726726
'tags': [name],
727727
'operationId': f'execute{name.capitalize()}Job',
728+
'parameters': [{
729+
'in': 'header',
730+
'name': 'Prefer',
731+
'required': False,
732+
'description': 'Indicates client preferences, including whether the client is capable of asynchronous processing.', # noqa
733+
'schema': {
734+
'type': 'string',
735+
'enum': ['respond-async']
736+
}
737+
}],
728738
'responses': {
729739
'200': {'$ref': '#/components/responses/200'},
730740
'201': {'$ref': f"{OPENAPI_YAML['oapip']}/responses/ExecuteAsync.yaml"}, # noqa

0 commit comments

Comments
 (0)