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>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
<FileVersion>1.1.0</FileVersion>
|
||||
<AssemblyVersion>1.1.0</AssemblyVersion>
|
||||
<PackageOutputPath>Copyright © 2025 Digital Data GmbH. All rights reserved.</PackageOutputPath>
|
||||
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -49,8 +49,11 @@ builder.Services.AddSwaggerGen(options =>
|
||||
},
|
||||
});
|
||||
|
||||
var xmlFilename = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
|
||||
options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, xmlFilename));
|
||||
var xmlFiles = Directory.GetFiles(AppContext.BaseDirectory, "*.xml");
|
||||
foreach (var xmlFile in xmlFiles)
|
||||
{
|
||||
options.IncludeXmlComments(xmlFile);
|
||||
}
|
||||
});
|
||||
builder.Services.AddOpenApi();
|
||||
// DbContext
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user