Closed maxoizs closed 1 year ago
Hi @maxoizs,
for these purposes I use the Service discovery, especially AppConfiguration (different appsettings.json
for different environments).
SwaggerForOcelot can read documentation from services defined in by that providers. See documentation.
@Burgyn thanks a lot , AppConfiguratoin as a service discovery worked very well so far, and appSettings is much easier to configure per environment especially that we were using docker, and replace a token within a docker image was a nightmare for me 😄 , thanks a lot for that.
I'm glad I could help
I have a question regarding SwaggerEndpoints, I'm using ocelot and swagger for ocelot, with configuration folder and so far it works fine, the issue is, in SwaggerEndpoint how do I mention that base URL should change per environment, I've it fixed for dev environment now, but I would like to push to qa and stage as well. so ocelot.swaggerendpoints.json like that
example I would like to be in QA environment like this https://service-qa.net/swagger/v1/swagger.json and stage https://service-stage.net/swagger/v1/swagger.json etc
do you guys add multi configs for all environments or do change that file on pipeline using yaml or do you override from code and how, or does the global configuration for ocelot work and how please ?