scripts/build_sdk.py
def guess_service_info_from_path(spec_path):
    """Guess Python Autorest options based on the spec path.

    Expected path:
    specification/compute/resource-manager/readme.md
    """
    spec_path = spec_path.lower()
    spec_path = spec_path[spec_path.index("specification"):] # Might raise and it's ok
    split_spec_path = spec_path.split("/")

    rp_name = split_spec_path[1]
    is_arm = split_spec_path[2] == "resource-manager"

    return {
        "rp_name": rp_name,
        "is_arm": is_arm
    }
def guess_service_info_from_path(spec_path):
    spec_path = spec_path.lower()
    spec_path = spec_path[spec_path.index("specification"):] # Might raise and it's ok
    split_spec_path = spec_path.split("/")

    rp_name = split_spec_path[1]
    is_arm = split_spec_path[2] == "resource-manager"

    return {
        "rp_name": rp_name,
        "is_arm": is_arm
    }
def guess_service_info_from_path ( spec_path ) : spec_path = spec_path . lower ( ) spec_path = spec_path [ spec_path . index ( "specification" ) : ] # Might raise and it's ok split_spec_path = spec_path . split ( "/" ) rp_name = split_spec_path [ 1 ] is_arm = split_spec_path [ 2 ] == "resource-manager" return { "rp_name" : rp_name , "is_arm" : is_arm }
Guess Python Autorest options based on the spec path.

    Expected path:
    specification/compute/resource-manager/readme.md
Guess Python Autorest options based on the spec path .