File tree 2 files changed +24
-1
lines changed
samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.OutOfProc
src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ public static void Main()
19
19
{
20
20
var host = new HostBuilder ( )
21
21
. ConfigureFunctionsWorkerDefaults ( worker => worker . UseNewtonsoftJson ( ) )
22
- . ConfigureOpenApi ( )
23
22
. ConfigureServices ( services =>
24
23
{
25
24
services . AddSingleton < Fixture > ( new Fixture ( ) )
Original file line number Diff line number Diff line change
1
+ using Microsoft . Azure . Functions . Worker . Core ;
2
+ using Microsoft . Azure . Functions . Worker . Extensions . OpenApi ;
3
+ using Microsoft . Azure . Functions . Worker . Extensions . OpenApi . Functions ;
4
+ using Microsoft . Azure . WebJobs . Extensions . OpenApi . Core . Abstractions ;
5
+ using Microsoft . Extensions . DependencyInjection ;
6
+
7
+ [ assembly: WorkerExtensionStartup ( typeof ( OpenApiWorkerStartup ) ) ]
8
+
9
+ namespace Microsoft . Azure . Functions . Worker . Extensions . OpenApi
10
+ {
11
+ /// <summary>
12
+ /// This represents the startup entity for OpenAPI endpoints registration
13
+ /// </summary>
14
+ public class OpenApiWorkerStartup : WorkerExtensionStartup
15
+ {
16
+ /// <inheritdoc />
17
+ public override void Configure ( IFunctionsWorkerApplicationBuilder applicationBuilder )
18
+ {
19
+ applicationBuilder . Services . AddSingleton < IOpenApiHttpTriggerContext , OpenApiHttpTriggerContext > ( ) ;
20
+ applicationBuilder . Services . AddSingleton < IOpenApiTriggerFunction , OpenApiTriggerFunction > ( ) ;
21
+ //applicationBuilder.Services.AddSingleton<DefaultOpenApiHttpTrigger, DefaultOpenApiHttpTrigger>();
22
+ }
23
+ }
24
+ }
You can’t perform that action at this time.
0 commit comments