fix: temporarily disable xml serialization
in it's current state xml endpoints are not supported, as no known good way to serialize it exists
This commit is contained in:
@@ -4,6 +4,7 @@ using Microsoft.OpenApi;
|
|||||||
using Shadow.Data;
|
using Shadow.Data;
|
||||||
using Shadow.Tools;
|
using Shadow.Tools;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
@@ -17,7 +18,10 @@ builder.Services.AddDbContext<ApplicationDbContext>(options =>
|
|||||||
builder.Services.AddControllers(options =>
|
builder.Services.AddControllers(options =>
|
||||||
{
|
{
|
||||||
// Add XML serializer
|
// Add XML serializer
|
||||||
options.OutputFormatters.Add(new XmlSerializerOutputFormatter());
|
// options.RespectBrowserAcceptHeader = true;
|
||||||
|
// options.OutputFormatters.Add(new XmlSerializerOutputFormatter(
|
||||||
|
// new XmlWriterSettings { OmitXmlDeclaration = true }
|
||||||
|
// ));
|
||||||
}).AddJsonOptions(options =>
|
}).AddJsonOptions(options =>
|
||||||
{
|
{
|
||||||
// Pretty-print JSON
|
// Pretty-print JSON
|
||||||
|
|||||||
@@ -43,8 +43,4 @@
|
|||||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="10.0.1" />
|
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="10.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Mapping\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user