MMLib.SwaggerForOcelot
MMLib.SwaggerForOcelot copied to clipboard
Implementing Ocelot Swagger Configuration in Production Enviroment
I am currently working on implementing Swagger with Ocelot for a production environment using MMLib, but I am facing some challenges that I couldn't resolve. The setup works perfectly in the development environment, but when I tried deploying the same to production, the Swagger files are not loading as expected. Below are some details about my approach:
I have created separate folders for both development and production configurations, including SwaggerEndPoints.json files. The Swagger JSON URLs are accessible externally in production, but the Swagger UI does not load the files correctly. In development, the Swagger setup works flawlessly, with all routes and endpoints being properly configured. I have already tried searching for a solution online, but I couldn't find a working example for production with Ocelot and Swagger integration. Could you please guide me with the appropriate steps or share a sample code for implementing Swagger with Ocelot in a production environment? Here is my code for SwaggerEndpoints file.
{ "SwaggerEndPoints": [ { "Key": "Product", "TransformByOcelotConfig": true, "Config": [ { "Name": "Campaigns", "Version": "v1", "Url": "https://someurl.com:5006/swagger/Product/swagger.json"
}
]
},
}