def METHOD_NAME(cls, type_name):
    """returns an openapi type
    :param type_name: str (e.g., 'string', 'boolean', 'integer')
    :return: openapi.TYPE_*
    """
    if type_name not in cls.openapi_types:
        raise Exception(f'Invalid type "{type_name}"; expected one of {cls.openapi_types.keys()}')
    return cls.openapi_types[type_name]