public void ConfigureServices(IServiceCollection services) { services.ConfigureOptions(Configuration); services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); services.AddMvc(options => options.Filters.Add(new ValidateModelStateAttribute())); DIFactory.Configure(services); services.AddSwaggerGen(s => { s.SwaggerDoc("v1", new Info { Title = "Client microservice API", Version = "v1" }); string applicationPath = PlatformServices.Default.Application.ApplicationBasePath; string applicationName = PlatformServices.Default.Application.ApplicationName; string xmlDocPath = Path.Combine(applicationPath, $"{applicationName}.xml"); }); }