diff --git a/src/apiDemo/apiDemo.sln b/src/apiDemo/apiDemo.sln deleted file mode 100644 index 13c397c0..00000000 --- a/src/apiDemo/apiDemo.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.4.33103.184 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "apiDemo", "apiDemo\apiDemo.csproj", "{F283397C-2CD9-412B-A561-5BE263D8088A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F283397C-2CD9-412B-A561-5BE263D8088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F283397C-2CD9-412B-A561-5BE263D8088A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F283397C-2CD9-412B-A561-5BE263D8088A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F283397C-2CD9-412B-A561-5BE263D8088A}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {32430753-D4CB-4090-8ADF-E4C6FEC4824A} - EndGlobalSection -EndGlobal diff --git a/src/apiDemo/apiDemo/Program.cs b/src/apiDemo/apiDemo/Program.cs deleted file mode 100644 index fc642ce1..00000000 --- a/src/apiDemo/apiDemo/Program.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Panda.DynamicWebApi; - -var builder = WebApplication.CreateBuilder(args); - -// Add services to the container. - -builder.Services.AddControllers(); -// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle -builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddSwaggerGen(options => -{ - - -options.DocInclusionPredicate((docName, description) => true); - -options.IncludeXmlComments(@".\swagger.xml"); -}); -builder.Services.AddDynamicWebApi(); -var app = builder.Build(); - -// Configure the HTTP request pipeline. -if (app.Environment.IsDevelopment()) -{ - app.UseSwagger(); - app.UseSwaggerUI(); -} - -app.UseHttpsRedirection(); - -app.UseAuthorization(); - -app.MapControllers(); - -app.Run(); diff --git a/src/apiDemo/apiDemo/Properties/launchSettings.json b/src/apiDemo/apiDemo/Properties/launchSettings.json deleted file mode 100644 index 2bfa75d5..00000000 --- a/src/apiDemo/apiDemo/Properties/launchSettings.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:39272", - "sslPort": 44328 - } - }, - "profiles": { - "apiDemo": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "swagger", - "applicationUrl": "https://localhost:7262;http://localhost:5013", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "swagger", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/src/apiDemo/apiDemo/WeatherForecast.cs b/src/apiDemo/apiDemo/WeatherForecast.cs deleted file mode 100644 index 71e18825..00000000 --- a/src/apiDemo/apiDemo/WeatherForecast.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace apiDemo -{ - public class WeatherForecast - { - public DateTime Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string? Summary { get; set; } - } -} \ No newline at end of file diff --git a/src/apiDemo/apiDemo/WeatherForecastController.cs b/src/apiDemo/apiDemo/WeatherForecastController.cs deleted file mode 100644 index 55751f85..00000000 --- a/src/apiDemo/apiDemo/WeatherForecastController.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using Panda.DynamicWebApi; -using Panda.DynamicWebApi.Attributes; - -namespace apiDemo -{ - [DynamicWebApi] - [Route("[controller]")] - public class WeatherForecastController : IDynamicWebApi - { - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - private readonly ILogger _logger; - - public WeatherForecastController(ILogger logger) - { - _logger = logger; - } - - [HttpGet(Name = "GetWeatherForecast")] - public IEnumerable Get() - { - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = DateTime.Now.AddDays(index), - TemperatureC = Random.Shared.Next(-20, 55), - Summary = Summaries[Random.Shared.Next(Summaries.Length)] - }) - .ToArray(); - } - } -} \ No newline at end of file diff --git a/src/apiDemo/apiDemo/apiDemo.csproj b/src/apiDemo/apiDemo/apiDemo.csproj deleted file mode 100644 index aabecdce..00000000 --- a/src/apiDemo/apiDemo/apiDemo.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - net6.0 - enable - enable - True - .\swagger.xml - - - - - - - - diff --git a/src/apiDemo/apiDemo/appsettings.json b/src/apiDemo/apiDemo/appsettings.json deleted file mode 100644 index 10f68b8c..00000000 --- a/src/apiDemo/apiDemo/appsettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*" -} diff --git a/src/apiDemo/apiDemo/swagger.xml b/src/apiDemo/apiDemo/swagger.xml deleted file mode 100644 index bfc3dac5..00000000 --- a/src/apiDemo/apiDemo/swagger.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - apiDemo - - - -