src/swagger2x.py
def convert_to_cplus_array_type(json_data):
    """
    convert the json type to c++ type
    :param json_type: the json type
    :return: c++ type.
    """
    subtype = json_data["items"].get("type")
    subtype_oneOff = json_data["items"].get("oneOf")

    if subtype is not None:
        if subtype in ["string", "number", "boolean", "integer"]:
            return "std::vector<" + convert_to_cplus_type(json_data["items"]["type"]) + ">"
        if subtype in ["object"]:
            return "std::vector<OCRepresentation>"
        if subtype in ["array"]:
            return "std::vector<array>"
    elif subtype_oneOff is not None:
        return "char*"
    return "void*"

    convert the json type to c++ type
    :param json_type: the json type
    :return: c++ type.
    
convert the json type to c++ type
convert the json type to c ++ type
def convert_to_cplus_array_type(json_data):
    subtype = json_data["items"].get("type")
    subtype_oneOff = json_data["items"].get("oneOf")
    if subtype is not None:
        if subtype in ["string", "number", "boolean", "integer"]:
            return "std::vector<" + convert_to_cplus_type(json_data["items"]["type"]) + ">"
        if subtype in ["object"]:
            return "std::vector<OCRepresentation>"
        if subtype in ["array"]:
            return "std::vector<array>"
    elif subtype_oneOff is not None:
        return "char*"
    return "void*"
def convert_to_cplus_array_type ( json_data ) : subtype = json_data [ "items" ] . get ( "type" ) subtype_oneOff = json_data [ "items" ] . get ( "oneOf" ) if subtype is not None : if subtype in [ "string" , "number" , "boolean" , "integer" ] : return "std::vector<" + convert_to_cplus_type ( json_data [ "items" ] [ "type" ] ) + ">" if subtype in [ "object" ] : return "std::vector<OCRepresentation>" if subtype in [ "array" ] : return "std::vector<array>" elif subtype_oneOff is not None : return "char*" return "void*"
convert the json type to c++ type
convert the json type to c ++ type
"""
    convert the json type to c++ type
    :param json_type: the json type
    :return: c++ type.
    """
None
json_data
json_type
the json type
the json type