diff --git a/ApiGateway/ocelot.json b/ApiGateway/ocelot.json index ea45d32..79b6dba 100644 --- a/ApiGateway/ocelot.json +++ b/ApiGateway/ocelot.json @@ -31,13 +31,7 @@ "Host": "localhost", "Port": 7229 } - ], - "RateLimitOptions": { - "EnableRateLimiting": true, - "Period": "1s", - "PeriodTimespan": 1, - "Limit": 1 - } + ] }, { "UpstreamPathTemplate": "/gateway/cats", diff --git a/README.md b/README.md index f46c985..ec25758 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ * [WebSocket](#websocket) * [API type choices](#api-type-choices) * [API Gateway](#api-gateway) +* [Versioning](#versioning) * [Testing the app](#testing-the-app) ## Global architecture @@ -163,6 +164,31 @@ The gateway uses rate limiting to make sure that clients cannot send an all-incl } } ... ``` + +--- +### Versioning + +This API is versioned, but our clients do not need to know about it. +We use URIs to implement our versioning, but our clients do not need to rewrite their requests to stay up-to-date. +That is all thanks to our API Gateway, which masks these details: + +```json + ... + { + "UpstreamPathTemplate": "/gateway/cats", + "UpstreamHttpMethod": [ "Get" ], + "DownstreamPathTemplate": "/api/v2/cats", + ... + }, + { + "UpstreamPathTemplate": "/gateway/cats", + "UpstreamHttpMethod": [ "Post" ], + "DownstreamPathTemplate": "/api/v1/cats", + ... + }, + ... +``` + --- ## Testing the app