feat: add initial configuration files and setup for .NET 9 API

This commit is contained in:
Christian Werner 2025-03-08 10:15:39 +01:00
parent f078047b68
commit 8e1212d986
7 changed files with 83 additions and 16 deletions

View File

@ -1,13 +1,5 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:48302",
"sslPort": 44338
}
},
"profiles": {
"http": {
"commandName": "Project",
@ -28,14 +20,6 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": false,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@ -0,0 +1,23 @@
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
builder.Services.AddOpenApi();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();

View File

@ -0,0 +1,23 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "http://localhost:5055",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "https://localhost:7288;http://localhost:5055",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.1"/>
</ItemGroup>
</Project>

View File

@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

View File

@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

View File

@ -12,6 +12,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mithrandir", "Mithrandir",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Gandalf", "Gandalf", "{A82EA24B-1379-41B2-A363-CDCBF9F18833}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Suspectus.Mithrandir.Api", "Suspectus.Mithrandir.Api\Suspectus.Mithrandir.Api.csproj", "{264B8A9E-7A70-4DE3-906B-7E0722D09205}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -34,11 +36,16 @@ Global
{44C283FD-2E01-496C-9E8F-4E43C26C9733}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44C283FD-2E01-496C-9E8F-4E43C26C9733}.Release|Any CPU.ActiveCfg = Release|Any CPU
{44C283FD-2E01-496C-9E8F-4E43C26C9733}.Release|Any CPU.Build.0 = Release|Any CPU
{264B8A9E-7A70-4DE3-906B-7E0722D09205}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{264B8A9E-7A70-4DE3-906B-7E0722D09205}.Debug|Any CPU.Build.0 = Debug|Any CPU
{264B8A9E-7A70-4DE3-906B-7E0722D09205}.Release|Any CPU.ActiveCfg = Release|Any CPU
{264B8A9E-7A70-4DE3-906B-7E0722D09205}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{44C283FD-2E01-496C-9E8F-4E43C26C9733} = {A82EA24B-1379-41B2-A363-CDCBF9F18833}
{067494CB-FE63-42F0-A154-586E50442969} = {A82EA24B-1379-41B2-A363-CDCBF9F18833}
{B4AF6985-3268-4C2E-9C50-D92DA7D3711D} = {A82EA24B-1379-41B2-A363-CDCBF9F18833}
{C8C3047B-ED0B-4516-A282-8B07E3EEB430} = {A82EA24B-1379-41B2-A363-CDCBF9F18833}
{264B8A9E-7A70-4DE3-906B-7E0722D09205} = {D54D8A40-A5C3-4273-B4D7-F2B83056161B}
EndGlobalSection
EndGlobal