def create_driver_script(driver, script_create=None):  # noqa: E501
    """Create a new script

    Create a new script # noqa: E501

    :param driver: The driver to use for the request. ie. github
    :type driver: str
    :param script_create: The data needed to create this script
    :type script_create: dict | bytes

    :rtype: Response
    """
    if connexion.request.is_json:
        script_create = ScriptCreate.from_dict(connexion.request.get_json())  # noqa: E501

    response = errorIfUnauthorized(role='developer')
    if response:
        return response
    else:
        response = ApitaxResponse()

    driver: Driver = LoadedDrivers.getDriver(driver)
    driver.saveDriverScript(script_create.script.name, script_create.script.content)

    return Response(status=200, body=response.getResponseBody())
def create_driver_script ( driver , script_create = None ) : if connexion . request . is_json : script_create = ScriptCreate . from_dict ( connexion . request . get_json ( ) ) response = errorIfUnauthorized ( role = 'developer' ) if response : return response else : response = ApitaxResponse ( ) driver : Driver = LoadedDrivers . getDriver ( driver ) driver . saveDriverScript ( script_create . script . name , script_create . script . content ) return Response ( status = 200 , body = response . getResponseBody ( ) )
Create a new script

    Create a new script # noqa: E501

    :param driver: The driver to use for the request. ie. github
    :type driver: str
    :param script_create: The data needed to create this script
    :type script_create: dict | bytes

    :rtype: Response