Add controllers for the Get method #9
@ -6,7 +6,7 @@ using System;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace Mirea.Api.Endpoint;
|
namespace Mirea.Api.Endpoint.Configuration;
|
||||||
|
|
||||||
public class SwaggerDefaultValues : IOperationFilter
|
public class SwaggerDefaultValues : IOperationFilter
|
||||||
{
|
{
|
||||||
@ -38,7 +38,7 @@ public class SwaggerDefaultValues : IOperationFilter
|
|||||||
{
|
{
|
||||||
var description = apiDescription.ParameterDescriptions.First(p => p.Name == parameter.Name);
|
var description = apiDescription.ParameterDescriptions.First(p => p.Name == parameter.Name);
|
||||||
|
|
||||||
parameter.Description ??= description.ModelMetadata?.Description;
|
parameter.Description ??= description.ModelMetadata.Description;
|
||||||
|
|
||||||
if (parameter.Schema.Default == null &&
|
if (parameter.Schema.Default == null &&
|
||||||
description.DefaultValue != null &&
|
description.DefaultValue != null &&
|
@ -8,6 +8,8 @@ using Microsoft.Extensions.Hosting;
|
|||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Mirea.Api.DataAccess.Application;
|
using Mirea.Api.DataAccess.Application;
|
||||||
using Mirea.Api.DataAccess.Persistence;
|
using Mirea.Api.DataAccess.Persistence;
|
||||||
|
using Mirea.Api.Endpoint.Configuration;
|
||||||
|
using Mirea.Api.Endpoint.Middleware;
|
||||||
using Mirea.Api.Endpoint.Properties;
|
using Mirea.Api.Endpoint.Properties;
|
||||||
using Swashbuckle.AspNetCore.SwaggerGen;
|
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||||
using System;
|
using System;
|
||||||
|
Loading…
Reference in New Issue
Block a user