Skip to content

Commit f83e474

Browse files
committed
GitHub.Actions.API
0 parents  commit f83e474

File tree

126 files changed

+4931
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+4931
-0
lines changed

.vs/GitHub.Actions/config/applicationhost.config

Lines changed: 1011 additions & 0 deletions
Large diffs are not rendered by default.

.vs/GitHub.Actions/v17/.suo

20.5 KB
Binary file not shown.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
3+
namespace GitHub.Actions.API.Controllers
4+
{
5+
[ApiController]
6+
[Route("[controller]")]
7+
public class WeatherForecastController : ControllerBase
8+
{
9+
private static readonly string[] Summaries = new[]
10+
{
11+
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
12+
};
13+
14+
private readonly ILogger<WeatherForecastController> _logger;
15+
16+
public WeatherForecastController(ILogger<WeatherForecastController> logger)
17+
{
18+
_logger = logger;
19+
}
20+
21+
[HttpGet(Name = "GetWeatherForecast")]
22+
public IEnumerable<WeatherForecast> Get()
23+
{
24+
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
25+
{
26+
Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
27+
TemperatureC = Random.Shared.Next(-20, 55),
28+
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
29+
})
30+
.ToArray();
31+
}
32+
}
33+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net7.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.13" />
11+
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
12+
</ItemGroup>
13+
14+
</Project>

