chore: Hinzufügen von XML-Dokumentationsgenerierung und Swagger-Kommentaren
Aktualisierte Projektdateien zur Aktivierung der XML-Dokumentationsgenerierung durch Hinzufügen der Eigenschaften `<GenerateDocumentationFile>` und `<DocumentationFile>`. Geänderte Swagger-Konfiguration in `Program.cs`, um alle XML-Dateien im Basisverzeichnis für eine flexiblere Einbindung der Dokumentation einzuschließen.
This commit is contained in:
parent
b2cc0cb65a
commit
d55006fdda
@ -4,6 +4,8 @@
|
|||||||
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
|
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
|
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -14,6 +14,7 @@
|
|||||||
<FileVersion>1.1.0</FileVersion>
|
<FileVersion>1.1.0</FileVersion>
|
||||||
<AssemblyVersion>1.1.0</AssemblyVersion>
|
<AssemblyVersion>1.1.0</AssemblyVersion>
|
||||||
<PackageOutputPath>Copyright © 2025 Digital Data GmbH. All rights reserved.</PackageOutputPath>
|
<PackageOutputPath>Copyright © 2025 Digital Data GmbH. All rights reserved.</PackageOutputPath>
|
||||||
|
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -49,8 +49,11 @@ builder.Services.AddSwaggerGen(options =>
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
var xmlFilename = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
|
var xmlFiles = Directory.GetFiles(AppContext.BaseDirectory, "*.xml");
|
||||||
options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, xmlFilename));
|
foreach (var xmlFile in xmlFiles)
|
||||||
|
{
|
||||||
|
options.IncludeXmlComments(xmlFile);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
builder.Services.AddOpenApi();
|
builder.Services.AddOpenApi();
|
||||||
// DbContext
|
// DbContext
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user