OpenApiRunner Class
The OpenApiRunner that runs the operations defined in the OpenAPI manifest.
Note: This class is marked as 'experimental' and may change in the future.
Initialize the OpenApiRunner.
Constructor
OpenApiRunner(parsed_openapi_document: Mapping[str, str], auth_callback: Callable[[...], dict[str, str] | Awaitable[dict[str, str]]] | None = None, http_client: AsyncClient | None = None, enable_dynamic_payload: bool = True, enable_payload_namespacing: bool = False)
Parameters
| Name | Description |
|---|---|
|
parsed_openapi_document
Required
|
|
|
auth_callback
|
Default value: None
|
|
http_client
|
Default value: None
|
|
enable_dynamic_payload
|
Default value: True
|
|
enable_payload_namespacing
|
Default value: False
|
Methods
| build_full_url |
Build the full URL. |
| build_json_object |
Build the JSON payload object. |
| build_json_payload |
Build the JSON payload. |
| build_operation_payload |
Build the operation payload. |
| build_operation_url |
Build the operation URL. |
| get_argument_name_for_payload |
Get argument name for the payload. |
| run_operation |
Runs the operation defined in the OpenAPI manifest. |
build_full_url
Build the full URL.
build_full_url(base_url, query_string)
Parameters
| Name | Description |
|---|---|
|
base_url
Required
|
|
|
query_string
Required
|
|
build_json_object
Build the JSON payload object.
build_json_object(properties, arguments, property_namespace=None)
Parameters
| Name | Description |
|---|---|
|
properties
Required
|
|
|
arguments
Required
|
|
|
property_namespace
|
Default value: None
|
build_json_payload
Build the JSON payload.
build_json_payload(payload_metadata: RestApiPayload, arguments: dict[str, Any]) -> tuple[str, str]
Parameters
| Name | Description |
|---|---|
|
payload_metadata
Required
|
|
|
arguments
Required
|
|
build_operation_payload
Build the operation payload.
build_operation_payload(operation: RestApiOperation, arguments: KernelArguments) -> tuple[str, str] | tuple[None, None]
Parameters
| Name | Description |
|---|---|
|
operation
Required
|
|
|
arguments
Required
|
|
build_operation_url
Build the operation URL.
build_operation_url(operation: RestApiOperation, arguments: KernelArguments, server_url_override=None, api_host_url=None)
Parameters
| Name | Description |
|---|---|
|
operation
Required
|
|
|
arguments
Required
|
|
|
server_url_override
|
Default value: None
|
|
api_host_url
|
Default value: None
|
get_argument_name_for_payload
Get argument name for the payload.
get_argument_name_for_payload(property_name, property_namespace=None)
Parameters
| Name | Description |
|---|---|
|
property_name
Required
|
|
|
property_namespace
|
Default value: None
|
run_operation
Runs the operation defined in the OpenAPI manifest.
async run_operation(operation: RestApiOperation, arguments: KernelArguments | None = None, options: RestApiRunOptions | None = None) -> str
Parameters
| Name | Description |
|---|---|
|
operation
Required
|
|
|
arguments
|
Default value: None
|
|
options
|
Default value: None
|
Attributes
is_experimental
is_experimental = True
media_type_application_json
media_type_application_json = 'application/json'
payload_argument_name
payload_argument_name = 'payload'
stage_status
stage_status = 'experimental'