Add pristine dotnet new webapi scaffold

Baseline commit of the untouched template so the M0 restructure lands as a
reviewable diff rather than appearing as the initial state.

Includes .gitignore and .gitattributes only; no source changes.
This commit is contained in:
2026-07-28 12:09:24 +02:00
commit 1138291d79
13 changed files with 279 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
# Normalise line endings: LF in the repo, native on checkout.
* text=auto
# Source
*.cs text diff=csharp
*.csproj text
*.slnx text
*.props text
*.targets text
*.json text
*.axaml text
*.xaml text
*.ts text
*.js text
*.css text
*.html text
*.md text
*.yml text
*.yaml text
*.sql text
# Files that must keep LF regardless of platform — shell scripts run in Linux
# containers, and Dockerfiles are read by a Linux daemon.
*.sh text eol=lf
Dockerfile text eol=lf
*.Dockerfile text eol=lf
Caddyfile text eol=lf
# Windows-only scripts keep CRLF
*.cmd text eol=crlf
*.bat text eol=crlf
*.ps1 text eol=crlf
# Binary — never diff or convert
*.png binary
*.jpg binary
*.ico binary
*.icns binary
*.gif binary
*.pdf binary
*.zip binary
*.gz binary
*.dll binary
*.so binary
*.dylib binary
*.pfx binary
*.snk binary
# Test fixtures are byte-exact contracts — never touch their line endings.
tests/fixtures/** -text
+92
View File
@@ -0,0 +1,92 @@
## Build results
[Bb]in/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/
artifacts/
!artifacts/openapi/
!artifacts/schema/
## .NET / MSBuild
*.user
*.suo
*.userosscache
*.sln.docstates
project.lock.json
project.fragment.lock.json
*.binlog
*.nuget.props
*.nuget.targets
msbuild.log
msbuild.err
msbuild.wrn
## NuGet
*.nupkg
*.snupkg
.nuget/
**/packages/*
!**/packages/build/
# packages.lock.json IS committed — restore --locked-mode depends on it
## Test / coverage
[Tt]est[Rr]esult*/
coverage*.json
coverage*.xml
coverage*.info
*.coverage
*.coveragexml
TestResults/
BenchmarkDotNet.Artifacts/
## IDEs
.vs/
.vscode/*
!.vscode/extensions.json
!.vscode/launch.json
!.vscode/tasks.json
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries/
.idea/**/shelf/
.idea/**/contentModel.xml
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/httpRequests/
*.DotSettings.user
## OS
.DS_Store
Thumbs.db
desktop.ini
## Node (xterm.js bundle in DodoSSH.Client.WebAssets)
node_modules/
npm-debug.log*
yarn-error.log*
.pnpm-store/
## Client build / packaging output
publish/
Releases/
*.AppImage
*.dmg
*.deb
*.rpm
*.msix
*.appinstaller
## Secrets and local config — never commit these
*.pfx
*.p12
*.snk
appsettings.Local.json
appsettings.*.Local.json
.env
.env.*
!deploy/.env.example
secrets/
+15
View File
@@ -0,0 +1,15 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/projectSettingsUpdater.xml
/modules.xml
/.idea.DodoSSH.iml
/contentModel.xml
# Editor-based HTTP Client requests
/httpRequests/
# Ignored default folder with query files
/queries/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>
+3
View File
@@ -0,0 +1,3 @@
<Solution>
<Project Path="DodoSSH/DodoSSH.csproj" />
</Solution>
+13
View File
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.10"/>
</ItemGroup>
</Project>
+6
View File
@@ -0,0 +1,6 @@
@DodoSSH_HostAddress = http://localhost:5233
GET {{DodoSSH_HostAddress}}/weatherforecast/
Accept: application/json
###
+41
View File
@@ -0,0 +1,41 @@
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
// 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();
var summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
app.MapGet("/weatherforecast", () =>
{
var forecast = Enumerable.Range(1, 5).Select(index =>
new WeatherForecast
(
DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
Random.Shared.Next(-20, 55),
summaries[Random.Shared.Next(summaries.Length)]
))
.ToArray();
return forecast;
})
.WithName("GetWeatherForecast");
app.Run();
record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary)
{
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
}
+23
View File
@@ -0,0 +1,23 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "http://localhost:5233",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "https://localhost:7217;http://localhost:5233",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
+8
View File
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
+9
View File
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
+7
View File
@@ -0,0 +1,7 @@
{
"sdk": {
"version": "10.0.0",
"rollForward": "latestMinor",
"allowPrerelease": false
}
}