mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 13:38:13 -05:00
serializer and swagger adjustments for dev
This commit is contained in:
parent
201f7d9aa4
commit
88cb0443b7
@ -114,7 +114,7 @@ namespace Bit.Api
|
||||
config.Conventions.Add(new PublicApiControllersModelConvention());
|
||||
}).AddJsonOptions(options =>
|
||||
{
|
||||
if(Configuration["swaggerGen"] != "true")
|
||||
if(Environment.IsProduction() && Configuration["swaggerGen"] != "true")
|
||||
{
|
||||
options.SerializerSettings.ContractResolver = new DefaultContractResolver();
|
||||
}
|
||||
@ -191,7 +191,7 @@ namespace Bit.Api
|
||||
// Add MVC to the request pipeline.
|
||||
app.UseMvc();
|
||||
|
||||
if(globalSettings.SelfHosted)
|
||||
if(Environment.IsDevelopment() || globalSettings.SelfHosted)
|
||||
{
|
||||
app.UseSwagger(config =>
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user