Skip to content

Commit 5dd32a2

Browse files
committed
Move complience params to specific dict
Ref: #70
1 parent c9e59bb commit 5dd32a2

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

aidbox_python_sdk/sdk.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import asyncio
22
import logging
3+
from typing import Dict, Any, Optional
34

45
import jsonschema
56
from fhirpy.base.exceptions import OperationOutcome
@@ -151,9 +152,7 @@ def operation( # noqa: PLR0913
151152
access_policy=None,
152153
request_schema=None,
153154
timeout=None,
154-
fhir_code=None,
155-
fhir_url=None,
156-
fhir_resource=None,
155+
complience_params: Optional[Dict[str, Any]] = None,
157156
):
158157
if public and access_policy is not None:
159158
raise ValueError("Operation might be public or have access policy, not both")
@@ -187,9 +186,7 @@ def wrapped_func(operation, request):
187186
"method": method,
188187
"path": path,
189188
**({"timeout": timeout} if timeout else {}),
190-
**({"fhirCode": fhir_code} if fhir_code else {}),
191-
**({"fhirUrl": fhir_url} if fhir_url else {}),
192-
**({"fhirResource": fhir_resource} if fhir_resource else {}),
189+
**(complience_params if complience_params else {}),
193190
}
194191
self._operation_handlers[operation_id] = wrapped_func
195192
if public is True:

0 commit comments

Comments
 (0)