-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
7 changed files
with
78 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...WebJobs.Extensions.OpenApi.TestApp/Get_ApplicationJson_GenericAndRecursive_HttpTrigger.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Net; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Http; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.Azure.WebJobs.Extensions.Http; | ||
using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; | ||
using Microsoft.Azure.WebJobs.Extensions.OpenApi.TestApp.Models; | ||
using Microsoft.Extensions.Logging; | ||
using Microsoft.OpenApi.Models; | ||
|
||
namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.TestApp | ||
{ | ||
public static class Get_ApplicationJson_GenericAndRecursive_HttpTrigger | ||
{ | ||
[FunctionName(nameof(Get_ApplicationJson_GenericAndRecursive_HttpTrigger))] | ||
[OpenApiOperation(operationId: nameof(Get_ApplicationJson_GenericAndRecursive), tags: new[] { "genericAndRecursive" })] | ||
[OpenApiResponseWithBody(statusCode: HttpStatusCode.OK, contentType: "application/json", bodyType: typeof(GenericAndRecursiveModel), Description = "The OK response")] | ||
public static async Task<IActionResult> Get_ApplicationJson_GenericAndRecursive( | ||
[HttpTrigger(AuthorizationLevel.Anonymous, "GET", Route = "get-applicationjson-genericandrecursive")] HttpRequest req, | ||
ILogger log) | ||
{ | ||
var result = new OkResult(); | ||
|
||
return await Task.FromResult(result).ConfigureAwait(false); | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...ion/Microsoft.Azure.WebJobs.Extensions.OpenApi.TestApp/Models/GenericAndRecursiveModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.TestApp.Models | ||
{ | ||
public class GenericAndRecursiveModel | ||
{ | ||
public List<GenericAndRecursiveModel> Children { get; set; } | ||
|
||
public Dictionary<string, GenericAndRecursiveModel> Children2 { get; set; } | ||
|
||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes/FakeClassModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes | ||
{ | ||
public class FakeClassModel | ||
{ | ||
public int Number { get; set; } | ||
public string Text { get; set; } | ||
public List<FakeClassModel> Children { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters