Search code examples
asp.net.net.net-5.net-6.0ocelot

Ocelot dose not recognize {version}


i use ApiVersioning in Asp .net 6 my versioning work well when i use ApiSwagger but when i want to use Ocelot Api Gate Way ocelot dose not recognize my {version} and replace {version} as string in URL

MY Orginal Api : http://localhost:5001/api/v1/Customer/test/1

enter image description here

But in Ocelot Gate Way : http://localhost:5050/api/v{Version}/Customer/test/1

enter image description here


Solution

  • Version should be mentioned as below

    "/api/{version}/{everything}"

    Check whethere it is specified like "/v{Version}". Also check {Version} or {version} (case sensitive)