Skip to content

Commit

Permalink
solution created
Browse files Browse the repository at this point in the history
  • Loading branch information
mtarsitu committed Mar 16, 2023
1 parent 710057f commit 751423e
Show file tree
Hide file tree
Showing 49 changed files with 1,133 additions and 0 deletions.
4 changes: 4 additions & 0 deletions API-auto/.vs/API-auto/xs/UserPrefs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<Properties StartupConfiguration="{7F7A0806-18F0-464B-90A4-B87B935AD46A}|https">
<MonoDevelop.Ide.ItemProperties.API-auto FirstBuild="True" />
<MultiItemStartupConfigurations />
</Properties>
1 change: 1 addition & 0 deletions API-auto/.vs/API-auto/xs/project-cache/API-auto-Debug.json

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions API-auto/API-auto.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 25.0.1705.2
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "API-auto", "API-auto\API-auto.csproj", "{7F7A0806-18F0-464B-90A4-B87B935AD46A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7F7A0806-18F0-464B-90A4-B87B935AD46A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F7A0806-18F0-464B-90A4-B87B935AD46A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F7A0806-18F0-464B-90A4-B87B935AD46A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F7A0806-18F0-464B-90A4-B87B935AD46A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A9017A05-9B8C-4A5D-93C8-F4122765FC67}
EndGlobalSection
EndGlobal
17 changes: 17 additions & 0 deletions API-auto/API-auto/API-auto.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>API_auto</RootNamespace>
</PropertyGroup>

<PropertyGroup Condition=" '$(RunConfiguration)' == 'https' " />
<PropertyGroup Condition=" '$(RunConfiguration)' == 'http' " />
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
</ItemGroup>

</Project>
33 changes: 33 additions & 0 deletions API-auto/API-auto/Controllers/WeatherForecastController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using Microsoft.AspNetCore.Mvc;

namespace API_auto.Controllers;

[ApiController]
[Route("[controller]")]
public class WeatherForecastController : ControllerBase
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};

private readonly ILogger<WeatherForecastController> _logger;

public WeatherForecastController(ILogger<WeatherForecastController> logger)
{
_logger = logger;
}

[HttpGet(Name = "GetWeatherForecast")]
public IEnumerable<WeatherForecast> Get()
{
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
TemperatureC = Random.Shared.Next(-20, 55),
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
})
.ToArray();
}
}

26 changes: 26 additions & 0 deletions API-auto/API-auto/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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();

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();

41 changes: 41 additions & 0 deletions API-auto/API-auto/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:13140",
"sslPort": 44378
}
},
"profiles": {
"http": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5204",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": true
},
"https": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7122;http://localhost:5204",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": true
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
13 changes: 13 additions & 0 deletions API-auto/API-auto/WeatherForecast.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace API_auto;

public class WeatherForecast
{
public DateOnly Date { get; set; }

public int TemperatureC { get; set; }

public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);

public string? Summary { get; set; }
}

9 changes: 9 additions & 0 deletions API-auto/API-auto/appsettings.Development.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

10 changes: 10 additions & 0 deletions API-auto/API-auto/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

