From d22d915cf35dfed084bcb68af5b559fb142644a9 Mon Sep 17 00:00:00 2001 From: adam1ch Date: Wed, 14 Oct 2026 10:31:13 +0300 Subject: [PATCH] =?UTF-8?q?=D1=8F=20=D0=BD=D0=B5=20=D0=B4=D0=BE=D0=B4?= =?UTF-8?q?=D0=B5=D0=BB=D0=B0=D0=BB=20=D0=B2=D1=82=D0=BE=D1=80=D1=83=D1=8E?= =?UTF-8?q?=20=D1=87=D0=B0=D1=81=D1=82=D1=8C=20=D0=B1=D1=80=D1=83=D0=BD?= =?UTF-8?q?=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- works/api-lab-01/PokedexApi.sln | 16 +++++++++++++ works/api-lab-01/PokedexApi/PokedexApi.csproj | 13 +++++++++++ works/api-lab-01/PokedexApi/PokedexApi.http | 6 +++++ works/api-lab-01/PokedexApi/Program.cs | 14 +++++++++++ .../PokedexApi/Properties/launchSettings.json | 23 +++++++++++++++++++ .../PokedexApi/appsettings.Development.json | 8 +++++++ works/api-lab-01/PokedexApi/appsettings.json | 9 ++++++++ 7 files changed, 89 insertions(+) create mode 100644 works/api-lab-01/PokedexApi.sln create mode 100644 works/api-lab-01/PokedexApi/PokedexApi.csproj create mode 100644 works/api-lab-01/PokedexApi/PokedexApi.http create mode 100644 works/api-lab-01/PokedexApi/Program.cs create mode 100644 works/api-lab-01/PokedexApi/Properties/launchSettings.json create mode 100644 works/api-lab-01/PokedexApi/appsettings.Development.json create mode 100644 works/api-lab-01/PokedexApi/appsettings.json 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": "*" +}