mirror of
https://github.com/bitwarden/server.git
synced 2025-04-09 23:28:12 -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());
|
config.Conventions.Add(new PublicApiControllersModelConvention());
|
||||||
}).AddJsonOptions(options =>
|
}).AddJsonOptions(options =>
|
||||||
{
|
{
|
||||||
if(Configuration["swaggerGen"] != "true")
|
if(Environment.IsProduction() && Configuration["swaggerGen"] != "true")
|
||||||
{
|
{
|
||||||
options.SerializerSettings.ContractResolver = new DefaultContractResolver();
|
options.SerializerSettings.ContractResolver = new DefaultContractResolver();
|
||||||
}
|
}
|
||||||
@ -191,7 +191,7 @@ namespace Bit.Api
|
|||||||
// Add MVC to the request pipeline.
|
// Add MVC to the request pipeline.
|
||||||
app.UseMvc();
|
app.UseMvc();
|
||||||
|
|
||||||
if(globalSettings.SelfHosted)
|
if(Environment.IsDevelopment() || globalSettings.SelfHosted)
|
||||||
{
|
{
|
||||||
app.UseSwagger(config =>
|
app.UseSwagger(config =>
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user