Skip to content

Commit 97f0a02

Browse files
committed
Merge branch 'dev' into release/swagger-2.0.0
2 parents a2ef046 + 91a020d commit 97f0a02

33 files changed

+895
-18
lines changed

Aliencube.AzureFunctions.Extensions.sln

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,19 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aliencube.AzureFunctions.Fu
6969
EndProject
7070
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aliencube.AzureFunctions.FunctionAppV1IoC", "samples\Aliencube.AzureFunctions.FunctionAppV1IoC\Aliencube.AzureFunctions.FunctionAppV1IoC.csproj", "{7FD855AB-EB0E-42AE-A26D-E164D375D6A5}"
7171
EndProject
72-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aliencube.AzureFunctions.FunctionAppV2Static", "samples\Aliencube.AzureFunctions.FunctionAppV2Static\Aliencube.AzureFunctions.FunctionAppV2Static.csproj", "{848EDB8F-9C45-462B-A544-EA237774F3BA}"
72+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aliencube.AzureFunctions.FunctionAppV2Static", "samples\Aliencube.AzureFunctions.FunctionAppV2Static\Aliencube.AzureFunctions.FunctionAppV2Static.csproj", "{848EDB8F-9C45-462B-A544-EA237774F3BA}"
7373
EndProject
74-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aliencube.AzureFunctions.FunctionAppV2IoC", "samples\Aliencube.AzureFunctions.FunctionAppV2IoC\Aliencube.AzureFunctions.FunctionAppV2IoC.csproj", "{D6C3806E-2685-4E8D-9F4F-7A93E5270891}"
74+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aliencube.AzureFunctions.FunctionAppV2IoC", "samples\Aliencube.AzureFunctions.FunctionAppV2IoC\Aliencube.AzureFunctions.FunctionAppV2IoC.csproj", "{D6C3806E-2685-4E8D-9F4F-7A93E5270891}"
75+
EndProject
76+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "templates", "templates", "{56A43630-87E6-4E94-B24A-859258202578}"
77+
EndProject
78+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OpenApiEndpoints", "OpenApiEndpoints", "{41695443-A292-4909-89A6-2D9846753164}"
79+
ProjectSection(SolutionItems) = preProject
80+
templates\OpenApiEndpints\IOpenApiHttpTriggerContext.cs = templates\OpenApiEndpints\IOpenApiHttpTriggerContext.cs
81+
templates\OpenApiEndpints\OpenApiHttpTrigger.cs = templates\OpenApiEndpints\OpenApiHttpTrigger.cs
82+
templates\OpenApiEndpints\OpenApiHttpTriggerContext.cs = templates\OpenApiEndpints\OpenApiHttpTriggerContext.cs
83+
templates\OpenApiEndpints\OpenApiHttpTriggerV1.cs = templates\OpenApiEndpints\OpenApiHttpTriggerV1.cs
84+
EndProjectSection
7585
EndProject
7686
Global
7787
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -220,6 +230,7 @@ Global
220230
{7FD855AB-EB0E-42AE-A26D-E164D375D6A5} = {66D8DEA8-B477-497F-95BB-E8F9A5BAC352}
221231
{848EDB8F-9C45-462B-A544-EA237774F3BA} = {66D8DEA8-B477-497F-95BB-E8F9A5BAC352}
222232
{D6C3806E-2685-4E8D-9F4F-7A93E5270891} = {66D8DEA8-B477-497F-95BB-E8F9A5BAC352}
233+
{41695443-A292-4909-89A6-2D9846753164} = {56A43630-87E6-4E94-B24A-859258202578}
223234
EndGlobalSection
224235
GlobalSection(ExtensibilityGlobals) = postSolution
225236
SolutionGuid = {70FEC644-BB3C-4441-AF91-DC694803C8F2}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
namespace Aliencube.AzureFunctions.FunctionApp.Models
2+
{
3+
/// <summary>
4+
/// This represents the model entity for API response of Swagger Pet Store.
5+
/// </summary>
6+
public class ApiResponse
7+
{
8+
/// <summary>
9+
/// Gets or sets the code.
10+
/// </summary>
11+
public int? Code { get; set; }
12+
13+
/// <summary>
14+
/// Gets or sets the type.
15+
/// </summary>
16+
public string Type { get; set; }
17+
18+
/// <summary>
19+
/// Gets or sets the message.
20+
/// </summary>
21+
public string Message { get; set; }
22+
}
23+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
namespace Aliencube.AzureFunctions.FunctionApp.Models
2+
{
3+
/// <summary>
4+
/// This represents the model entity for category of Swagger Pet Store.
5+
/// </summary>
6+
public class Category
7+
{
8+
/// <summary>
9+
/// Gets or sets the category ID.
10+
/// </summary>
11+
public long? Id { get; set; }
12+
13+
/// <summary>
14+
/// Gets or sets the name.
15+
/// </summary>
16+
public string Name { get; set; }
17+
}
18+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
using System;
2+
3+
namespace Aliencube.AzureFunctions.FunctionApp.Models
4+
{
5+
/// <summary>
6+
/// This represents the model entity for order of Swagger Pet Store.
7+
/// </summary>
8+
public class Order
9+
{
10+
/// <summary>
11+
/// Gets or sets the order ID.
12+
/// </summary>
13+
public long? Id { get; set; }
14+
15+
/// <summary>
16+
/// Gets or sets the pet ID.
17+
/// </summary>
18+
public long? PetId { get; set; }
19+
20+
/// <summary>
21+
/// Gets or sets the quantity.
22+
/// </summary>
23+
public int? Quantity { get; set; }
24+
25+
/// <summary>
26+
/// Gets or seets the date/time shipped.
27+
/// </summary>
28+
public DateTime? ShipDate { get; set; }
29+
30+
/// <summary>
31+
/// Gets or sets the <see cref="OrderStatus"/> value.
32+
/// </summary>
33+
public OrderStatus? Status { get; set; }
34+
35+
/// <summary>
36+
/// Gets or sets the value indicating whether the order is complete or not.
37+
/// </summary>
38+
public bool? Complete { get; set; }
39+
}
40+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using Newtonsoft.Json;
2+
using Newtonsoft.Json.Converters;
3+
4+
namespace Aliencube.AzureFunctions.FunctionApp.Models
5+
{
6+
/// <summary>
7+
/// This specifies the order status.
8+
/// </summary>
9+
[JsonConverter(typeof(StringEnumConverter))]
10+
public enum OrderStatus
11+
{
12+
/// <summary>
13+
/// Identifies as "placed".
14+
/// </summary>
15+
Placed = 1,
16+
17+
/// <summary>
18+
/// Identifies as "approved".
19+
/// </summary>
20+
Approved = 2,
21+
22+
/// <summary>
23+
/// Identifies as "delivered".
24+
/// </summary>
25+
Delivered = 3
26+
}
27+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
using System.Collections.Generic;
2+
3+
using Newtonsoft.Json;
4+
5+
namespace Aliencube.AzureFunctions.FunctionApp.Models
6+
{
7+
/// <summary>
8+
/// This represents the model entity for pet of Swagger Pet Store.
9+
/// </summary>
10+
public class Pet
11+
{
12+
/// <summary>
13+
/// Gets or sets the pet ID.
14+
/// </summary>
15+
public long? Id { get; set; }
16+
17+
/// <summary>
18+
/// Gets or sets the category.
19+
/// </summary>
20+
public Category Category { get; set; }
21+
22+
/// <summary>
23+
/// Gets or sets the name.
24+
/// </summary>
25+
[JsonRequired]
26+
public string Name { get; set; }
27+
28+
/// <summary>
29+
/// Gets or sets the list of photo URLs.
30+
/// </summary>
31+
[JsonRequired]
32+
public List<string> PhotoUrls { get; set; } = new List<string>();
33+
34+
/// <summary>
35+
/// Gets or sets the list of tags.
36+
/// </summary>
37+
public List<Tag> Tags { get; set; }
38+
39+
/// <summary>
40+
/// Gets or sets the <see cref="PetStatus"/> value.
41+
/// </summary>
42+
public PetStatus? Status { get; set; }
43+
}
44+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using Newtonsoft.Json;
2+
using Newtonsoft.Json.Converters;
3+
4+
namespace Aliencube.AzureFunctions.FunctionApp.Models
5+
{
6+
/// <summary>
7+
/// This specifices the pet status.
8+
/// </summary>
9+
[JsonConverter(typeof(StringEnumConverter))]
10+
public enum PetStatus
11+
{
12+
/// <summary>
13+
/// Identifies as "available".
14+
/// </summary>
15+
Available = 1,
16+
17+
/// <summary>
18+
/// Identifies as "pending".
19+
/// </summary>
20+
Pending = 2,
21+
22+
/// <summary>
23+
/// Identifies as "sold".
24+
/// </summary>
25+
Sold = 3
26+
}
27+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
namespace Aliencube.AzureFunctions.FunctionApp.Models
2+
{
3+
/// <summary>
4+
/// This represents the model entity for tag of Swagger Pet Store.
5+
/// </summary>
6+
public class Tag
7+
{
8+
/// <summary>
9+
/// Gets or sets the tag ID.
10+
/// </summary>
11+
public long? Id { get; set; }
12+
13+
/// <summary>
14+
/// Gets or sets the name.
15+
/// </summary>
16+
public string Name { get; set; }
17+
}
18+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
namespace Aliencube.AzureFunctions.FunctionApp.Models
2+
{
3+
/// <summary>
4+
/// This represents the model entity for user of Swagger Pet Store.
5+
/// </summary>
6+
public class User
7+
{
8+
/// <summary>
9+
/// Gets or sets the user ID.
10+
/// </summary>
11+
public long? Id { get; set; }
12+
13+
/// <summary>
14+
/// Gets or sets the username.
15+
/// </summary>
16+
public string Username { get; set; }
17+
18+
/// <summary>
19+
/// Gets or sets the first name.
20+
/// </summary>
21+
public string FirstName { get; set; }
22+
23+
/// <summary>
24+
/// Gets or sets the last name.
25+
/// </summary>
26+
public string LastName { get; set; }
27+
28+
/// <summary>
29+
/// Gets or sets the email.
30+
/// </summary>
31+
public string Email { get; set; }
32+
33+
/// <summary>
34+
/// Gets or sets the password.
35+
/// </summary>
36+
public string Password { get; set; }
37+
38+
/// <summary>
39+
/// Gets or sets the phone number.
40+
/// </summary>
41+
public string Phone { get; set; }
42+
43+
/// <summary>
44+
/// Gets or sets the user status value.
45+
/// </summary>
46+
public int? UserStatus { get; set; }
47+
}
48+
}

samples/Aliencube.AzureFunctions.FunctionAppV1IoC/Aliencube.AzureFunctions.FunctionAppV1IoC.csproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,17 @@
2727
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
2828
</None>
2929
</ItemGroup>
30+
31+
<ItemGroup Condition="'$(Configuration)'=='Debug'">
32+
<Compile Include="..\..\templates\OpenApiEndpints\IOpenApiHttpTriggerContext.cs">
33+
<BuildAction>Compile</BuildAction>
34+
</Compile>
35+
<Compile Include="..\..\templates\OpenApiEndpints\OpenApiHttpTriggerContext.cs">
36+
<BuildAction>Compile</BuildAction>
37+
</Compile>
38+
<Compile Include="..\..\templates\OpenApiEndpints\OpenApiHttpTriggerV1.cs">
39+
<BuildAction>Compile</BuildAction>
40+
</Compile>
41+
</ItemGroup>
42+
3043
</Project>

0 commit comments

Comments
 (0)