GitHub.Actions.API/Program.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
var builder = WebApplication.CreateBuilder(args);
2+
3+
// Add services to the container.
4+
5+
builder.Services.AddControllers();
6+
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
7+
builder.Services.AddEndpointsApiExplorer();
8+
builder.Services.AddSwaggerGen();
9+
10+
var app = builder.Build();
11+
12+
// Configure the HTTP request pipeline.
13+
if (app.Environment.IsDevelopment())
14+
{
15+
app.UseSwagger();
16+
app.UseSwaggerUI();
17+
}
18+
19+
app.UseAuthorization();
20+
21+
app.MapControllers();
22+
23+
app.Run();
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"$schema": "https://json.schemastore.org/launchsettings.json",
3+
"iisSettings": {
4+
"windowsAuthentication": false,
5+
"anonymousAuthentication": true,
6+
"iisExpress": {
7+
"applicationUrl": "http://localhost:13257",
8+
"sslPort": 0
9+
}
10+
},
11+
"profiles": {
12+
"http": {
13+
"commandName": "Project",
14+
"dotnetRunMessages": true,
15+
"launchBrowser": true,
16+
"launchUrl": "swagger",
17+
"applicationUrl": "http://localhost:5195",
18+
"environmentVariables": {
19+
"ASPNETCORE_ENVIRONMENT": "Development"
20+
}
21+
},
22+
"IIS Express": {
23+
"commandName": "IISExpress",
24+
"launchBrowser": true,
25+
"launchUrl": "swagger",
26+
"environmentVariables": {
27+
"ASPNETCORE_ENVIRONMENT": "Development"
28+
}
29+
}
30+
}
31+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace GitHub.Actions.API
2+
{
3+
public class WeatherForecast
4+
{
5+
public DateOnly Date { get; set; }
6+
7+
public int TemperatureC { get; set; }
8+
9+
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
10+
11+
public string? Summary { get; set; }
12+
}
13+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
6+
}
7+
}
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
6+
}
7+
},
8+
"AllowedHosts": "*"
9+
}
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
{
2+
"runtimeTarget": {
3+
"name": ".NETCoreApp,Version=v7.0",
4+
"signature": ""
5+
},
6+
"compilationOptions": {},
7+
"targets": {
8+
".NETCoreApp,Version=v7.0": {
9+
"GitHub.Actions.API/1.0.0": {
10+
"dependencies": {
11+
"Microsoft.AspNetCore.OpenApi": "7.0.13",
12+
"Swashbuckle.AspNetCore": "6.5.0"
13+
},
14+
"runtime": {
15+
"GitHub.Actions.API.dll": {}
16+
}
17+
},
18+
"Microsoft.AspNetCore.OpenApi/7.0.13": {
19+
"dependencies": {
20+
"Microsoft.OpenApi": "1.4.3"
21+
},
22+
"runtime": {
23+
"lib/net7.0/Microsoft.AspNetCore.OpenApi.dll": {
24+
"assemblyVersion": "7.0.13.0",
25+
"fileVersion": "7.0.1323.52007"
26+
}
27+
}
28+
},
29+
"Microsoft.Extensions.ApiDescription.Server/6.0.5": {},
30+
"Microsoft.OpenApi/1.4.3": {
31+
"runtime": {
32+
"lib/netstandard2.0/Microsoft.OpenApi.dll": {
33+
"assemblyVersion": "1.4.3.0",
34+
"fileVersion": "1.4.3.0"
35+
}
36+
}
37+
},
38+
"Swashbuckle.AspNetCore/6.5.0": {
39+
"dependencies": {
40+
"Microsoft.Extensions.ApiDescription.Server": "6.0.5",
41+
"Swashbuckle.AspNetCore.Swagger": "6.5.0",
42+
"Swashbuckle.AspNetCore.SwaggerGen": "6.5.0",
43+
"Swashbuckle.AspNetCore.SwaggerUI": "6.5.0"
44+
}
45+
},
46+
"Swashbuckle.AspNetCore.Swagger/6.5.0": {
47+
"dependencies": {
48+
"Microsoft.OpenApi": "1.4.3"
49+
},
50+
"runtime": {
51+
"lib/net7.0/Swashbuckle.AspNetCore.Swagger.dll": {
52+
"assemblyVersion": "6.5.0.0",
53+
"fileVersion": "6.5.0.0"
54+
}
55+
}
56+
},
57+
"Swashbuckle.AspNetCore.SwaggerGen/6.5.0": {
58+
"dependencies": {
59+
"Swashbuckle.AspNetCore.Swagger": "6.5.0"
60+
},
61+
"runtime": {
62+
"lib/net7.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {
63+
"assemblyVersion": "6.5.0.0",
64+
"fileVersion": "6.5.0.0"
65+
}
66+
}
67+
},
68+
"Swashbuckle.AspNetCore.SwaggerUI/6.5.0": {
69+
"runtime": {
70+
"lib/net7.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {
71+
"assemblyVersion": "6.5.0.0",
72+
"fileVersion": "6.5.0.0"
73+
}
74+
}
75+
}
76+
}
77+
},
78+
"libraries": {
79+
"GitHub.Actions.API/1.0.0": {
80+
"type": "project",
81+
"serviceable": false,
82+
"sha512": ""
83+
},
84+
"Microsoft.AspNetCore.OpenApi/7.0.13": {
85+
"type": "package",
86+
"serviceable": true,
87+
"sha512": "sha512-CHNUWJD3mbfn1Lra1b0EeoyRHDv7udHqVvle/BLZgXSfjRcau8YSWRqmP6W9zLeZ/rxSN64kqrgOOvfkHJzgYg==",
88+
"path": "microsoft.aspnetcore.openapi/7.0.13",
89+
"hashPath": "microsoft.aspnetcore.openapi.7.0.13.nupkg.sha512"
90+
},
91+
"Microsoft.Extensions.ApiDescription.Server/6.0.5": {
92+
"type": "package",
93+
"serviceable": true,
94+
"sha512": "sha512-Ckb5EDBUNJdFWyajfXzUIMRkhf52fHZOQuuZg/oiu8y7zDCVwD0iHhew6MnThjHmevanpxL3f5ci2TtHQEN6bw==",
95+
"path": "microsoft.extensions.apidescription.server/6.0.5",
96+
"hashPath": "microsoft.extensions.apidescription.server.6.0.5.nupkg.sha512"
97+
},
98+
"Microsoft.OpenApi/1.4.3": {
99+
"type": "package",
100+
"serviceable": true,
101+
"sha512": "sha512-rURwggB+QZYcSVbDr7HSdhw/FELvMlriW10OeOzjPT7pstefMo7IThhtNtDudxbXhW+lj0NfX72Ka5EDsG8x6w==",
102+
"path": "microsoft.openapi/1.4.3",
103+
"hashPath": "microsoft.openapi.1.4.3.nupkg.sha512"
104+
},
105+
"Swashbuckle.AspNetCore/6.5.0": {
106+
"type": "package",
107+
"serviceable": true,
108+
"sha512": "sha512-FK05XokgjgwlCI6wCT+D4/abtQkL1X1/B9Oas6uIwHFmYrIO9WUD5aLC9IzMs9GnHfUXOtXZ2S43gN1mhs5+aA==",
109+
"path": "swashbuckle.aspnetcore/6.5.0",
110+
"hashPath": "swashbuckle.aspnetcore.6.5.0.nupkg.sha512"
111+
},
112+
"Swashbuckle.AspNetCore.Swagger/6.5.0": {
113+
"type": "package",
114+
"serviceable": true,
115+
"sha512": "sha512-XWmCmqyFmoItXKFsQSwQbEAsjDKcxlNf1l+/Ki42hcb6LjKL8m5Db69OTvz5vLonMSRntYO1XLqz0OP+n3vKnA==",
116+
"path": "swashbuckle.aspnetcore.swagger/6.5.0",
117+
"hashPath": "swashbuckle.aspnetcore.swagger.6.5.0.nupkg.sha512"
118+
},
119+
"Swashbuckle.AspNetCore.SwaggerGen/6.5.0": {
120+
"type": "package",
121+
"serviceable": true,
122+
"sha512": "sha512-Y/qW8Qdg9OEs7V013tt+94OdPxbRdbhcEbw4NiwGvf4YBcfhL/y7qp/Mjv/cENsQ2L3NqJ2AOu94weBy/h4KvA==",
123+
"path": "swashbuckle.aspnetcore.swaggergen/6.5.0",
124+
"hashPath": "swashbuckle.aspnetcore.swaggergen.6.5.0.nupkg.sha512"
125+
},
126+
"Swashbuckle.AspNetCore.SwaggerUI/6.5.0": {
127+
"type": "package",
128+
"serviceable": true,
129+
"sha512": "sha512-OvbvxX+wL8skxTBttcBsVxdh73Fag4xwqEU2edh4JMn7Ws/xJHnY/JB1e9RoCb6XpDxUF3hD9A0Z1lEUx40Pfw==",
130+
"path": "swashbuckle.aspnetcore.swaggerui/6.5.0",
131+
"hashPath": "swashbuckle.aspnetcore.swaggerui.6.5.0.nupkg.sha512"
132+
}
133+
}
134+
}

0 commit comments

Comments
 (0)