mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 10:18:17 +08:00
Feature/merge configuration files (#316)
* #296 renamed configuration.json to ocelot.json in preparation * removed things we dont need for tests * another file we dont need * removed some async we dont need * refactoring to consolidate configuration code * removed another pointless abstraction * #296 started writing merge code * #296 coming up with ideas for this config merging * #296 still hacking this idea around * #296 will now do a crappy merge on the configuration * #296 change so tests pass on windows
This commit is contained in:
@ -7,7 +7,7 @@ architecture with Ocelot.
|
||||
|
||||
This feature was requested as part of `Issue 79 <https://github.com/TomPallister/Ocelot/pull/79>`_ and further improvements were made as part of `Issue 298 <https://github.com/TomPallister/Ocelot/issue/298>`_.
|
||||
|
||||
In order to set this up you must do something like the following in your configuration.json. Here we have specified two normal ReRoutes and each one has a Key property.
|
||||
In order to set this up you must do something like the following in your ocelot.json. Here we have specified two normal ReRoutes and each one has a Key property.
|
||||
We then specify an Aggregate that composes the two ReRoutes using their keys in the ReRouteKeys list and says then we have the UpstreamPathTemplate which works like a normal ReRoute.
|
||||
Obviously you cannot have duplicate UpstreamPathTemplates between ReRoutes and Aggregates. You can use all of Ocelot's normal ReRoute options apart from RequestIdKey (explained in gotchas below).
|
||||
|
||||
@ -17,7 +17,7 @@ Advanced register your own Aggregators
|
||||
Ocelot started with just the basic request aggregation and since then we have added a more advanced method that let's the user take in the responses from the
|
||||
downstream services and then aggregate them into a response object.
|
||||
|
||||
The configuration.json setup is pretty much the same as the basic aggregation approach apart from you need to add an Aggregator property like below.
|
||||
The ocelot.json setup is pretty much the same as the basic aggregation approach apart from you need to add an Aggregator property like below.
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
|
Reference in New Issue
Block a user