Binary file added API-auto/API-auto/bin/Debug/net7.0/API-auto
Binary file not shown.
134 changes: 134 additions & 0 deletions API-auto/API-auto/bin/Debug/net7.0/API-auto.deps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v7.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v7.0": {
"API-auto/1.0.0": {
"dependencies": {
"Microsoft.AspNetCore.OpenApi": "7.0.4",
"Swashbuckle.AspNetCore": "6.4.0"
},
"runtime": {
"API-auto.dll": {}
}
},
"Microsoft.AspNetCore.OpenApi/7.0.4": {
"dependencies": {
"Microsoft.OpenApi": "1.4.3"
},
"runtime": {
"lib/net7.0/Microsoft.AspNetCore.OpenApi.dll": {
"assemblyVersion": "7.0.4.0",
"fileVersion": "7.0.423.11903"
}
}
},
"Microsoft.Extensions.ApiDescription.Server/6.0.5": {},
"Microsoft.OpenApi/1.4.3": {
"runtime": {
"lib/netstandard2.0/Microsoft.OpenApi.dll": {
"assemblyVersion": "1.4.3.0",
"fileVersion": "1.4.3.0"
}
}
},
"Swashbuckle.AspNetCore/6.4.0": {
"dependencies": {
"Microsoft.Extensions.ApiDescription.Server": "6.0.5",
"Swashbuckle.AspNetCore.Swagger": "6.4.0",
"Swashbuckle.AspNetCore.SwaggerGen": "6.4.0",
"Swashbuckle.AspNetCore.SwaggerUI": "6.4.0"
}
},
"Swashbuckle.AspNetCore.Swagger/6.4.0": {
"dependencies": {
"Microsoft.OpenApi": "1.4.3"
},
"runtime": {
"lib/net6.0/Swashbuckle.AspNetCore.Swagger.dll": {
"assemblyVersion": "6.4.0.0",
"fileVersion": "6.4.0.0"
}
}
},
"Swashbuckle.AspNetCore.SwaggerGen/6.4.0": {
"dependencies": {
"Swashbuckle.AspNetCore.Swagger": "6.4.0"
},
"runtime": {
"lib/net6.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {
"assemblyVersion": "6.4.0.0",
"fileVersion": "6.4.0.0"
}
}
},
"Swashbuckle.AspNetCore.SwaggerUI/6.4.0": {
"runtime": {
"lib/net6.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {
"assemblyVersion": "6.4.0.0",
"fileVersion": "6.4.0.0"
}
}
}
}
},
"libraries": {
"API-auto/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Microsoft.AspNetCore.OpenApi/7.0.4": {
"type": "package",
"serviceable": true,
"sha512": "sha512-1zlq5/xtbC9AyNHK2EBaL2RuCepoWHAXSxN68io/nndYLOTz/tgGmwtJvDZkUzFYooAXaNlavzcRlgS4muqgOA==",
"path": "microsoft.aspnetcore.openapi/7.0.4",
"hashPath": "microsoft.aspnetcore.openapi.7.0.4.nupkg.sha512"
},
"Microsoft.Extensions.ApiDescription.Server/6.0.5": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Ckb5EDBUNJdFWyajfXzUIMRkhf52fHZOQuuZg/oiu8y7zDCVwD0iHhew6MnThjHmevanpxL3f5ci2TtHQEN6bw==",
"path": "microsoft.extensions.apidescription.server/6.0.5",
"hashPath": "microsoft.extensions.apidescription.server.6.0.5.nupkg.sha512"
},
"Microsoft.OpenApi/1.4.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-rURwggB+QZYcSVbDr7HSdhw/FELvMlriW10OeOzjPT7pstefMo7IThhtNtDudxbXhW+lj0NfX72Ka5EDsG8x6w==",
"path": "microsoft.openapi/1.4.3",
"hashPath": "microsoft.openapi.1.4.3.nupkg.sha512"
},
"Swashbuckle.AspNetCore/6.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-eUBr4TW0up6oKDA5Xwkul289uqSMgY0xGN4pnbOIBqCcN9VKGGaPvHX3vWaG/hvocfGDP+MGzMA0bBBKz2fkmQ==",
"path": "swashbuckle.aspnetcore/6.4.0",
"hashPath": "swashbuckle.aspnetcore.6.4.0.nupkg.sha512"
},
"Swashbuckle.AspNetCore.Swagger/6.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-nl4SBgGM+cmthUcpwO/w1lUjevdDHAqRvfUoe4Xp/Uvuzt9mzGUwyFCqa3ODBAcZYBiFoKvrYwz0rabslJvSmQ==",
"path": "swashbuckle.aspnetcore.swagger/6.4.0",
"hashPath": "swashbuckle.aspnetcore.swagger.6.4.0.nupkg.sha512"
},
"Swashbuckle.AspNetCore.SwaggerGen/6.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-lXhcUBVqKrPFAQF7e/ZeDfb5PMgE8n5t6L5B6/BQSpiwxgHzmBcx8Msu42zLYFTvR5PIqE9Q9lZvSQAcwCxJjw==",
"path": "swashbuckle.aspnetcore.swaggergen/6.4.0",
"hashPath": "swashbuckle.aspnetcore.swaggergen.6.4.0.nupkg.sha512"
},
"Swashbuckle.AspNetCore.SwaggerUI/6.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-1Hh3atb3pi8c+v7n4/3N80Jj8RvLOXgWxzix6w3OZhB7zBGRwsy7FWr4e3hwgPweSBpwfElqj4V4nkjYabH9nQ==",
"path": "swashbuckle.aspnetcore.swaggerui/6.4.0",
"hashPath": "swashbuckle.aspnetcore.swaggerui.6.4.0.nupkg.sha512"
}
}
}
Binary file added API-auto/API-auto/bin/Debug/net7.0/API-auto.dll
Binary file not shown.
Binary file added API-auto/API-auto/bin/Debug/net7.0/API-auto.pdb
Binary file not shown.
19 changes: 19 additions & 0 deletions API-auto/API-auto/bin/Debug/net7.0/API-auto.runtimeconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"runtimeOptions": {
"tfm": "net7.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "7.0.0"
},
{
"name": "Microsoft.AspNetCore.App",
"version": "7.0.0"
}
],
"configProperties": {
"System.GC.Server": true,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

10 changes: 10 additions & 0 deletions API-auto/API-auto/bin/Debug/net7.0/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

Loading

0 comments on commit 751423e

Please sign in to comment.