def METHOD_NAME():
    """ID field is only included in the root, not the attributes."""
    patterns = [
        re_path("^companies/?$", views.CompanyViewset.as_view({"get": "list"})),
    ]
    generator = SchemaGenerator(patterns=patterns)
    request = create_request("/")
    schema = generator.get_schema(request=request)
    company_properties = schema["components"]["schemas"]["Company"]["properties"]
    assert company_properties["id"] == {"$ref": "#/components/schemas/id"}
    assert "id" not in company_properties["attributes"]["properties"]