def test_items_must_be_in_array_type(open_discovery_document, name, version):
    """ Test that all array types in disc docs have an attribute called "items".
    aiogoogle.validate.validate assumes all arrays has an "items" property and it will 
    fail if it didn't find one """
    disc_doc = open_discovery_document(name, version)
    schemas = disc_doc["schemas"]

    def resolve(schema):
        if "$ref" in schema:
            return schemas[schema["$ref"]]
        else:
            return schema

    for _, schema in disc_doc["schemas"].items():
        if "properties" in schema:  # 6 failures without this check
            for _, prop in schema["properties"].items():
                prop = resolve(prop)
                if prop["type"] == "array":
                    assert "items" in prop