diff --git a/works/api-lab-01/PokedexApi.sln b/works/api-lab-01/PokedexApi.sln new file mode 100644 index 0000000..114bfc1 --- /dev/null +++ b/works/api-lab-01/PokedexApi.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PokedexApi", "PokedexApi\PokedexApi.csproj", "{331B5D19-AF38-40E6-865D-D0E4B5A75990}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {331B5D19-AF38-40E6-865D-D0E4B5A75990}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {331B5D19-AF38-40E6-865D-D0E4B5A75990}.Debug|Any CPU.Build.0 = Debug|Any CPU + {331B5D19-AF38-40E6-865D-D0E4B5A75990}.Release|Any CPU.ActiveCfg = Release|Any CPU + {331B5D19-AF38-40E6-865D-D0E4B5A75990}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/works/api-lab-01/PokedexApi/PokedexApi.csproj b/works/api-lab-01/PokedexApi/PokedexApi.csproj new file mode 100644 index 0000000..3939e20 --- /dev/null +++ b/works/api-lab-01/PokedexApi/PokedexApi.csproj @@ -0,0 +1,13 @@ + + + + net10.0 + enable + enable + + + + + + + diff --git a/works/api-lab-01/PokedexApi/PokedexApi.http b/works/api-lab-01/PokedexApi/PokedexApi.http new file mode 100644 index 0000000..ed1eecd --- /dev/null +++ b/works/api-lab-01/PokedexApi/PokedexApi.http @@ -0,0 +1,6 @@ +@PokedexApi_HostAddress = http://localhost:5264 + +GET {{PokedexApi_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/works/api-lab-01/PokedexApi/Program.cs b/works/api-lab-01/PokedexApi/Program.cs new file mode 100644 index 0000000..90e5097 --- /dev/null +++ b/works/api-lab-01/PokedexApi/Program.cs @@ -0,0 +1,14 @@ +var builder = WebApplication.CreateBuilder(args); + +builder.Services.AddOpenApi(); + +var app = builder.Build(); + +if (app.Environment.IsDevelopment()) +{ + app.MapOpenApi(); +} + +app.Run(); + + diff --git a/works/api-lab-01/PokedexApi/Properties/launchSettings.json b/works/api-lab-01/PokedexApi/Properties/launchSettings.json new file mode 100644 index 0000000..84183f3 --- /dev/null +++ b/works/api-lab-01/PokedexApi/Properties/launchSettings.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": false, + "applicationUrl": "http://localhost:5264", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": false, + "applicationUrl": "https://localhost:7243;http://localhost:5264", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/works/api-lab-01/PokedexApi/appsettings.Development.json b/works/api-lab-01/PokedexApi/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/works/api-lab-01/PokedexApi/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/works/api-lab-01/PokedexApi/appsettings.json b/works/api-lab-01/PokedexApi/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/works/api-lab-01/PokedexApi/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +}