title: Ocelot Route Aggregation : either do not exist or do not have correct ServiceName property
body: <p>I am trying to create a proof of concept with Ocelot and looking at API Aggregation. </p>
  
  <p>My Ocelot config looks a little like this</p>
  
  <pre><code>  {
    "Routes": [
      {
        "DownstreamPathTemplate": "/api/fee/calculator",
        "DownstreamScheme": "https",
        "DownstreamHostAndPorts": [
          {
            "Host": "localhost",
            "Port": 7001
          }
        ],
        "UpstreamPathTemplate": "/fee/calculator",
        "UpstreamHttpMethod": ["GET", "POST"],
        "Key": "FeeCalculator",
        "FileCacheOptions": {
          "TtlSeconds": 600, // Time to Live
          "Region": "fee-calc" // Cache name
        }
      },
      {
        "DownstreamPathTemplate": "/api/form/getlexicon",
        "DownstreamScheme": "https",
        "DownstreamHostAndPorts": [
          {
            "Host": "localhost",
            "Port": 5001
          }
        ],
        "UpstreamPathTemplate": "/form/getlexicon",
        "UpstreamHttpMethod": ["GET", "POST"],
        "Key": "FormEngine",
        "RateLimitOptions": {
          "ClientWhitelist": [], // array of clients not effected by rate limiting
          "EnableRateLimiting": true,
          "Period": "1m", // time period limit applies for e.g. 1s, 1m, 1h, 1d etc 
          "PeriodTimespan": 60, // retry after certain number of seconds
          "Limit": 5 // number of requests in given period
          //"QuotaExceededMessage" custom message to client for quota exceeded
          //"HttpStatusCode" custom http status code
        },
        "FileCacheOptions": {
          "TtlSeconds": 600,
          "Region": "form-engine"
        }
  
      }
    ],
    "GlobalConfiguration": {
      "BaseUrl": "https://localhost:4001",
      "RequestIdKey": "OcRequestId"
    },
    "Aggregates": [
      {
        "RouteKeys": [
          "FormEngine",
          "FeeCalculator"
        ],
        "UpstreamPathTemplate": "/FormAndFeeCalculation",
        "Aggregator": "FakeDefinedAggregator"
      }
    ]
  }
  </code></pre>
  
  <p>I have remove routes where they are not part of this issue</p>
  
  <p>My Startup.cs has this </p>
  
  <pre><code>services.AddOcelot(Configuration)
              .AddTransientDefinedAggregator&lt;FakeDefinedAggregator&gt;()
              .AddCacheManager(configCacheBuilder =&gt;
              {
                  configCacheBuilder.WithDictionaryHandle();
              });
  </code></pre>
  
  <p>I then needed to create the class for FakeDefinedAggregator which is like so </p>
  
  <pre><code>public class FakeDefinedAggregator : IDefinedAggregator
  {
      public async Task&lt;DownstreamResponse&gt; Aggregate(List&lt;HttpContext&gt; responses)
      {
          var contentBuilder = new StringBuilder();
          contentBuilder.Append(responses);
  
          var stringContent = new StringContent(contentBuilder.ToString())
          {
              Headers = { ContentType = new MediaTypeHeaderValue("application/json") }
          };
  
          return new DownstreamResponse(stringContent, HttpStatusCode.OK, new List&lt;KeyValuePair&lt;string, IEnumerable&lt;string&gt;&gt;&gt;(), "OK");
  
      }
  }
  </code></pre>
  
  <p>When running \ debugging the application I then get this error at <code>app.UseOcelot().Wait();</code></p>
  
  <blockquote>
    <p>Exception: Unable to start Ocelot, errors are: Routes for aggregateRoute /FormEngineAndFeeCalculation either do not exist or do not have correct ServiceName property</p>
  </blockquote>
  
  <p>Any assistance on this matter will be gratefully received. </p>