import connexion
from typing import Dict
from typing import Tuple
from typing import Union

from published_apis.models.problem_details import ProblemDetails  # noqa: E501
from published_apis.models.service_api_description import ServiceAPIDescription  # noqa: E501
from published_apis.models.service_api_description_patch import ServiceAPIDescriptionPatch  # noqa: E501
from published_apis import util


def modify_ind_apf_pub_api(service_api_id, apf_id, service_api_description_patch):  # noqa: E501
    """modify_ind_apf_pub_api

    Modify an existing published service API. # noqa: E501

    :param service_api_id: 
    :type service_api_id: str
    :param apf_id: 
    :type apf_id: str
    :param service_api_description_patch: 
    :type service_api_description_patch: dict | bytes

    :rtype: Union[ServiceAPIDescription, Tuple[ServiceAPIDescription, int], Tuple[ServiceAPIDescription, int, Dict[str, str]]
    """
    if connexion.request.is_json:
        service_api_description_patch = ServiceAPIDescriptionPatch.from_dict(connexion.request.get_json())  # noqa: E501
    return 'do some magic!'
