diff --git a/.gitignore b/.gitignore index ab71afb..5cbcdfe 100644 --- a/.gitignore +++ b/.gitignore @@ -293,3 +293,4 @@ __pycache__/ outputs/ .DS_Store +NuGet.config diff --git a/.vscode/settings.json b/.vscode/settings.json index 8a01c85..3bf7f26 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,17 +1,17 @@ { - // "azureFunctions.deploySubpath": "samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5/bin/Release/net5.0/publish", + "azureFunctions.deploySubpath": "samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5/bin/Release/net5.0/publish", // "azureFunctions.deploySubpath": "samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V1Proxy/bin/Release/netcoreapp3.1/publish", // "azureFunctions.deploySubpath": "samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2IoC/bin/Release/netcoreapp2.1/publish", // "azureFunctions.deploySubpath": "samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2Static/bin/Release/netcoreapp2.1/publish", // "azureFunctions.deploySubpath": "samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3IoC/bin/Release/netcoreapp3.1/publish", - "azureFunctions.deploySubpath": "samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static/bin/Release/netcoreapp3.1/publish", + // "azureFunctions.deploySubpath": "samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static/bin/Release/netcoreapp3.1/publish", - // "azureFunctions.projectSubpath": "samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5", + "azureFunctions.projectSubpath": "samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5", // "azureFunctions.projectSubpath": "samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V1Proxy", // "azureFunctions.projectSubpath": "samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2IoC", // "azureFunctions.projectSubpath": "samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2Static", // "azureFunctions.projectSubpath": "samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3IoC", - "azureFunctions.projectSubpath": "samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static", + // "azureFunctions.projectSubpath": "samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static", "azureFunctions.projectLanguage": "C#", "azureFunctions.projectRuntime": "~3", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 336bd1e..d5af955 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -12,12 +12,12 @@ "type": "process", "problemMatcher": "$msCompile", "options": { - // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5" + "cwd": "${workspaceFolder}/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V1Proxy" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2IoC" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2Static" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3IoC" - "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static" + // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static" } }, { @@ -36,12 +36,12 @@ }, "problemMatcher": "$msCompile", "options": { - // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5" + "cwd": "${workspaceFolder}/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V1Proxy" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2IoC" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2Static" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3IoC" - "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static" + // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static" } }, { @@ -57,12 +57,12 @@ "type": "process", "problemMatcher": "$msCompile", "options": { - // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5" + "cwd": "${workspaceFolder}/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V1Proxy" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2IoC" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2Static" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3IoC" - "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static" + // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static" } }, { @@ -79,12 +79,12 @@ "dependsOn": "clean release", "problemMatcher": "$msCompile", "options": { - // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5" + "cwd": "${workspaceFolder}/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V1Proxy" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2IoC" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2Static" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3IoC" - "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static" + // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static" } }, { @@ -104,12 +104,12 @@ "type": "func", "dependsOn": "build", "options": { - // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5/bin/Debug/net5.0" + "cwd": "${workspaceFolder}/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5/bin/Debug/net5.0" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Proxy/bin/Debug/netcoreapp3.1" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2IoC/bin/Debug/netcoreapp2.1" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2Static/bin/Debug/netcoreapp2.1" // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3IoC/bin/Debug/netcoreapp3.1" - "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static/bin/Debug/netcoreapp3.1" + // "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static/bin/Debug/netcoreapp3.1" }, "command": "host start", "isBackground": true, diff --git a/Microsoft.Azure.WebJobs.Extensions.OpenApi.sln b/Microsoft.Azure.WebJobs.Extensions.OpenApi.sln index 1860e7c..b4f2141 100644 --- a/Microsoft.Azure.WebJobs.Extensions.OpenApi.sln +++ b/Microsoft.Azure.WebJobs.Extensions.OpenApi.sln @@ -16,54 +16,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{810145E0-41C EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.csproj", "{B409837F-3D64-407E-88AE-C0F932F1A4DE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.csproj", "{B9ADD076-3567-4795-910B-3A6993EF7D84}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin.csproj", "{976AE133-2456-4278-8F1F-5BB677AAAB69}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous.csproj", "{3172BC5E-8822-41D4-861F-7B6E12CC9AD6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function.csproj", "{BFAE9A46-1F63-4B33-B9AE-A027C7C14A0A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System.csproj", "{6DE3D942-6F09-4E61-8E80-FB88DBEC3A67}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User.csproj", "{510139D7-D45D-43B6-B983-1CC9599979B5}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin.csproj", "{5D768182-D3C7-439B-9BDB-47351BFD5FB0}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous.csproj", "{38CBC941-94FD-4773-9ADF-8C043F4BD9DE}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function.csproj", "{2CF00ED1-577C-4260-86E5-E9A1CE0E937C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System.csproj", "{99220D67-EF4A-4BC6-9682-198AE893F7F1}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User.csproj", "{5204D205-19C8-41FE-838B-AB26C3B06452}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin.csproj", "{50214B7F-0F36-4088-93C8-CF1AADAFEA7B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous.csproj", "{E534DED4-D584-46A6-8993-90F7C77F0416}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function.csproj", "{A140DA49-14F0-4810-9425-D2D7226F4C3A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System.csproj", "{5D0114BF-142C-45CC-B5B6-C6F48C3B4E8C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User.csproj", "{4F9F4528-798E-4324-BF34-4C969599805E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin.csproj", "{FD06C296-2755-45D7-8D9D-F4DDCFCE1FEA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous.csproj", "{ADEAAE86-0827-4342-926E-26E9C381826B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function.csproj", "{FD4B3758-EF4B-4FC9-B87C-16A3256DB7A6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System.csproj", "{BDF95384-4DB4-491E-B042-5CF066E1F86B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User", "src\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User.csproj", "{CC524B92-FBCF-4379-85B4-608351BFC666}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings", "src\Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings\Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings.csproj", "{64A22A3C-D0C4-4DE9-A8D5-2CEF766EB500}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.OpenApi.Core", "src\Microsoft.Azure.WebJobs.Extensions.OpenApi.Core\Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.csproj", "{B18937F6-B39F-46BB-BB3C-86C0693993EF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions", "src\Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions\Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.csproj", "{CDBD5665-D6CC-4C10-9872-A4886AC6275A}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.OpenApi", "src\Microsoft.Azure.WebJobs.Extensions.OpenApi\Microsoft.Azure.WebJobs.Extensions.OpenApi.csproj", "{D405655F-C8BE-4134-893C-ADB4918B0624}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI", "src\Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI\Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI.csproj", "{7AD094AA-01D6-4644-B9B6-E555A029D6D7}" @@ -72,9 +28,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{66D8 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5", "samples\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5.csproj", "{BDE6F761-880E-47C3-B40C-956F470E3D10}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Interfaces", "samples\Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Interfaces\Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Interfaces.csproj", "{F1438954-24F5-4D41-AFEA-46D9E1E74C72}" +EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models", "samples\Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models\Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.csproj", "{6ABA1666-BC42-487F-B156-3DC79347BD6B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Interfaces", "samples\Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Interfaces\Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Interfaces.csproj", "{F1438954-24F5-4D41-AFEA-46D9E1E74C72}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore", "samples\Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore\Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore.csproj", "{0FBF046E-7B17-410C-8219-8381D07726DF}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Services", "samples\Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Services\Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Services.csproj", "{B7CF1C77-FE6F-4586-93FE-801671A5EAFD}" EndProject @@ -92,28 +50,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{8B62E3FB-9 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests", "test\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests.csproj", "{B6C398B2-6F74-4E50-A49F-F36B9825F45E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes", "test\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes.csproj", "{56E00DEF-F87C-4893-8902-2844DE1AEB8D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests", "test\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.csproj", "{6138EFEB-3C50-4A35-BDFA-7270A5F621BD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Admin.Tests", "test\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Admin.Tests\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Admin.Tests.csproj", "{01141225-BA2E-412F-89A3-97654C1A803E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Anonymous.Tests", "test\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Anonymous.Tests\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Anonymous.Tests.csproj", "{3A6BEE5E-FEE0-4759-84D3-B66C1F76416F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Function.Tests", "test\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Function.Tests\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Function.Tests.csproj", "{261B2F47-80E7-4E6E-A7AF-8418812DAF81}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.System.Tests", "test\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.System.Tests\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.System.Tests.csproj", "{131506C3-DCEE-455A-A204-CC10B2678563}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.User.Tests", "test\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.User.Tests\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.User.Tests.csproj", "{90F2EBC9-15E1-4305-8485-244CA8EFF8E1}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings.Tests.Fakes", "test\Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings.Tests.Fakes\Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings.Tests.Fakes.csproj", "{AC89B7CF-0FA5-49EE-97A8-AB39A5F211A8}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings.Tests", "test\Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings.Tests\Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings.Tests.csproj", "{AEF35BD6-EA9A-4159-86F4-49AF7D17A9A8}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.Fakes", "test\Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.Fakes\Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.Fakes.csproj", "{134C4854-1A8E-4093-9526-32D308CDC7BC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests", "test\Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests\Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.csproj", "{6735CCE7-5142-490B-9A06-C7471604E93B}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes", "test\Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes\Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes.csproj", "{1D1A5ED5-A1A1-4082-ACAF-30079AF31AC6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests", "test\Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests\Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.csproj", "{968CD847-80D0-4740-92D5-F5553461EC04}" @@ -132,90 +72,6 @@ Global {B409837F-3D64-407E-88AE-C0F932F1A4DE}.Debug|Any CPU.Build.0 = Debug|Any CPU {B409837F-3D64-407E-88AE-C0F932F1A4DE}.Release|Any CPU.ActiveCfg = Release|Any CPU {B409837F-3D64-407E-88AE-C0F932F1A4DE}.Release|Any CPU.Build.0 = Release|Any CPU - {B9ADD076-3567-4795-910B-3A6993EF7D84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B9ADD076-3567-4795-910B-3A6993EF7D84}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B9ADD076-3567-4795-910B-3A6993EF7D84}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B9ADD076-3567-4795-910B-3A6993EF7D84}.Release|Any CPU.Build.0 = Release|Any CPU - {976AE133-2456-4278-8F1F-5BB677AAAB69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {976AE133-2456-4278-8F1F-5BB677AAAB69}.Debug|Any CPU.Build.0 = Debug|Any CPU - {976AE133-2456-4278-8F1F-5BB677AAAB69}.Release|Any CPU.ActiveCfg = Release|Any CPU - {976AE133-2456-4278-8F1F-5BB677AAAB69}.Release|Any CPU.Build.0 = Release|Any CPU - {3172BC5E-8822-41D4-861F-7B6E12CC9AD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3172BC5E-8822-41D4-861F-7B6E12CC9AD6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3172BC5E-8822-41D4-861F-7B6E12CC9AD6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3172BC5E-8822-41D4-861F-7B6E12CC9AD6}.Release|Any CPU.Build.0 = Release|Any CPU - {BFAE9A46-1F63-4B33-B9AE-A027C7C14A0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BFAE9A46-1F63-4B33-B9AE-A027C7C14A0A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BFAE9A46-1F63-4B33-B9AE-A027C7C14A0A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BFAE9A46-1F63-4B33-B9AE-A027C7C14A0A}.Release|Any CPU.Build.0 = Release|Any CPU - {6DE3D942-6F09-4E61-8E80-FB88DBEC3A67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6DE3D942-6F09-4E61-8E80-FB88DBEC3A67}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6DE3D942-6F09-4E61-8E80-FB88DBEC3A67}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6DE3D942-6F09-4E61-8E80-FB88DBEC3A67}.Release|Any CPU.Build.0 = Release|Any CPU - {510139D7-D45D-43B6-B983-1CC9599979B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {510139D7-D45D-43B6-B983-1CC9599979B5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {510139D7-D45D-43B6-B983-1CC9599979B5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {510139D7-D45D-43B6-B983-1CC9599979B5}.Release|Any CPU.Build.0 = Release|Any CPU - {5D768182-D3C7-439B-9BDB-47351BFD5FB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5D768182-D3C7-439B-9BDB-47351BFD5FB0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5D768182-D3C7-439B-9BDB-47351BFD5FB0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5D768182-D3C7-439B-9BDB-47351BFD5FB0}.Release|Any CPU.Build.0 = Release|Any CPU - {38CBC941-94FD-4773-9ADF-8C043F4BD9DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {38CBC941-94FD-4773-9ADF-8C043F4BD9DE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {38CBC941-94FD-4773-9ADF-8C043F4BD9DE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {38CBC941-94FD-4773-9ADF-8C043F4BD9DE}.Release|Any CPU.Build.0 = Release|Any CPU - {2CF00ED1-577C-4260-86E5-E9A1CE0E937C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2CF00ED1-577C-4260-86E5-E9A1CE0E937C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2CF00ED1-577C-4260-86E5-E9A1CE0E937C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2CF00ED1-577C-4260-86E5-E9A1CE0E937C}.Release|Any CPU.Build.0 = Release|Any CPU - {99220D67-EF4A-4BC6-9682-198AE893F7F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {99220D67-EF4A-4BC6-9682-198AE893F7F1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {99220D67-EF4A-4BC6-9682-198AE893F7F1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {99220D67-EF4A-4BC6-9682-198AE893F7F1}.Release|Any CPU.Build.0 = Release|Any CPU - {5204D205-19C8-41FE-838B-AB26C3B06452}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5204D205-19C8-41FE-838B-AB26C3B06452}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5204D205-19C8-41FE-838B-AB26C3B06452}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5204D205-19C8-41FE-838B-AB26C3B06452}.Release|Any CPU.Build.0 = Release|Any CPU - {50214B7F-0F36-4088-93C8-CF1AADAFEA7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {50214B7F-0F36-4088-93C8-CF1AADAFEA7B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {50214B7F-0F36-4088-93C8-CF1AADAFEA7B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {50214B7F-0F36-4088-93C8-CF1AADAFEA7B}.Release|Any CPU.Build.0 = Release|Any CPU - {E534DED4-D584-46A6-8993-90F7C77F0416}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E534DED4-D584-46A6-8993-90F7C77F0416}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E534DED4-D584-46A6-8993-90F7C77F0416}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E534DED4-D584-46A6-8993-90F7C77F0416}.Release|Any CPU.Build.0 = Release|Any CPU - {A140DA49-14F0-4810-9425-D2D7226F4C3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A140DA49-14F0-4810-9425-D2D7226F4C3A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A140DA49-14F0-4810-9425-D2D7226F4C3A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A140DA49-14F0-4810-9425-D2D7226F4C3A}.Release|Any CPU.Build.0 = Release|Any CPU - {5D0114BF-142C-45CC-B5B6-C6F48C3B4E8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5D0114BF-142C-45CC-B5B6-C6F48C3B4E8C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5D0114BF-142C-45CC-B5B6-C6F48C3B4E8C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5D0114BF-142C-45CC-B5B6-C6F48C3B4E8C}.Release|Any CPU.Build.0 = Release|Any CPU - {4F9F4528-798E-4324-BF34-4C969599805E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4F9F4528-798E-4324-BF34-4C969599805E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4F9F4528-798E-4324-BF34-4C969599805E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4F9F4528-798E-4324-BF34-4C969599805E}.Release|Any CPU.Build.0 = Release|Any CPU - {FD06C296-2755-45D7-8D9D-F4DDCFCE1FEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FD06C296-2755-45D7-8D9D-F4DDCFCE1FEA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FD06C296-2755-45D7-8D9D-F4DDCFCE1FEA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FD06C296-2755-45D7-8D9D-F4DDCFCE1FEA}.Release|Any CPU.Build.0 = Release|Any CPU - {ADEAAE86-0827-4342-926E-26E9C381826B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ADEAAE86-0827-4342-926E-26E9C381826B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ADEAAE86-0827-4342-926E-26E9C381826B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ADEAAE86-0827-4342-926E-26E9C381826B}.Release|Any CPU.Build.0 = Release|Any CPU - {FD4B3758-EF4B-4FC9-B87C-16A3256DB7A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FD4B3758-EF4B-4FC9-B87C-16A3256DB7A6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FD4B3758-EF4B-4FC9-B87C-16A3256DB7A6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FD4B3758-EF4B-4FC9-B87C-16A3256DB7A6}.Release|Any CPU.Build.0 = Release|Any CPU - {BDF95384-4DB4-491E-B042-5CF066E1F86B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BDF95384-4DB4-491E-B042-5CF066E1F86B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BDF95384-4DB4-491E-B042-5CF066E1F86B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BDF95384-4DB4-491E-B042-5CF066E1F86B}.Release|Any CPU.Build.0 = Release|Any CPU - {CC524B92-FBCF-4379-85B4-608351BFC666}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CC524B92-FBCF-4379-85B4-608351BFC666}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CC524B92-FBCF-4379-85B4-608351BFC666}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CC524B92-FBCF-4379-85B4-608351BFC666}.Release|Any CPU.Build.0 = Release|Any CPU {64A22A3C-D0C4-4DE9-A8D5-2CEF766EB500}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64A22A3C-D0C4-4DE9-A8D5-2CEF766EB500}.Debug|Any CPU.Build.0 = Debug|Any CPU {64A22A3C-D0C4-4DE9-A8D5-2CEF766EB500}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -224,10 +80,6 @@ Global {B18937F6-B39F-46BB-BB3C-86C0693993EF}.Debug|Any CPU.Build.0 = Debug|Any CPU {B18937F6-B39F-46BB-BB3C-86C0693993EF}.Release|Any CPU.ActiveCfg = Release|Any CPU {B18937F6-B39F-46BB-BB3C-86C0693993EF}.Release|Any CPU.Build.0 = Release|Any CPU - {CDBD5665-D6CC-4C10-9872-A4886AC6275A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CDBD5665-D6CC-4C10-9872-A4886AC6275A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CDBD5665-D6CC-4C10-9872-A4886AC6275A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CDBD5665-D6CC-4C10-9872-A4886AC6275A}.Release|Any CPU.Build.0 = Release|Any CPU {D405655F-C8BE-4134-893C-ADB4918B0624}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D405655F-C8BE-4134-893C-ADB4918B0624}.Debug|Any CPU.Build.0 = Debug|Any CPU {D405655F-C8BE-4134-893C-ADB4918B0624}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -240,10 +92,18 @@ Global {BDE6F761-880E-47C3-B40C-956F470E3D10}.Debug|Any CPU.Build.0 = Debug|Any CPU {BDE6F761-880E-47C3-B40C-956F470E3D10}.Release|Any CPU.ActiveCfg = Release|Any CPU {BDE6F761-880E-47C3-B40C-956F470E3D10}.Release|Any CPU.Build.0 = Release|Any CPU + {F1438954-24F5-4D41-AFEA-46D9E1E74C72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F1438954-24F5-4D41-AFEA-46D9E1E74C72}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F1438954-24F5-4D41-AFEA-46D9E1E74C72}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F1438954-24F5-4D41-AFEA-46D9E1E74C72}.Release|Any CPU.Build.0 = Release|Any CPU {6ABA1666-BC42-487F-B156-3DC79347BD6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6ABA1666-BC42-487F-B156-3DC79347BD6B}.Debug|Any CPU.Build.0 = Debug|Any CPU {6ABA1666-BC42-487F-B156-3DC79347BD6B}.Release|Any CPU.ActiveCfg = Release|Any CPU {6ABA1666-BC42-487F-B156-3DC79347BD6B}.Release|Any CPU.Build.0 = Release|Any CPU + {0FBF046E-7B17-410C-8219-8381D07726DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0FBF046E-7B17-410C-8219-8381D07726DF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0FBF046E-7B17-410C-8219-8381D07726DF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0FBF046E-7B17-410C-8219-8381D07726DF}.Release|Any CPU.Build.0 = Release|Any CPU {B7CF1C77-FE6F-4586-93FE-801671A5EAFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B7CF1C77-FE6F-4586-93FE-801671A5EAFD}.Debug|Any CPU.Build.0 = Debug|Any CPU {B7CF1C77-FE6F-4586-93FE-801671A5EAFD}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -272,34 +132,6 @@ Global {B6C398B2-6F74-4E50-A49F-F36B9825F45E}.Debug|Any CPU.Build.0 = Debug|Any CPU {B6C398B2-6F74-4E50-A49F-F36B9825F45E}.Release|Any CPU.ActiveCfg = Release|Any CPU {B6C398B2-6F74-4E50-A49F-F36B9825F45E}.Release|Any CPU.Build.0 = Release|Any CPU - {56E00DEF-F87C-4893-8902-2844DE1AEB8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {56E00DEF-F87C-4893-8902-2844DE1AEB8D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {56E00DEF-F87C-4893-8902-2844DE1AEB8D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {56E00DEF-F87C-4893-8902-2844DE1AEB8D}.Release|Any CPU.Build.0 = Release|Any CPU - {6138EFEB-3C50-4A35-BDFA-7270A5F621BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6138EFEB-3C50-4A35-BDFA-7270A5F621BD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6138EFEB-3C50-4A35-BDFA-7270A5F621BD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6138EFEB-3C50-4A35-BDFA-7270A5F621BD}.Release|Any CPU.Build.0 = Release|Any CPU - {01141225-BA2E-412F-89A3-97654C1A803E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {01141225-BA2E-412F-89A3-97654C1A803E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {01141225-BA2E-412F-89A3-97654C1A803E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {01141225-BA2E-412F-89A3-97654C1A803E}.Release|Any CPU.Build.0 = Release|Any CPU - {3A6BEE5E-FEE0-4759-84D3-B66C1F76416F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3A6BEE5E-FEE0-4759-84D3-B66C1F76416F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3A6BEE5E-FEE0-4759-84D3-B66C1F76416F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3A6BEE5E-FEE0-4759-84D3-B66C1F76416F}.Release|Any CPU.Build.0 = Release|Any CPU - {261B2F47-80E7-4E6E-A7AF-8418812DAF81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {261B2F47-80E7-4E6E-A7AF-8418812DAF81}.Debug|Any CPU.Build.0 = Debug|Any CPU - {261B2F47-80E7-4E6E-A7AF-8418812DAF81}.Release|Any CPU.ActiveCfg = Release|Any CPU - {261B2F47-80E7-4E6E-A7AF-8418812DAF81}.Release|Any CPU.Build.0 = Release|Any CPU - {131506C3-DCEE-455A-A204-CC10B2678563}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {131506C3-DCEE-455A-A204-CC10B2678563}.Debug|Any CPU.Build.0 = Debug|Any CPU - {131506C3-DCEE-455A-A204-CC10B2678563}.Release|Any CPU.ActiveCfg = Release|Any CPU - {131506C3-DCEE-455A-A204-CC10B2678563}.Release|Any CPU.Build.0 = Release|Any CPU - {90F2EBC9-15E1-4305-8485-244CA8EFF8E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {90F2EBC9-15E1-4305-8485-244CA8EFF8E1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {90F2EBC9-15E1-4305-8485-244CA8EFF8E1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {90F2EBC9-15E1-4305-8485-244CA8EFF8E1}.Release|Any CPU.Build.0 = Release|Any CPU {AC89B7CF-0FA5-49EE-97A8-AB39A5F211A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC89B7CF-0FA5-49EE-97A8-AB39A5F211A8}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC89B7CF-0FA5-49EE-97A8-AB39A5F211A8}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -308,14 +140,6 @@ Global {AEF35BD6-EA9A-4159-86F4-49AF7D17A9A8}.Debug|Any CPU.Build.0 = Debug|Any CPU {AEF35BD6-EA9A-4159-86F4-49AF7D17A9A8}.Release|Any CPU.ActiveCfg = Release|Any CPU {AEF35BD6-EA9A-4159-86F4-49AF7D17A9A8}.Release|Any CPU.Build.0 = Release|Any CPU - {134C4854-1A8E-4093-9526-32D308CDC7BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {134C4854-1A8E-4093-9526-32D308CDC7BC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {134C4854-1A8E-4093-9526-32D308CDC7BC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {134C4854-1A8E-4093-9526-32D308CDC7BC}.Release|Any CPU.Build.0 = Release|Any CPU - {6735CCE7-5142-490B-9A06-C7471604E93B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6735CCE7-5142-490B-9A06-C7471604E93B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6735CCE7-5142-490B-9A06-C7471604E93B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6735CCE7-5142-490B-9A06-C7471604E93B}.Release|Any CPU.Build.0 = Release|Any CPU {1D1A5ED5-A1A1-4082-ACAF-30079AF31AC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1D1A5ED5-A1A1-4082-ACAF-30079AF31AC6}.Debug|Any CPU.Build.0 = Debug|Any CPU {1D1A5ED5-A1A1-4082-ACAF-30079AF31AC6}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -332,45 +156,21 @@ Global {65AED6F0-D27E-4D6E-BA42-AD6EE1338082}.Debug|Any CPU.Build.0 = Debug|Any CPU {65AED6F0-D27E-4D6E-BA42-AD6EE1338082}.Release|Any CPU.ActiveCfg = Release|Any CPU {65AED6F0-D27E-4D6E-BA42-AD6EE1338082}.Release|Any CPU.Build.0 = Release|Any CPU - {F1438954-24F5-4D41-AFEA-46D9E1E74C72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F1438954-24F5-4D41-AFEA-46D9E1E74C72}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F1438954-24F5-4D41-AFEA-46D9E1E74C72}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F1438954-24F5-4D41-AFEA-46D9E1E74C72}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {B409837F-3D64-407E-88AE-C0F932F1A4DE} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {B9ADD076-3567-4795-910B-3A6993EF7D84} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {976AE133-2456-4278-8F1F-5BB677AAAB69} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {3172BC5E-8822-41D4-861F-7B6E12CC9AD6} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {BFAE9A46-1F63-4B33-B9AE-A027C7C14A0A} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {6DE3D942-6F09-4E61-8E80-FB88DBEC3A67} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {510139D7-D45D-43B6-B983-1CC9599979B5} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {5D768182-D3C7-439B-9BDB-47351BFD5FB0} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {38CBC941-94FD-4773-9ADF-8C043F4BD9DE} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {2CF00ED1-577C-4260-86E5-E9A1CE0E937C} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {99220D67-EF4A-4BC6-9682-198AE893F7F1} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {5204D205-19C8-41FE-838B-AB26C3B06452} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {50214B7F-0F36-4088-93C8-CF1AADAFEA7B} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {E534DED4-D584-46A6-8993-90F7C77F0416} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {A140DA49-14F0-4810-9425-D2D7226F4C3A} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {5D0114BF-142C-45CC-B5B6-C6F48C3B4E8C} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {4F9F4528-798E-4324-BF34-4C969599805E} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {FD06C296-2755-45D7-8D9D-F4DDCFCE1FEA} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {ADEAAE86-0827-4342-926E-26E9C381826B} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {FD4B3758-EF4B-4FC9-B87C-16A3256DB7A6} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {BDF95384-4DB4-491E-B042-5CF066E1F86B} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {CC524B92-FBCF-4379-85B4-608351BFC666} = {810145E0-41CF-4E24-BD9C-E7517498BA29} {64A22A3C-D0C4-4DE9-A8D5-2CEF766EB500} = {810145E0-41CF-4E24-BD9C-E7517498BA29} {B18937F6-B39F-46BB-BB3C-86C0693993EF} = {810145E0-41CF-4E24-BD9C-E7517498BA29} - {CDBD5665-D6CC-4C10-9872-A4886AC6275A} = {810145E0-41CF-4E24-BD9C-E7517498BA29} {D405655F-C8BE-4134-893C-ADB4918B0624} = {810145E0-41CF-4E24-BD9C-E7517498BA29} {7AD094AA-01D6-4644-B9B6-E555A029D6D7} = {810145E0-41CF-4E24-BD9C-E7517498BA29} {66D8DEA8-B477-497F-95BB-E8F9A5BAC352} = {810145E0-41CF-4E24-BD9C-E7517498BA29} {BDE6F761-880E-47C3-B40C-956F470E3D10} = {66D8DEA8-B477-497F-95BB-E8F9A5BAC352} + {F1438954-24F5-4D41-AFEA-46D9E1E74C72} = {66D8DEA8-B477-497F-95BB-E8F9A5BAC352} {6ABA1666-BC42-487F-B156-3DC79347BD6B} = {66D8DEA8-B477-497F-95BB-E8F9A5BAC352} + {0FBF046E-7B17-410C-8219-8381D07726DF} = {66D8DEA8-B477-497F-95BB-E8F9A5BAC352} {B7CF1C77-FE6F-4586-93FE-801671A5EAFD} = {66D8DEA8-B477-497F-95BB-E8F9A5BAC352} {98223494-E0A8-4C07-A38F-84CA2060031D} = {66D8DEA8-B477-497F-95BB-E8F9A5BAC352} {848EDB8F-9C45-462B-A544-EA237774F3BA} = {66D8DEA8-B477-497F-95BB-E8F9A5BAC352} @@ -378,22 +178,12 @@ Global {C2996131-C3CA-4D3D-8357-C533849792E1} = {66D8DEA8-B477-497F-95BB-E8F9A5BAC352} {8460A7F9-FED4-4495-A595-8C585FC7F606} = {66D8DEA8-B477-497F-95BB-E8F9A5BAC352} {B6C398B2-6F74-4E50-A49F-F36B9825F45E} = {8B62E3FB-9062-4716-803A-1FA51FCE68BC} - {56E00DEF-F87C-4893-8902-2844DE1AEB8D} = {8B62E3FB-9062-4716-803A-1FA51FCE68BC} - {6138EFEB-3C50-4A35-BDFA-7270A5F621BD} = {8B62E3FB-9062-4716-803A-1FA51FCE68BC} - {01141225-BA2E-412F-89A3-97654C1A803E} = {8B62E3FB-9062-4716-803A-1FA51FCE68BC} - {3A6BEE5E-FEE0-4759-84D3-B66C1F76416F} = {8B62E3FB-9062-4716-803A-1FA51FCE68BC} - {261B2F47-80E7-4E6E-A7AF-8418812DAF81} = {8B62E3FB-9062-4716-803A-1FA51FCE68BC} - {131506C3-DCEE-455A-A204-CC10B2678563} = {8B62E3FB-9062-4716-803A-1FA51FCE68BC} - {90F2EBC9-15E1-4305-8485-244CA8EFF8E1} = {8B62E3FB-9062-4716-803A-1FA51FCE68BC} {AC89B7CF-0FA5-49EE-97A8-AB39A5F211A8} = {8B62E3FB-9062-4716-803A-1FA51FCE68BC} {AEF35BD6-EA9A-4159-86F4-49AF7D17A9A8} = {8B62E3FB-9062-4716-803A-1FA51FCE68BC} - {134C4854-1A8E-4093-9526-32D308CDC7BC} = {8B62E3FB-9062-4716-803A-1FA51FCE68BC} - {6735CCE7-5142-490B-9A06-C7471604E93B} = {8B62E3FB-9062-4716-803A-1FA51FCE68BC} {1D1A5ED5-A1A1-4082-ACAF-30079AF31AC6} = {8B62E3FB-9062-4716-803A-1FA51FCE68BC} {968CD847-80D0-4740-92D5-F5553461EC04} = {8B62E3FB-9062-4716-803A-1FA51FCE68BC} {D787694D-B87B-4E11-9455-B5BF9306D8FC} = {8B62E3FB-9062-4716-803A-1FA51FCE68BC} {65AED6F0-D27E-4D6E-BA42-AD6EE1338082} = {8B62E3FB-9062-4716-803A-1FA51FCE68BC} - {F1438954-24F5-4D41-AFEA-46D9E1E74C72} = {66D8DEA8-B477-497F-95BB-E8F9A5BAC352} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {70FEC644-BB3C-4441-AF91-DC694803C8F2} diff --git a/builds/common.props b/builds/common.props index 8f5642b..2fd2867 100644 --- a/builds/common.props +++ b/builds/common.props @@ -1,11 +1,10 @@ + Azure Functions OpenAPI Extension © Microsoft Corporation. All rights reserved. https://github.com/Azure/azure-functions-openapi-extension https://github.com/Azure/azure-functions-openapi-extension - http://go.microsoft.com/fwlink/?LinkID=288890 - icon.png MIT true git @@ -14,8 +13,4 @@ Microsoft - - - - diff --git a/builds/webjobs.props b/builds/webjobs.props new file mode 100644 index 0000000..648d2c3 --- /dev/null +++ b/builds/webjobs.props @@ -0,0 +1,14 @@ + + + + + + http://go.microsoft.com/fwlink/?LinkID=288890 + icon.png + + + + + + + diff --git a/builds/worker.props b/builds/worker.props new file mode 100644 index 0000000..09446f5 --- /dev/null +++ b/builds/worker.props @@ -0,0 +1,14 @@ + + + + + + https://aka.ms/azure-functions-package-icon + icon.png + + + + + + + diff --git a/images/webjobs/icon.png b/images/webjobs/icon.png new file mode 100644 index 0000000..36963e9 Binary files /dev/null and b/images/webjobs/icon.png differ diff --git a/images/worker/icon.png b/images/worker/icon.png new file mode 100644 index 0000000..8f6048e Binary files /dev/null and b/images/worker/icon.png differ diff --git a/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5.csproj b/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5.csproj index 2571d1e..be5e429 100644 --- a/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5.csproj +++ b/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5.csproj @@ -10,20 +10,12 @@ - - - - + @@ -32,20 +24,11 @@ - - - - - - - - - - + diff --git a/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5/PetStoreHttpTrigger.cs b/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5/PetStoreHttpTrigger.cs index baef7ef..21dd742 100644 --- a/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5/PetStoreHttpTrigger.cs +++ b/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5/PetStoreHttpTrigger.cs @@ -6,7 +6,7 @@ using Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5.Sec using Microsoft.Azure.Functions.Worker.Http; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Enums; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore; using Microsoft.OpenApi.Models; namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.V3Net5 diff --git a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/ApiResponse.cs b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/ApiResponse.cs similarity index 97% rename from samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/ApiResponse.cs rename to samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/ApiResponse.cs index fe74cc0..e049318 100644 --- a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/ApiResponse.cs +++ b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/ApiResponse.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models +namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore { /// /// This represents the model entity for API response of Swagger Pet Store. diff --git a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Category.cs b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/Category.cs similarity index 70% rename from samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Category.cs rename to samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/Category.cs index df781bc..db86405 100644 --- a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Category.cs +++ b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/Category.cs @@ -1,12 +1,8 @@ -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.Examples; - -namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models +namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore { /// /// This represents the model entity for category of Swagger Pet Store. /// - [OpenApiExample(typeof(CategoryExample))] public class Category { /// diff --git a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore.csproj b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore.csproj new file mode 100644 index 0000000..82dcabd --- /dev/null +++ b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore.csproj @@ -0,0 +1,13 @@ + + + + netstandard2.0 + Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore + Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore + + + + + + + diff --git a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Order.cs b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/Order.cs similarity index 86% rename from samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Order.cs rename to samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/Order.cs index f9bdcee..e5a714f 100644 --- a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Order.cs +++ b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/Order.cs @@ -1,8 +1,6 @@ using System; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; - -namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models +namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore { /// /// This represents the model entity for order of Swagger Pet Store. @@ -32,13 +30,11 @@ namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models /// /// Gets or sets the value. /// - [OpenApiProperty(Description = "Order Status")] public OrderStatus? Status { get; set; } /// /// Gets or sets the value indicating whether the order is complete or not. /// - [OpenApiProperty(Default = false)] public bool? Complete { get; set; } } } diff --git a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/OrderStatus.cs b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/OrderStatus.cs similarity index 77% rename from samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/OrderStatus.cs rename to samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/OrderStatus.cs index 7e5f9aa..60cd456 100644 --- a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/OrderStatus.cs +++ b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/OrderStatus.cs @@ -1,9 +1,9 @@ -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; +using System.Runtime.Serialization; using Newtonsoft.Json; using Newtonsoft.Json.Converters; -namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models +namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore { /// /// This specifies the order status. @@ -14,19 +14,19 @@ namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models /// /// Identifies as "placed". /// - [Display("placed")] + [EnumMember(Value = "placed")] Placed = 1, /// /// Identifies as "approved". /// - [Display("approved")] + [EnumMember(Value = "approved")] Approved = 2, /// /// Identifies as "delivered". /// - [Display("delivered")] + [EnumMember(Value = "delivered")] Delivered = 3 } } diff --git a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Pet.cs b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/Pet.cs similarity index 88% rename from samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Pet.cs rename to samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/Pet.cs index 4edb7f9..8f2ce2e 100644 --- a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Pet.cs +++ b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/Pet.cs @@ -1,10 +1,8 @@ using System.Collections.Generic; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; - using Newtonsoft.Json; -namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models +namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore { /// /// This represents the model entity for pet of Swagger Pet Store. @@ -41,7 +39,6 @@ namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models /// /// Gets or sets the value. /// - [OpenApiProperty(Description = "pet status in the store")] public PetStatus? Status { get; set; } } } diff --git a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/PetStatus.cs b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/PetStatus.cs similarity index 77% rename from samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/PetStatus.cs rename to samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/PetStatus.cs index 5499e93..a2fa537 100644 --- a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/PetStatus.cs +++ b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/PetStatus.cs @@ -1,9 +1,9 @@ -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; +using System.Runtime.Serialization; using Newtonsoft.Json; using Newtonsoft.Json.Converters; -namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models +namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore { /// /// This specifices the pet status. @@ -14,19 +14,19 @@ namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models /// /// Identifies as "available". /// - [Display("available")] + [EnumMember(Value = "available")] Available = 1, /// /// Identifies as "pending". /// - [Display("pending")] + [EnumMember(Value = "pending")] Pending = 2, /// /// Identifies as "sold". /// - [Display("sold")] + [EnumMember(Value = "sold")] Sold = 3 } } diff --git a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Tag.cs b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/Tag.cs similarity index 96% rename from samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Tag.cs rename to samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/Tag.cs index b9589dd..5834eef 100644 --- a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Tag.cs +++ b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/Tag.cs @@ -1,4 +1,4 @@ -namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models +namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore { /// /// This represents the model entity for tag of Swagger Pet Store. diff --git a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/User.cs b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/User.cs similarity index 90% rename from samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/User.cs rename to samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/User.cs index 59eb013..539a8a3 100644 --- a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/User.cs +++ b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore/User.cs @@ -1,6 +1,4 @@ -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; - -namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models +namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore { /// /// This represents the model entity for user of Swagger Pet Store. @@ -45,7 +43,6 @@ namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models /// /// Gets or sets the user status value. /// - [OpenApiProperty(Description = "User Status")] public int? UserStatus { get; set; } } } diff --git a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Examples/CategoryExample.cs b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Examples/CategoryExample.cs index 2b0f9f7..0bd26c1 100644 --- a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Examples/CategoryExample.cs +++ b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Examples/CategoryExample.cs @@ -1,5 +1,6 @@ using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Abstractions; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Resolvers; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore; using Newtonsoft.Json.Serialization; diff --git a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.csproj b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.csproj index 17a84b4..9deceae 100644 --- a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.csproj +++ b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.csproj @@ -14,6 +14,7 @@ + diff --git a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V1Proxy/PetStoreHttpTrigger.cs b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V1Proxy/PetStoreHttpTrigger.cs index 348c091..438db3b 100644 --- a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V1Proxy/PetStoreHttpTrigger.cs +++ b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V1Proxy/PetStoreHttpTrigger.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Enums; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore; using Microsoft.Extensions.Logging; using Microsoft.OpenApi.Models; diff --git a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2IoC/PetStoreHttpTrigger.cs b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2IoC/PetStoreHttpTrigger.cs index 18a109e..61cd57b 100644 --- a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2IoC/PetStoreHttpTrigger.cs +++ b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2IoC/PetStoreHttpTrigger.cs @@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Enums; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore; using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Services; using Microsoft.Extensions.Logging; using Microsoft.OpenApi.Models; diff --git a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2Static/PetStoreHttpTrigger.cs b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2Static/PetStoreHttpTrigger.cs index 6132a64..813be4a 100644 --- a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2Static/PetStoreHttpTrigger.cs +++ b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2Static/PetStoreHttpTrigger.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Enums; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore; using Microsoft.Extensions.Logging; using Microsoft.OpenApi.Models; diff --git a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3IoC/PetStoreHttpTrigger.cs b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3IoC/PetStoreHttpTrigger.cs index fe08fd5..a6f7f0d 100644 --- a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3IoC/PetStoreHttpTrigger.cs +++ b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3IoC/PetStoreHttpTrigger.cs @@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Enums; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore; using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Services; using Microsoft.Extensions.Logging; using Microsoft.OpenApi.Models; diff --git a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static/PetStoreHttpTrigger.cs b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static/PetStoreHttpTrigger.cs index a4a2c54..3b30ccb 100644 --- a/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static/PetStoreHttpTrigger.cs +++ b/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static/PetStoreHttpTrigger.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Enums; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.Models.PetStore; using Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static.SecurityFlows; using Microsoft.Extensions.Logging; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.csproj deleted file mode 100644 index e487ab0..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.csproj +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - netstandard2.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions - This package extends Microsoft.Azure.WebJobs.Extensions.OpenApi.Core through the out-of-process worker. - This package extends Microsoft.Azure.WebJobs.Extensions.OpenApi.Core through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions - - - - bin\Debug\netstandard2.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.xml - - - - bin\Release\netstandard2.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.xml - - - - - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions/SwaggerUIExtensions.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions/SwaggerUIExtensions.cs deleted file mode 100644 index 3fafada..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions/SwaggerUIExtensions.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Abstractions; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Enums; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions -{ - /// - /// This represents the extension entity for . - /// - public static class SwaggerUIExtensions - { - /// - /// Renders the OpenAPI UI in HTML. - /// - /// instance. - /// The endpoint of the Swagger document. - /// The authorisation level of the Swagger document. - /// API key of the HTTP endpoint to render OpenAPI document. - /// The OpenAPI UI in HTML. - public static async Task RenderAsync(this Task ui, string endpoint, OpenApiAuthLevelType authLevel = OpenApiAuthLevelType.Anonymous, string authKey = null) - { - var instance = await ui.ThrowIfNullOrDefault().ConfigureAwait(false); - endpoint.ThrowIfNullOrWhiteSpace(); - - return await instance.RenderAsync(endpoint, authLevel, authKey).ConfigureAwait(false); - } - - /// - /// Renders the OAuth2 Redirect page in HTML. - /// - /// instance. - /// The endpoint of the OAuth2 Redirect page. - /// The authorisation level of the Swagger document. - /// API key of the HTTP endpoint to render OpenAPI document. - /// The OAuth2 Redirect page in HTML. - public static async Task RenderOAuth2RedirectAsync(this Task ui, string endpoint, OpenApiAuthLevelType authLevel = OpenApiAuthLevelType.Anonymous, string authKey = null) - { - var instance = await ui.ThrowIfNullOrDefault().ConfigureAwait(false); - endpoint.ThrowIfNullOrWhiteSpace(); - - return await instance.RenderOAuth2RedirectAsync(endpoint, authLevel, authKey).ConfigureAwait(false); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin.csproj deleted file mode 100644 index 0af2bf3..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin - This package helps render the oauth2-redirect page endpoint through the out-of-process worker. - This package helps render the oauth2-redirect page endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin/OpenApiTriggerRenderOAuth2RedirectFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin/OpenApiTriggerRenderOAuth2RedirectFunctionProvider.cs deleted file mode 100644 index e1caa4b..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Admin/OpenApiTriggerRenderOAuth2RedirectFunctionProvider.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the oauth2-redirect.html page with the access level. - /// - public class OpenApiTriggerRenderOAuth2RedirectFunctionProvider : IOpenApiTriggerRenderOAuth2RedirectFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderOAuth2RedirectFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderOAuth2RedirectFunctionProvider.RenderOAuth2Redirect))] - public async Task RenderOAuth2Redirect( - [HttpTrigger(AuthorizationLevel.Admin, "GET", Route = "oauth2-redirect.html")] HttpRequestData req, - FunctionContext ctx) - { - return await this._function.RenderOAuth2Redirect(req, ctx).ConfigureAwait(false); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous.csproj deleted file mode 100644 index 587830b..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous - This package helps render the oauth2-redirect page endpoint through the out-of-process worker. - This package helps render the oauth2-redirect page endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous/OpenApiTriggerRenderOAuth2RedirectFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous/OpenApiTriggerRenderOAuth2RedirectFunctionProvider.cs deleted file mode 100644 index 8e70a56..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Anonymous/OpenApiTriggerRenderOAuth2RedirectFunctionProvider.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the oauth2-redirect.html page with the access level. - /// - public class OpenApiTriggerRenderOAuth2RedirectFunctionProvider : IOpenApiTriggerRenderOAuth2RedirectFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderOAuth2RedirectFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderOAuth2RedirectFunctionProvider.RenderOAuth2Redirect))] - public async Task RenderOAuth2Redirect( - [HttpTrigger(AuthorizationLevel.Anonymous, "GET", Route = "oauth2-redirect.html")] HttpRequestData req, - FunctionContext ctx) - { - return await this._function.RenderOAuth2Redirect(req, ctx).ConfigureAwait(false); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function.csproj deleted file mode 100644 index e7df315..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function - This package helps render the oauth2-redirect page endpoint through the out-of-process worker. - This package helps render the oauth2-redirect page endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function/OpenApiTriggerRenderOAuth2RedirectFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function/OpenApiTriggerRenderOAuth2RedirectFunctionProvider.cs deleted file mode 100644 index 77d6d1a..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.Function/OpenApiTriggerRenderOAuth2RedirectFunctionProvider.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the oauth2-redirect.html page with the access level. - /// - public class OpenApiTriggerRenderOAuth2RedirectFunctionProvider : IOpenApiTriggerRenderOAuth2RedirectFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderOAuth2RedirectFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderOAuth2RedirectFunctionProvider.RenderOAuth2Redirect))] - public async Task RenderOAuth2Redirect( - [HttpTrigger(AuthorizationLevel.Function, "GET", Route = "oauth2-redirect.html")] HttpRequestData req, - FunctionContext ctx) - { - return await this._function.RenderOAuth2Redirect(req, ctx).ConfigureAwait(false); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System.csproj deleted file mode 100644 index b0202a6..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System - This package helps render the oauth2-redirect page endpoint through the out-of-process worker. - This package helps render the oauth2-redirect page endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System/OpenApiTriggerRenderOAuth2RedirectFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System/OpenApiTriggerRenderOAuth2RedirectFunctionProvider.cs deleted file mode 100644 index 132d6b9..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.System/OpenApiTriggerRenderOAuth2RedirectFunctionProvider.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the oauth2-redirect.html page with the access level. - /// - public class OpenApiTriggerRenderOAuth2RedirectFunctionProvider : IOpenApiTriggerRenderOAuth2RedirectFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderOAuth2RedirectFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderOAuth2RedirectFunctionProvider.RenderOAuth2Redirect))] - public async Task RenderOAuth2Redirect( - [HttpTrigger(AuthorizationLevel.System, "GET", Route = "oauth2-redirect.html")] HttpRequestData req, - FunctionContext ctx) - { - return await this._function.RenderOAuth2Redirect(req, ctx).ConfigureAwait(false); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User.csproj deleted file mode 100644 index 0f8cdb5..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User - This package helps render the oauth2-redirect page endpoint through the out-of-process worker. - This package helps render the oauth2-redirect page endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User/OpenApiTriggerRenderOAuth2RedirectFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User/OpenApiTriggerRenderOAuth2RedirectFunctionProvider.cs deleted file mode 100644 index 39e8612..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OAuth2Redirect.User/OpenApiTriggerRenderOAuth2RedirectFunctionProvider.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the oauth2-redirect.html page with the access level. - /// - public class OpenApiTriggerRenderOAuth2RedirectFunctionProvider : IOpenApiTriggerRenderOAuth2RedirectFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderOAuth2RedirectFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderOAuth2RedirectFunctionProvider.RenderOAuth2Redirect))] - public async Task RenderOAuth2Redirect( - [HttpTrigger(AuthorizationLevel.User, "GET", Route = "oauth2-redirect.html")] HttpRequestData req, - FunctionContext ctx) - { - return await this._function.RenderOAuth2Redirect(req, ctx).ConfigureAwait(false); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin.csproj deleted file mode 100644 index e4e5854..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin - This package helps render the OpenAPI document endpoint through the out-of-process worker. - This package helps render the OpenAPI document endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin/OpenApiTriggerRenderOpenApiDocumentFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin/OpenApiTriggerRenderOpenApiDocumentFunctionProvider.cs deleted file mode 100644 index d8dfc45..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Admin/OpenApiTriggerRenderOpenApiDocumentFunctionProvider.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the OpenAPI document with the access level. - /// - public class OpenApiTriggerRenderOpenApiDocumentFunctionProvider : IOpenApiTriggerRenderOpenApiDocumentFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderOpenApiDocumentFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderOpenApiDocumentFunctionProvider.RenderOpenApiDocument))] - public async Task RenderOpenApiDocument( - [HttpTrigger(AuthorizationLevel.Admin, "GET", Route = "openapi/{version}.{extension}")] HttpRequestData req, - string version, - string extension, - FunctionContext ctx) - { - return await this._function.RenderOpenApiDocument(req, version, extension, ctx).ConfigureAwait(false); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous.csproj deleted file mode 100644 index f33e32c..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous - This package helps render the OpenAPI document endpoint through the out-of-process worker. - This package helps render the OpenAPI document endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous/OpenApiTriggerRenderOpenApiDocumentFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous/OpenApiTriggerRenderOpenApiDocumentFunctionProvider.cs deleted file mode 100644 index e66043c..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Anonymous/OpenApiTriggerRenderOpenApiDocumentFunctionProvider.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the OpenAPI document with the access level. - /// - public class OpenApiTriggerRenderOpenApiDocumentFunctionProvider : IOpenApiTriggerRenderOpenApiDocumentFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderOpenApiDocumentFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderOpenApiDocumentFunctionProvider.RenderOpenApiDocument))] - public async Task RenderOpenApiDocument( - [HttpTrigger(AuthorizationLevel.Anonymous, "GET", Route = "openapi/{version}.{extension}")] HttpRequestData req, - string version, - string extension, - FunctionContext ctx) - { - return await this._function.RenderOpenApiDocument(req, version, extension, ctx).ConfigureAwait(false); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function.csproj deleted file mode 100644 index 4fc1215..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function - This package helps render the OpenAPI document endpoint through the out-of-process worker. - This package helps render the OpenAPI document endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function/OpenApiTriggerRenderOpenApiDocumentFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function/OpenApiTriggerRenderOpenApiDocumentFunctionProvider.cs deleted file mode 100644 index 8c1bac4..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.Function/OpenApiTriggerRenderOpenApiDocumentFunctionProvider.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the OpenAPI document with the access level. - /// - public class OpenApiTriggerRenderOpenApiDocumentFunctionProvider : IOpenApiTriggerRenderOpenApiDocumentFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderOpenApiDocumentFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderOpenApiDocumentFunctionProvider.RenderOpenApiDocument))] - public async Task RenderOpenApiDocument( - [HttpTrigger(AuthorizationLevel.Function, "GET", Route = "openapi/{version}.{extension}")] HttpRequestData req, - string version, - string extension, - FunctionContext ctx) - { - return await this._function.RenderOpenApiDocument(req, version, extension, ctx).ConfigureAwait(false); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System.csproj deleted file mode 100644 index d921174..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System - This package helps render the OpenAPI document endpoint through the out-of-process worker. - This package helps render the OpenAPI document endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System/OpenApiTriggerRenderOpenApiDocumentFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System/OpenApiTriggerRenderOpenApiDocumentFunctionProvider.cs deleted file mode 100644 index 0469473..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.System/OpenApiTriggerRenderOpenApiDocumentFunctionProvider.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the OpenAPI document with the access level. - /// - public class OpenApiTriggerRenderOpenApiDocumentFunctionProvider : IOpenApiTriggerRenderOpenApiDocumentFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderOpenApiDocumentFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderOpenApiDocumentFunctionProvider.RenderOpenApiDocument))] - public async Task RenderOpenApiDocument( - [HttpTrigger(AuthorizationLevel.System, "GET", Route = "openapi/{version}.{extension}")] HttpRequestData req, - string version, - string extension, - FunctionContext ctx) - { - return await this._function.RenderOpenApiDocument(req, version, extension, ctx).ConfigureAwait(false); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User.csproj deleted file mode 100644 index eba162c..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User - This package helps render the OpenAPI document endpoint through the out-of-process worker. - This package helps render the OpenAPI document endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User/OpenApiTriggerRenderOpenApiDocumentFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User/OpenApiTriggerRenderOpenApiDocumentFunctionProvider.cs deleted file mode 100644 index be04152..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.OpenApiDocument.User/OpenApiTriggerRenderOpenApiDocumentFunctionProvider.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the OpenAPI document with the access level. - /// - public class OpenApiTriggerRenderOpenApiDocumentFunctionProvider : IOpenApiTriggerRenderOpenApiDocumentFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderOpenApiDocumentFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderOpenApiDocumentFunctionProvider.RenderOpenApiDocument))] - public async Task RenderOpenApiDocument( - [HttpTrigger(AuthorizationLevel.User, "GET", Route = "openapi/{version}.{extension}")] HttpRequestData req, - string version, - string extension, - FunctionContext ctx) - { - return await this._function.RenderOpenApiDocument(req, version, extension, ctx).ConfigureAwait(false); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin.csproj deleted file mode 100644 index 3d40da0..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin - This package helps render the Swagger document endpoint through the out-of-process worker. - This package helps render the Swagger document endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin/OpenApiTriggerRenderSwaggerDocumentFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin/OpenApiTriggerRenderSwaggerDocumentFunctionProvider.cs deleted file mode 100644 index 81c6da7..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Admin/OpenApiTriggerRenderSwaggerDocumentFunctionProvider.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the Swagger document with the access level. - /// - public class OpenApiTriggerRenderSwaggerDocumentFunctionProvider : IOpenApiTriggerRenderSwaggerDocumentFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderSwaggerDocumentFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderSwaggerDocumentFunctionProvider.RenderSwaggerDocument))] - public async Task RenderSwaggerDocument( - [HttpTrigger(AuthorizationLevel.Admin, "GET", Route = "swagger.{extension}")] HttpRequestData req, - string extension, - FunctionContext ctx) - { - return await this._function.RenderSwaggerDocument(req, extension, ctx).ConfigureAwait(false); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous.csproj deleted file mode 100644 index 4b6c0e4..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous - This package helps render the Swagger document endpoint through the out-of-process worker. - This package helps render the Swagger document endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous/OpenApiTriggerRenderSwaggerDocumentFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous/OpenApiTriggerRenderSwaggerDocumentFunctionProvider.cs deleted file mode 100644 index d8b0559..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Anonymous/OpenApiTriggerRenderSwaggerDocumentFunctionProvider.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the Swagger document with the access level. - /// - public class OpenApiTriggerRenderSwaggerDocumentFunctionProvider : IOpenApiTriggerRenderSwaggerDocumentFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderSwaggerDocumentFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderSwaggerDocumentFunctionProvider.RenderSwaggerDocument))] - public async Task RenderSwaggerDocument( - [HttpTrigger(AuthorizationLevel.Anonymous, "GET", Route = "swagger.{extension}")] HttpRequestData req, - string extension, - FunctionContext ctx) - { - return await this._function.RenderSwaggerDocument(req, extension, ctx).ConfigureAwait(false); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function.csproj deleted file mode 100644 index 72d7a88..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function - This package helps render the Swagger document endpoint through the out-of-process worker. - This package helps render the Swagger document endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function/OpenApiTriggerRenderSwaggerDocumentFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function/OpenApiTriggerRenderSwaggerDocumentFunctionProvider.cs deleted file mode 100644 index ed75d28..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.Function/OpenApiTriggerRenderSwaggerDocumentFunctionProvider.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the Swagger document with the access level. - /// - public class OpenApiTriggerRenderSwaggerDocumentFunctionProvider : IOpenApiTriggerRenderSwaggerDocumentFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderSwaggerDocumentFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderSwaggerDocumentFunctionProvider.RenderSwaggerDocument))] - public async Task RenderSwaggerDocument( - [HttpTrigger(AuthorizationLevel.Function, "GET", Route = "swagger.{extension}")] HttpRequestData req, - string extension, - FunctionContext ctx) - { - return await this._function.RenderSwaggerDocument(req, extension, ctx).ConfigureAwait(false); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System.csproj deleted file mode 100644 index 379a9d2..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System - This package helps render the Swagger document endpoint through the out-of-process worker. - This package helps render the Swagger document endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System/OpenApiTriggerRenderSwaggerDocumentFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System/OpenApiTriggerRenderSwaggerDocumentFunctionProvider.cs deleted file mode 100644 index c3f7563..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.System/OpenApiTriggerRenderSwaggerDocumentFunctionProvider.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the Swagger document with the access level. - /// - public class OpenApiTriggerRenderSwaggerDocumentFunctionProvider : IOpenApiTriggerRenderSwaggerDocumentFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderSwaggerDocumentFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderSwaggerDocumentFunctionProvider.RenderSwaggerDocument))] - public async Task RenderSwaggerDocument( - [HttpTrigger(AuthorizationLevel.System, "GET", Route = "swagger.{extension}")] HttpRequestData req, - string extension, - FunctionContext ctx) - { - return await this._function.RenderSwaggerDocument(req, extension, ctx).ConfigureAwait(false); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User.csproj deleted file mode 100644 index 5160723..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User - This package helps render the Swagger document endpoint through the out-of-process worker. - This package helps render the Swagger document endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User/OpenApiTriggerRenderSwaggerDocumentFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User/OpenApiTriggerRenderSwaggerDocumentFunctionProvider.cs deleted file mode 100644 index d054787..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerDocument.User/OpenApiTriggerRenderSwaggerDocumentFunctionProvider.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the Swagger document with the access level. - /// - public class OpenApiTriggerRenderSwaggerDocumentFunctionProvider : IOpenApiTriggerRenderSwaggerDocumentFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderSwaggerDocumentFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderSwaggerDocumentFunctionProvider.RenderSwaggerDocument))] - public async Task RenderSwaggerDocument( - [HttpTrigger(AuthorizationLevel.User, "GET", Route = "swagger.{extension}")] HttpRequestData req, - string extension, - FunctionContext ctx) - { - return await this._function.RenderSwaggerDocument(req, extension, ctx).ConfigureAwait(false); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin.csproj deleted file mode 100644 index 19bc344..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin - This package helps render the Swagger UI page endpoint through the out-of-process worker. - This package helps render the Swagger UI page endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin/OpenApiTriggerRenderSwaggerUIFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin/OpenApiTriggerRenderSwaggerUIFunctionProvider.cs deleted file mode 100644 index 5b31cdf..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Admin/OpenApiTriggerRenderSwaggerUIFunctionProvider.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the Swagger UI page with the access level. - /// - public class OpenApiTriggerRenderSwaggerUIFunctionProvider : IOpenApiTriggerRenderSwaggerUIFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderSwaggerUIFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderSwaggerUIFunctionProvider.RenderSwaggerUI))] - public async Task RenderSwaggerUI( - [HttpTrigger(AuthorizationLevel.Admin, "GET", Route = "swagger/ui")] HttpRequestData req, - FunctionContext ctx) - { - return await this._function.RenderSwaggerUI(req, ctx); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous.csproj deleted file mode 100644 index 2fa1b1b..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous - This package helps render the Swagger UI page endpoint through the out-of-process worker. - This package helps render the Swagger UI page endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous/OpenApiTriggerRenderSwaggerUIFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous/OpenApiTriggerRenderSwaggerUIFunctionProvider.cs deleted file mode 100644 index 7666ca7..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Anonymous/OpenApiTriggerRenderSwaggerUIFunctionProvider.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the Swagger UI page with the access level. - /// - public class OpenApiTriggerRenderSwaggerUIFunctionProvider : IOpenApiTriggerRenderSwaggerUIFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderSwaggerUIFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderSwaggerUIFunctionProvider.RenderSwaggerUI))] - public async Task RenderSwaggerUI( - [HttpTrigger(AuthorizationLevel.Anonymous, "GET", Route = "swagger/ui")] HttpRequestData req, - FunctionContext ctx) - { - return await this._function.RenderSwaggerUI(req, ctx); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function.csproj deleted file mode 100644 index d377af5..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function - This package helps render the Swagger UI page endpoint through the out-of-process worker. - This package helps render the Swagger UI page endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function/OpenApiTriggerRenderSwaggerUIFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function/OpenApiTriggerRenderSwaggerUIFunctionProvider.cs deleted file mode 100644 index 750ff4c..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.Function/OpenApiTriggerRenderSwaggerUIFunctionProvider.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the Swagger UI page with the access level. - /// - public class OpenApiTriggerRenderSwaggerUIFunctionProvider : IOpenApiTriggerRenderSwaggerUIFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderSwaggerUIFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderSwaggerUIFunctionProvider.RenderSwaggerUI))] - public async Task RenderSwaggerUI( - [HttpTrigger(AuthorizationLevel.Function, "GET", Route = "swagger/ui")] HttpRequestData req, - FunctionContext ctx) - { - return await this._function.RenderSwaggerUI(req, ctx); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System.csproj deleted file mode 100644 index bc4c6a3..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System - This package helps render the Swagger UI page endpoint through the out-of-process worker. - This package helps render the Swagger UI page endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System/OpenApiTriggerRenderSwaggerUIFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System/OpenApiTriggerRenderSwaggerUIFunctionProvider.cs deleted file mode 100644 index 1807b04..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.System/OpenApiTriggerRenderSwaggerUIFunctionProvider.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the Swagger UI page with the access level. - /// - public class OpenApiTriggerRenderSwaggerUIFunctionProvider : IOpenApiTriggerRenderSwaggerUIFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderSwaggerUIFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderSwaggerUIFunctionProvider.RenderSwaggerUI))] - public async Task RenderSwaggerUI( - [HttpTrigger(AuthorizationLevel.System, "GET", Route = "swagger/ui")] HttpRequestData req, - FunctionContext ctx) - { - return await this._function.RenderSwaggerUI(req, ctx); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User.csproj deleted file mode 100644 index eb2b587..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - net5.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User - This package helps render the Swagger UI page endpoint through the out-of-process worker. - This package helps render the Swagger UI page endpoint through the out-of-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User - Microsoft.Azure.Functions.Worker.Extensions.OpenApi - - - - bin\Debug\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User.xml - - - - bin\Release\net5.0\Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User.xml - - - - - - - diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User/OpenApiTriggerRenderSwaggerUIFunctionProvider.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User/OpenApiTriggerRenderSwaggerUIFunctionProvider.cs deleted file mode 100644 index baeb024..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.SwaggerUI.User/OpenApiTriggerRenderSwaggerUIFunctionProvider.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Threading.Tasks; - -using Microsoft.Azure.Functions.Worker.Http; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders -{ - /// - /// This represents the function provider entity for OpenAPI HTTP trigger that renders the Swagger UI page with the access level. - /// - public class OpenApiTriggerRenderSwaggerUIFunctionProvider : IOpenApiTriggerRenderSwaggerUIFunctionProvider - { - private readonly IOpenApiTriggerFunction _function; - - /// - /// Initializes a new instance of the class. - /// - /// instance. - public OpenApiTriggerRenderSwaggerUIFunctionProvider(IOpenApiTriggerFunction function) - { - this._function = function.ThrowIfNullOrDefault(); - } - - /// - [OpenApiIgnore] - [Function(nameof(OpenApiTriggerRenderSwaggerUIFunctionProvider.RenderSwaggerUI))] - public async Task RenderSwaggerUI( - [HttpTrigger(AuthorizationLevel.User, "GET", Route = "swagger/ui")] HttpRequestData req, - FunctionContext ctx) - { - return await this._function.RenderSwaggerUI(req, ctx); - } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Configurations/OpenApiAuthLevelSettings.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Configurations/OpenApiAuthLevelSettings.cs deleted file mode 100644 index abc0658..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Configurations/OpenApiAuthLevelSettings.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi -{ - /// - /// This represents the environment variable settings entity for OpenAPI document auth level. - /// - public class OpenApiAuthLevelSettings - { - /// - /// Gets or sets the value for OpenAPI document rendering endpoints. - /// - public virtual AuthorizationLevel? Document { get; set; } - - /// - /// Gets or sets the value for Swagger UI page rendering endpoints. - /// - public virtual AuthorizationLevel? UI { get; set; } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Configurations/OpenApiSettings.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Configurations/OpenApiSettings.cs deleted file mode 100644 index b6f9779..0000000 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Configurations/OpenApiSettings.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi -{ - /// - /// This represents the environment variable settings entity for OpenAPI document. - /// - public class OpenApiSettings - { - /// - /// Gets or sets the value indicating whether to hide the Swagger UI page or not. - /// - public virtual bool HideSwaggerUI { get; set; } - - /// - /// Gets or sets the API key to access to OpenAPI document. - /// - public virtual string ApiKey { get; set; } - - /// - /// Gets or sets the object. - /// - public virtual OpenApiAuthLevelSettings AuthLevel { get; set; } - - /// - /// Gets or sets the backend URL for Azure Functions Proxy. - /// - public virtual string BackendProxyUrl { get; set; } - - /// - /// Gets or sets the comma delimited host names. - /// - public virtual string HostNames { get; set; } - } -} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/DefaultOpenApiHttpTrigger.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/DefaultOpenApiHttpTrigger.cs new file mode 100644 index 0000000..e034eae --- /dev/null +++ b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/DefaultOpenApiHttpTrigger.cs @@ -0,0 +1,122 @@ +using System.Threading.Tasks; + +using Microsoft.Azure.Functions.Worker.Http; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; + +namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi +{ + /// + /// This represents HTTP trigger entity to render OpenAPI endpoints with anonymous access. + /// + public class DefaultOpenApiHttpTrigger + { + /// + /// Defines the text/plain content type. + /// + protected const string ContentTypeText = "text/plain"; + + /// + /// Defines the text/html content type. + /// + protected const string ContentTypeHtml = "text/html"; + + /// + /// Defines the application/json content type. + /// + protected const string ContentTypeJson = "application/json"; + + /// + /// Defines the text/vnd.yaml content type. + /// + protected const string ContentTypeYaml = "text/vnd.yaml"; + + /// + /// Initializes a new instance of the class. + /// + /// instance. + public DefaultOpenApiHttpTrigger(IOpenApiTriggerFunction function) + { + this.Function = function.ThrowIfNullOrDefault(); + } + + /// + /// Gets the instance. + /// + protected IOpenApiTriggerFunction Function { get; } + + /// + /// Invokes the HTTP trigger endpoint to get OpenAPI document. + /// + /// instance. + /// File extension representing the document format. This MUST be either "json" or "yaml". + /// instance. + /// OpenAPI document in a format of either JSON or YAML. + [Function(nameof(DefaultOpenApiHttpTrigger.RenderSwaggerDocument))] + [OpenApiIgnore] + public virtual async Task RenderSwaggerDocument( + [HttpTrigger(AuthorizationLevel.Anonymous, "GET", Route = "swagger.{extension}")] HttpRequestData req, + string extension, + FunctionContext ctx) + { + var response = await this.Function.RenderSwaggerDocument(req, extension, ctx).ConfigureAwait(false); + + return response; + } + + /// + /// Invokes the HTTP trigger endpoint to get OpenAPI document. + /// + /// instance. + /// OpenAPI document spec version. This MUST be either "v2" or "v3". + /// File extension representing the document format. This MUST be either "json" or "yaml". + /// instance. + /// OpenAPI document in a format of either JSON or YAML. + [Function(nameof(DefaultOpenApiHttpTrigger.RenderOpenApiDocument))] + [OpenApiIgnore] + public virtual async Task RenderOpenApiDocument( + [HttpTrigger(AuthorizationLevel.Anonymous, "GET", Route = "openapi/{version}.{extension}")] HttpRequestData req, + string version, + string extension, + FunctionContext ctx) + { + var response = await this.Function.RenderOpenApiDocument(req, version, extension, ctx).ConfigureAwait(false); + + return response; + } + + /// + /// Invokes the HTTP trigger endpoint to render Swagger UI in HTML. + /// + /// instance. + /// instance. + /// Swagger UI in HTML. + [Function(nameof(DefaultOpenApiHttpTrigger.RenderSwaggerUI))] + [OpenApiIgnore] + public virtual async Task RenderSwaggerUI( + [HttpTrigger(AuthorizationLevel.Anonymous, "GET", Route = "swagger/ui")] HttpRequestData req, + FunctionContext ctx) + { + var response = await this.Function.RenderSwaggerUI(req, ctx).ConfigureAwait(false); + + return response; + } + + /// + /// Invokes the HTTP trigger endpoint to render oauth2-redirect.html. + /// + /// instance. + /// instance. + /// oauth2-redirect.html. + [Function(nameof(DefaultOpenApiHttpTrigger.RenderOAuth2Redirect))] + [OpenApiIgnore] + public virtual async Task RenderOAuth2Redirect( + [HttpTrigger(AuthorizationLevel.Anonymous, "GET", Route = "oauth2-redirect.html")] HttpRequestData req, + FunctionContext ctx) + { + var response = await this.Function.RenderOAuth2Redirect(req, ctx).ConfigureAwait(false); + + return response; + } + } +} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Document.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Document.cs index 8a10c82..a526e63 100644 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Document.cs +++ b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Document.cs @@ -4,16 +4,19 @@ using System.Linq; using System.Reflection; using System.Threading.Tasks; -using Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions; +using Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Extensions; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Abstractions; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Enums; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Visitors; using Microsoft.OpenApi; using Microsoft.OpenApi.Models; using Newtonsoft.Json.Serialization; +using GenericExtensions = Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.GenericExtensions; +using OpenApiDocumentExtensions = Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.OpenApiDocumentExtensions; +using StringExtensions = Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.StringExtensions; + namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi { /// @@ -31,7 +34,7 @@ namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi /// public Document(IDocumentHelper helper) { - this._helper = helper.ThrowIfNullOrDefault(); + this._helper = GenericExtensions.ThrowIfNullOrDefault(helper); } /// @@ -71,7 +74,7 @@ namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi var server = new OpenApiServer { Url = baseUrl }; - if (options.IsNullOrDefault()) + if (GenericExtensions.IsNullOrDefault(options)) { this.OpenApiDocument.Servers = new List() { server }; @@ -101,7 +104,7 @@ namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi /// public IDocument AddNamingStrategy(NamingStrategy strategy) { - this._strategy = strategy.ThrowIfNullOrDefault(); + this._strategy = GenericExtensions.ThrowIfNullOrDefault(strategy); return this; } @@ -109,7 +112,7 @@ namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi /// public IDocument AddVisitors(VisitorCollection collection) { - this._collection = collection.ThrowIfNullOrDefault(); + this._collection = GenericExtensions.ThrowIfNullOrDefault(collection); return this; } @@ -125,7 +128,7 @@ namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi /// public IDocument Build(Assembly assembly, OpenApiVersionType version = OpenApiVersionType.V2) { - if (this._strategy.IsNullOrDefault()) + if (GenericExtensions.IsNullOrDefault(this._strategy)) { this._strategy = new DefaultNamingStrategy(); } @@ -136,19 +139,19 @@ namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi foreach (var method in methods) { var trigger = this._helper.GetHttpTriggerAttribute(method); - if (trigger.IsNullOrDefault()) + if (GenericExtensions.IsNullOrDefault(trigger)) { continue; } var function = this._helper.GetFunctionNameAttribute(method); - if (function.IsNullOrDefault()) + if (GenericExtensions.IsNullOrDefault(function)) { continue; } var path = this._helper.GetHttpEndpoint(function, trigger); - if (path.IsNullOrWhiteSpace()) + if (StringExtensions.IsNullOrWhiteSpace(path)) { continue; } @@ -159,7 +162,7 @@ namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi var operations = item.Operations; var operation = this._helper.GetOpenApiOperation(method, function, verb); - if (operation.IsNullOrDefault()) + if (GenericExtensions.IsNullOrDefault(operation)) { continue; } @@ -202,7 +205,7 @@ namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi { using (var sw = new StringWriter()) { - this.OpenApiDocument.Serialise(sw, version, format); + OpenApiDocumentExtensions.Serialise(this.OpenApiDocument, sw, version, format); return sw.ToString(); } diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions/DocumentHelperExtensions.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/DocumentHelperExtensions.cs similarity index 96% rename from src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions/DocumentHelperExtensions.cs rename to src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/DocumentHelperExtensions.cs index 6c175d9..a283afd 100644 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions/DocumentHelperExtensions.cs +++ b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/DocumentHelperExtensions.cs @@ -14,7 +14,7 @@ using Microsoft.OpenApi.Models; using Newtonsoft.Json.Serialization; -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions +namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Extensions { /// /// This represents the extension entity for the class. diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions/FunctionAttributeExtensions.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/FunctionAttributeExtensions.cs similarity index 91% rename from src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions/FunctionAttributeExtensions.cs rename to src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/FunctionAttributeExtensions.cs index c18eb5b..33853c4 100644 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions/FunctionAttributeExtensions.cs +++ b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/FunctionAttributeExtensions.cs @@ -2,7 +2,7 @@ using System.Reflection; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions +namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Extensions { /// /// This represents the extension entity for . diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/FunctionsWorkerApplicationBuilderExtensions.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/FunctionsWorkerApplicationBuilderExtensions.cs index 821caf3..f0f1252 100644 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/FunctionsWorkerApplicationBuilderExtensions.cs +++ b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/FunctionsWorkerApplicationBuilderExtensions.cs @@ -1,42 +1,47 @@ -using Azure.Core.Serialization; - -using Microsoft.Extensions.DependencyInjection; - -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Extensions -{ - /// - /// This represents the extension entity for the instance implementing . - /// - public static class FunctionsWorkerApplicationBuilderExtensions - { - /// - /// Activate Newtonsoft.Json. - /// - /// instance. - /// Returns instance. - /// - /// The functions worker uses the Azure SDK's ObjectSerializer to abstract away all JSON serialization. This allows you to - /// swap out the default System.Text.Json implementation for the Newtonsoft.Json implementation. - /// To do so, add the Microsoft.Azure.Core.NewtonsoftJson nuget package and then update the WorkerOptions.Serializer property. - /// This method updates the Serializer to use Newtonsoft.Json. Call /api/HttpFunction to see the changes. - /// - /// Reference: https://github.com/Azure/azure-functions-dotnet-worker/blob/main/samples/Configuration/Program.cs - /// - public static IFunctionsWorkerApplicationBuilder UseNewtonsoftJson(this IFunctionsWorkerApplicationBuilder builder) - { - builder.Services.Configure(workerOptions => - { - var settings = NewtonsoftJsonObjectSerializer.CreateJsonSerializerSettings(); - settings.ContractResolver = new CamelCasePropertyNamesContractResolver(); - settings.NullValueHandling = NullValueHandling.Ignore; - - workerOptions.Serializer = new NewtonsoftJsonObjectSerializer(settings); - }); - - return builder; - } - } -} +using Azure.Core.Serialization; + +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; +using Microsoft.Extensions.DependencyInjection; + +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; + +namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Extensions +{ + /// + /// This represents the extension entity for the instance implementing . + /// + public static class FunctionsWorkerApplicationBuilderExtensions + { + /// + /// Activate Newtonsoft.Json. + /// + /// instance. + /// instance. + /// Returns instance. + /// + /// The functions worker uses the Azure SDK's ObjectSerializer to abstract away all JSON serialization. This allows you to + /// swap out the default System.Text.Json implementation for the Newtonsoft.Json implementation. + /// To do so, add the Microsoft.Azure.Core.NewtonsoftJson nuget package and then update the WorkerOptions.Serializer property. + /// This method updates the Serializer to use Newtonsoft.Json. Call /api/HttpFunction to see the changes. + /// + /// Reference: https://github.com/Azure/azure-functions-dotnet-worker/blob/main/samples/Configuration/Program.cs + /// + public static IFunctionsWorkerApplicationBuilder UseNewtonsoftJson(this IFunctionsWorkerApplicationBuilder builder, JsonSerializerSettings settings = null) + { + builder.Services.Configure(workerOptions => + { + if (settings.IsNullOrDefault()) + { + settings = NewtonsoftJsonObjectSerializer.CreateJsonSerializerSettings(); + settings.ContractResolver = new CamelCasePropertyNamesContractResolver(); + settings.NullValueHandling = NullValueHandling.Ignore; + } + + workerOptions.Serializer = new NewtonsoftJsonObjectSerializer(settings); + }); + + return builder; + } + } +} diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions/HttpTriggerAttributeExtensions.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/HttpTriggerAttributeExtensions.cs similarity index 92% rename from src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions/HttpTriggerAttributeExtensions.cs rename to src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/HttpTriggerAttributeExtensions.cs index 3c70eed..608380e 100644 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions/HttpTriggerAttributeExtensions.cs +++ b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/HttpTriggerAttributeExtensions.cs @@ -3,7 +3,7 @@ using System.Reflection; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions +namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Extensions { /// /// This represents the extension entity for . diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/OpenApiHostBuilderExtensions.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/OpenApiHostBuilderExtensions.cs index f164e03..0b91e5d 100644 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/OpenApiHostBuilderExtensions.cs +++ b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Extensions/OpenApiHostBuilderExtensions.cs @@ -20,6 +20,7 @@ namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Extensions { services.AddSingleton(); services.AddSingleton(); + // services.AddSingleton(); }); return hostBuilder; diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Functions/OpenApiTriggerFunction.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Functions/OpenApiTriggerFunction.cs index 522fa66..8109e5e 100644 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Functions/OpenApiTriggerFunction.cs +++ b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Functions/OpenApiTriggerFunction.cs @@ -3,7 +3,6 @@ using System.IO; using System.Net; using System.Threading.Tasks; -using Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions; using Microsoft.Azure.Functions.Worker.Http; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; using Microsoft.Extensions.Logging; diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/IOpenApiTriggerFunction.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/IOpenApiTriggerFunction.cs index 3b0a746..9a4c186 100644 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/IOpenApiTriggerFunction.cs +++ b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/IOpenApiTriggerFunction.cs @@ -1,6 +1,4 @@ -using System.Threading.Tasks; using Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Functions; -using Microsoft.Azure.Functions.Worker.Http; namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi { diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.csproj b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.csproj index a33b2d5..0d2be07 100644 --- a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.csproj +++ b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.csproj @@ -1,6 +1,6 @@ - + net5.0 @@ -15,6 +15,10 @@ Azure-Functions, OpenAPI, Swagger, Swagger-UI Microsoft.Azure.Functions.Worker.Extensions.OpenApi Microsoft.Azure.Functions.Worker.Extensions.OpenApi + + + @@ -27,11 +31,13 @@ + + - + diff --git a/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Properties/AssemblyInfo.cs b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..535dbb0 --- /dev/null +++ b/src/Microsoft.Azure.Functions.Worker.Extensions.OpenApi/Properties/AssemblyInfo.cs @@ -0,0 +1,6 @@ +// // Copyright (c) .NET Foundation. All rights reserved. +// // Licensed under the MIT License. See License.txt in the project root for license information. + +// using Microsoft.Azure.Functions.Worker.Extensions.Abstractions; + +// [assembly: ExtensionInformation("Microsoft.Azure.WebJobs.Extensions.OpenApi", "0.7.2-preview")] diff --git a/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings/Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings.csproj b/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings/Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings.csproj index 3d05d42..7ec9ad2 100644 --- a/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings/Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings.csproj +++ b/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings/Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings.csproj @@ -1,6 +1,6 @@ - + netstandard2.0 diff --git a/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI/Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI.csproj b/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI/Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI.csproj index 6c0e4c2..e1b364e 100644 --- a/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI/Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI.csproj +++ b/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI/Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI.csproj @@ -1,6 +1,6 @@ - + Exe diff --git a/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.csproj b/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.csproj deleted file mode 100644 index 98de8e0..0000000 --- a/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.csproj +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - netstandard2.0 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 1.0.0 - Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions - Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions - This package extends Microsoft.Azure.WebJobs.Extensions.OpenApi.Core through the in-process worker. - This package extends Microsoft.Azure.WebJobs.Extensions.OpenApi.Core through the in-process worker. - Azure-Functions, OpenAPI, Swagger, Swagger-UI - Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions - Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions - - - - bin\Debug\netstandard2.0\Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.xml - - - - bin\Release\netstandard2.0\Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.xml - - - - - - - - - - - diff --git a/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions/DocumentHelperExtensions.cs b/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Extensions/DocumentHelperExtensions.cs similarity index 100% rename from src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions/DocumentHelperExtensions.cs rename to src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Extensions/DocumentHelperExtensions.cs diff --git a/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions/FunctionNameAttributeExtensions.cs b/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Extensions/FunctionNameAttributeExtensions.cs similarity index 100% rename from src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions/FunctionNameAttributeExtensions.cs rename to src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Extensions/FunctionNameAttributeExtensions.cs diff --git a/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions/HttpTriggerAttributeExtensions.cs b/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Extensions/HttpTriggerAttributeExtensions.cs similarity index 100% rename from src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions/HttpTriggerAttributeExtensions.cs rename to src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Extensions/HttpTriggerAttributeExtensions.cs diff --git a/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions/SwaggerUIExtensions.cs b/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Extensions/SwaggerUIExtensions.cs similarity index 100% rename from src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions/SwaggerUIExtensions.cs rename to src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Extensions/SwaggerUIExtensions.cs diff --git a/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.csproj b/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.csproj index 3177ac6..cbf3ad2 100644 --- a/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.csproj +++ b/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.csproj @@ -1,6 +1,6 @@ - + netstandard2.0 @@ -26,12 +26,9 @@ - - - + - diff --git a/src/Microsoft.Azure.WebJobs.Extensions.OpenApi/Microsoft.Azure.WebJobs.Extensions.OpenApi.csproj b/src/Microsoft.Azure.WebJobs.Extensions.OpenApi/Microsoft.Azure.WebJobs.Extensions.OpenApi.csproj index 789607a..14b85ad 100644 --- a/src/Microsoft.Azure.WebJobs.Extensions.OpenApi/Microsoft.Azure.WebJobs.Extensions.OpenApi.csproj +++ b/src/Microsoft.Azure.WebJobs.Extensions.OpenApi/Microsoft.Azure.WebJobs.Extensions.OpenApi.csproj @@ -1,9 +1,9 @@ - + - netcoreapp2.1;netcoreapp3.1 + netstandard2.0 true true $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb @@ -39,7 +39,6 @@ - diff --git a/templates/OpenApiHttpTrigger.cs b/templates/OpenApiHttpTrigger.cs new file mode 100644 index 0000000..4b4ff69 --- /dev/null +++ b/templates/OpenApiHttpTrigger.cs @@ -0,0 +1,96 @@ +using System.Threading.Tasks; + +using Microsoft.Azure.Functions.Worker.Http; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; + +namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi +{ + /// + /// This represents HTTP trigger entity to render OpenAPI endpoints with function access. + /// + public class OpenApiHttpTrigger : DefaultOpenApiHttpTrigger + { + /// + /// Initializes a new instance of the class. + /// + /// instance. + public OpenApiHttpTrigger(IOpenApiTriggerFunction function) : base(function) + { + } + + /// + /// Invokes the HTTP trigger endpoint to get OpenAPI document. + /// + /// instance. + /// File extension representing the document format. This MUST be either "json" or "yaml". + /// instance. + /// OpenAPI document in a format of either JSON or YAML. + [Function(nameof(OpenApiHttpTrigger.RenderSwaggerDocument))] + [OpenApiIgnore] + public new async Task RenderSwaggerDocument( + [HttpTrigger(AuthorizationLevel.Function, "GET", Route = "swagger.{extension}")] HttpRequestData req, + string extension, + FunctionContext ctx) + { + var response = await this.Function.RenderSwaggerDocument(req, extension, ctx).ConfigureAwait(false); + + return response; + } + + /// + /// Invokes the HTTP trigger endpoint to get OpenAPI document. + /// + /// instance. + /// OpenAPI document spec version. This MUST be either "v2" or "v3". + /// File extension representing the document format. This MUST be either "json" or "yaml". + /// instance. + /// OpenAPI document in a format of either JSON or YAML. + [Function(nameof(OpenApiHttpTrigger.RenderOpenApiDocument))] + [OpenApiIgnore] + public new async Task RenderOpenApiDocument( + [HttpTrigger(AuthorizationLevel.Function, "GET", Route = "openapi/{version}.{extension}")] HttpRequestData req, + string version, + string extension, + FunctionContext ctx) + { + var response = await this.Function.RenderOpenApiDocument(req, version, extension, ctx).ConfigureAwait(false); + + return response; + } + + /// + /// Invokes the HTTP trigger endpoint to render Swagger UI in HTML. + /// + /// instance. + /// instance. + /// Swagger UI in HTML. + [Function(nameof(OpenApiHttpTrigger.RenderSwaggerUI))] + [OpenApiIgnore] + public new async Task RenderSwaggerUI( + [HttpTrigger(AuthorizationLevel.Function, "GET", Route = "swagger/ui")] HttpRequestData req, + FunctionContext ctx) + { + var response = await this.Function.RenderSwaggerUI(req, ctx).ConfigureAwait(false); + + return response; + } + + /// + /// Invokes the HTTP trigger endpoint to render oauth2-redirect.html. + /// + /// instance. + /// instance. + /// oauth2-redirect.html. + [Function(nameof(OpenApiHttpTrigger.RenderOAuth2Redirect))] + [OpenApiIgnore] + public new async Task RenderOAuth2Redirect( + [HttpTrigger(AuthorizationLevel.Function, "GET", Route = "oauth2-redirect.html")] HttpRequestData req, + FunctionContext ctx) + { + var response = await this.Function.RenderOAuth2Redirect(req, ctx).ConfigureAwait(false); + + return response; + } + } +} diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes/FakeFunctionContext.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes/FakeFunctionContext.cs deleted file mode 100644 index 6896a45..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes/FakeFunctionContext.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes -{ - public class FakeFunctionContext : FunctionContext - { - public override string InvocationId { get; } - - public override string FunctionId { get; } - - public override TraceContext TraceContext { get; } - - public override BindingContext BindingContext { get; } - - public override IServiceProvider InstanceServices { get; set; } - - public override FunctionDefinition FunctionDefinition => throw new NotImplementedException(); - - public override IDictionary Items { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } - - public override IInvocationFeatures Features => throw new NotImplementedException(); - } -} diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes/FakeHttpRequestData.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes/FakeHttpRequestData.cs deleted file mode 100644 index 7aadd2c..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes/FakeHttpRequestData.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Security.Claims; - -using Microsoft.Azure.Functions.Worker.Http; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes -{ - public class FakeHttpRequestData : HttpRequestData - { - private Uri _uri; - - public FakeHttpRequestData(FunctionContext functionContext) - : base(functionContext) - { - } - - public override Stream Body { get; } - - public override HttpHeadersCollection Headers { get; } - - public override IReadOnlyCollection Cookies { get; } - - public override Uri Url { get { return this._uri; } } - - public override IEnumerable Identities { get; } - - public override string Method { get; } - - public override HttpResponseData CreateResponse() - { - return new FakeHttpResponseData(this.FunctionContext); - } - - public void SetUri(Uri uri) - { - this._uri = uri; - } - } -} diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes/FakeHttpResponseData.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes/FakeHttpResponseData.cs deleted file mode 100644 index f757f29..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes/FakeHttpResponseData.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.IO; -using System.Net; - -using Microsoft.Azure.Functions.Worker.Http; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes -{ - public class FakeHttpResponseData : HttpResponseData - { - public FakeHttpResponseData(FunctionContext functionContext) - : base(functionContext) - { - } - - public override HttpStatusCode StatusCode { get; set; } - public override HttpHeadersCollection Headers { get; set; } - public override Stream Body { get; set; } - public override HttpCookies Cookies { get; } - } -} diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes.csproj b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes.csproj deleted file mode 100644 index cd79b16..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - net5.0 - - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes - - - - - - - - diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.csproj b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.csproj deleted file mode 100644 index 3f39244..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.csproj +++ /dev/null @@ -1,34 +0,0 @@ - - - - net5.0 - - false - - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Admin.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Admin.Tests.csproj b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Admin.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Admin.Tests.csproj deleted file mode 100644 index 2d97879..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Admin.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Admin.Tests.csproj +++ /dev/null @@ -1,35 +0,0 @@ - - - - net5.0 - - false - - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Admin.Tests - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Admin.Tests - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Admin.Tests/OpenApiTriggerRenderFunctionProviderTests.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Admin.Tests/OpenApiTriggerRenderFunctionProviderTests.cs deleted file mode 100644 index 8dd33e0..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Admin.Tests/OpenApiTriggerRenderFunctionProviderTests.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; - -using FluentAssertions; - -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Admin.Tests -{ - [TestClass] - public class OpenApiTriggerRenderFunctionProviderTests - { - [TestMethod] - public void Given_Null_When_OAuth2Redirect_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderOAuth2RedirectFunctionProvider(null); - - action.Should().Throw(); - } - - [TestMethod] - public void Given_Null_When_OpenApiDocument_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderOpenApiDocumentFunctionProvider(null); - - action.Should().Throw(); - } - - [TestMethod] - public void Given_Null_When_SwaggerDocument_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderSwaggerDocumentFunctionProvider(null); - - action.Should().Throw(); - } - - [TestMethod] - public void Given_Null_When_SwaggerUI_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderSwaggerUIFunctionProvider(null); - - action.Should().Throw(); - } - } -} diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Anonymous.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Anonymous.Tests.csproj b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Anonymous.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Anonymous.Tests.csproj deleted file mode 100644 index f790c45..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Anonymous.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Anonymous.Tests.csproj +++ /dev/null @@ -1,35 +0,0 @@ - - - - net5.0 - - false - - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Anonymous.Tests - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Anonymous.Tests - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Anonymous.Tests/OpenApiTriggerRenderFunctionProviderTests.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Anonymous.Tests/OpenApiTriggerRenderFunctionProviderTests.cs deleted file mode 100644 index a29590f..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Anonymous.Tests/OpenApiTriggerRenderFunctionProviderTests.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; - -using FluentAssertions; - -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Anonymous.Tests -{ - [TestClass] - public class OpenApiTriggerRenderFunctionProviderTests - { - [TestMethod] - public void Given_Null_When_OAuth2Redirect_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderOAuth2RedirectFunctionProvider(null); - - action.Should().Throw(); - } - - [TestMethod] - public void Given_Null_When_OpenApiDocument_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderOpenApiDocumentFunctionProvider(null); - - action.Should().Throw(); - } - - [TestMethod] - public void Given_Null_When_SwaggerDocument_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderSwaggerDocumentFunctionProvider(null); - - action.Should().Throw(); - } - - [TestMethod] - public void Given_Null_When_SwaggerUI_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderSwaggerUIFunctionProvider(null); - - action.Should().Throw(); - } - } -} diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Function.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Function.Tests.csproj b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Function.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Function.Tests.csproj deleted file mode 100644 index dc2f725..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Function.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Function.Tests.csproj +++ /dev/null @@ -1,35 +0,0 @@ - - - - net5.0 - - false - - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Function.Tests - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Function.Tests - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Function.Tests/OpenApiTriggerRenderFunctionProviderTests.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Function.Tests/OpenApiTriggerRenderFunctionProviderTests.cs deleted file mode 100644 index def269b..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Function.Tests/OpenApiTriggerRenderFunctionProviderTests.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; - -using FluentAssertions; - -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.Function.Tests -{ - [TestClass] - public class OpenApiTriggerRenderFunctionProviderTests - { - [TestMethod] - public void Given_Null_When_OAuth2Redirect_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderOAuth2RedirectFunctionProvider(null); - - action.Should().Throw(); - } - - [TestMethod] - public void Given_Null_When_OpenApiDocument_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderOpenApiDocumentFunctionProvider(null); - - action.Should().Throw(); - } - - [TestMethod] - public void Given_Null_When_SwaggerDocument_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderSwaggerDocumentFunctionProvider(null); - - action.Should().Throw(); - } - - [TestMethod] - public void Given_Null_When_SwaggerUI_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderSwaggerUIFunctionProvider(null); - - action.Should().Throw(); - } - } -} diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.System.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.System.Tests.csproj b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.System.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.System.Tests.csproj deleted file mode 100644 index 75db8bf..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.System.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.System.Tests.csproj +++ /dev/null @@ -1,35 +0,0 @@ - - - - net5.0 - - false - - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.System.Tests - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.System.Tests - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.System.Tests/OpenApiTriggerRenderFunctionProviderTests.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.System.Tests/OpenApiTriggerRenderFunctionProviderTests.cs deleted file mode 100644 index c983ae5..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.System.Tests/OpenApiTriggerRenderFunctionProviderTests.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; - -using FluentAssertions; - -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.System.Tests -{ - [TestClass] - public class OpenApiTriggerRenderFunctionProviderTests - { - [TestMethod] - public void Given_Null_When_OAuth2Redirect_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderOAuth2RedirectFunctionProvider(null); - - action.Should().Throw(); - } - - [TestMethod] - public void Given_Null_When_OpenApiDocument_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderOpenApiDocumentFunctionProvider(null); - - action.Should().Throw(); - } - - [TestMethod] - public void Given_Null_When_SwaggerDocument_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderSwaggerDocumentFunctionProvider(null); - - action.Should().Throw(); - } - - [TestMethod] - public void Given_Null_When_SwaggerUI_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderSwaggerUIFunctionProvider(null); - - action.Should().Throw(); - } - } -} diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.User.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.User.Tests.csproj b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.User.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.User.Tests.csproj deleted file mode 100644 index 3c2f6b7..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.User.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.User.Tests.csproj +++ /dev/null @@ -1,35 +0,0 @@ - - - - net5.0 - - false - - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.User.Tests - Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.User.Tests - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.User.Tests/OpenApiTriggerRenderFunctionProviderTests.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.User.Tests/OpenApiTriggerRenderFunctionProviderTests.cs deleted file mode 100644 index 02543a0..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.User.Tests/OpenApiTriggerRenderFunctionProviderTests.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; - -using FluentAssertions; - -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionProviders.User.Tests -{ - [TestClass] - public class OpenApiTriggerRenderFunctionProviderTests - { - [TestMethod] - public void Given_Null_When_OAuth2Redirect_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderOAuth2RedirectFunctionProvider(null); - - action.Should().Throw(); - } - - [TestMethod] - public void Given_Null_When_OpenApiDocument_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderOpenApiDocumentFunctionProvider(null); - - action.Should().Throw(); - } - - [TestMethod] - public void Given_Null_When_SwaggerDocument_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderSwaggerDocumentFunctionProvider(null); - - action.Should().Throw(); - } - - [TestMethod] - public void Given_Null_When_SwaggerUI_Instantiated_Then_It_Should_Throw_Exception() - { - Action action = () => new OpenApiTriggerRenderSwaggerUIFunctionProvider(null); - - action.Should().Throw(); - } - } -} diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Configurations/OpenApiSettingsTests.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Configurations/OpenApiSettingsTests.cs deleted file mode 100644 index 1c60d5c..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Configurations/OpenApiSettingsTests.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; - -using FluentAssertions; - -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Configurations.AppSettings.Extensions; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Configurations.AppSettings.Resolvers; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Enums; -using Microsoft.Extensions.Configuration; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests.Configurations -{ - [TestClass] - public class OpenApiSettingsTests - { - [DataTestMethod] - [DataRow("true", true, "lorem", "Function", OpenApiAuthLevelType.Function, "Anonymous", OpenApiAuthLevelType.Anonymous, "http://localhost:7071", "https://contoso.com/api/")] - [DataRow("false", false, "ipsum", "Anonymous", OpenApiAuthLevelType.Anonymous, "Function", OpenApiAuthLevelType.Function, "http://contoso", "https://fabrikam.com/api/")] - public void Given_EnvironmentVariables_When_Instantiated_Then_It_Should_Return_Result(string hideSwaggerUI, bool expectedHideSwaggerUI, string apiKey, - string authLevelDoc, OpenApiAuthLevelType expectedAuthLevelDoc, - string authLevelUI, OpenApiAuthLevelType expectedAuthLevelUI, - string proxyUrl, string hostnames) - { - Environment.SetEnvironmentVariable("OpenApi__HideSwaggerUI", hideSwaggerUI); - Environment.SetEnvironmentVariable("OpenApi__ApiKey", apiKey); - Environment.SetEnvironmentVariable("OpenApi__AuthLevel__Document", authLevelDoc); - Environment.SetEnvironmentVariable("OpenApi__AuthLevel__UI", authLevelUI); - Environment.SetEnvironmentVariable("OpenApi__BackendProxyUrl", proxyUrl); - Environment.SetEnvironmentVariable("OpenApi__HostNames", hostnames); - - var config = ConfigurationResolver.Resolve(); - var settings = config.Get("OpenApi"); - - settings.HideSwaggerUI.Should().Be(expectedHideSwaggerUI); - settings.ApiKey.Should().Be(apiKey); - settings.AuthLevel.Document.Should().Be(expectedAuthLevelDoc); - settings.AuthLevel.UI.Should().Be(expectedAuthLevelUI); - settings.BackendProxyUrl.Should().Be(proxyUrl); - settings.HostNames.Should().Be(hostnames); - } - } -} diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests/FunctionAttributeExtensionsTests.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Extensions/FunctionAttributeExtensionsTests.cs similarity index 82% rename from test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests/FunctionAttributeExtensionsTests.cs rename to test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Extensions/FunctionAttributeExtensionsTests.cs index a00c17d..40be840 100644 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests/FunctionAttributeExtensionsTests.cs +++ b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Extensions/FunctionAttributeExtensionsTests.cs @@ -3,10 +3,11 @@ using System.Reflection; using FluentAssertions; -using Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes; +using Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Extensions; +using Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests.Fakes; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests +namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests.Extensions { [TestClass] public class FunctionAttributeExtensionsTests diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests/HttpTriggerAttributeExtensionsTests.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Extensions/HttpTriggerAttributeExtensionsTests.cs similarity index 75% rename from test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests/HttpTriggerAttributeExtensionsTests.cs rename to test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Extensions/HttpTriggerAttributeExtensionsTests.cs index c1ce11e..931364b 100644 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests/HttpTriggerAttributeExtensionsTests.cs +++ b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Extensions/HttpTriggerAttributeExtensionsTests.cs @@ -2,9 +2,10 @@ using System; using FluentAssertions; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests +namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests.Extensions { [TestClass] public class MethodInfoExtensionsTests diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Extensions/OpenApiHostBuilderExtensionsTests.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Extensions/OpenApiHostBuilderExtensionsTests.cs deleted file mode 100644 index 1b2dcec..0000000 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Extensions/OpenApiHostBuilderExtensionsTests.cs +++ /dev/null @@ -1,37 +0,0 @@ -using FluentAssertions; - -using Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Extensions; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests.Extensions -{ - [TestClass] - public class OpenApiHostBuilderExtensionsTests - { - [TestMethod] - public void Given_HostBuilder_When_Build_Invoked_Then_It_Should_Return_Context() - { - var host = new HostBuilder() - .ConfigureOpenApi() - .Build(); - - var context = host.Services.GetService(); - - context.Should().NotBeNull(); - } - - [TestMethod] - public void Given_HostBuilder_When_Build_Invoked_Then_It_Should_Return_Function() - { - var host = new HostBuilder() - .ConfigureOpenApi() - .Build(); - - var function = host.Services.GetService(); - - function.Should().NotBeNull(); - } - } -} diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Fakes/FakeHttpRequestData.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Fakes/FakeHttpRequestData.cs new file mode 100644 index 0000000..60fb51e --- /dev/null +++ b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Fakes/FakeHttpRequestData.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Security.Claims; + +using Microsoft.Azure.Functions.Worker.Http; + +namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests.Fakes +{ + public class FakeHttpRequestData : HttpRequestData + { + public FakeHttpRequestData(FunctionContext functionContext, Uri uri) : base(functionContext) + { + this.Url = uri; + } + + public override Stream Body => throw new NotImplementedException(); + + public override HttpHeadersCollection Headers => throw new NotImplementedException(); + + public override IReadOnlyCollection Cookies => throw new NotImplementedException(); + + public override Uri Url { get;} + + public override IEnumerable Identities => throw new NotImplementedException(); + + public override string Method => throw new NotImplementedException(); + + public override HttpResponseData CreateResponse() + { + throw new NotImplementedException(); + } + } +} diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Fakes/FakeHttpResponseData.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Fakes/FakeHttpResponseData.cs new file mode 100644 index 0000000..4d2ee85 --- /dev/null +++ b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Fakes/FakeHttpResponseData.cs @@ -0,0 +1,21 @@ +using System; +using System.IO; +using System.Net; + +using Microsoft.Azure.Functions.Worker.Http; + +namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests.Fakes +{ + public class FakeHttpResponseData : HttpResponseData + { + public FakeHttpResponseData(FunctionContext functionContext) : base(functionContext) + { + } + + public override HttpStatusCode StatusCode { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public override HttpHeadersCollection Headers { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public override Stream Body { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public override HttpCookies Cookies => throw new NotImplementedException(); + } +} diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes/FakeHttpTrigger.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Fakes/FakeHttpTrigger.cs similarity index 67% rename from test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes/FakeHttpTrigger.cs rename to test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Fakes/FakeHttpTrigger.cs index a87428c..680e0aa 100644 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes/FakeHttpTrigger.cs +++ b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Fakes/FakeHttpTrigger.cs @@ -1,8 +1,11 @@ +using System.Net; using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.Functions.Worker.Http; -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes +namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests.Fakes { /// /// This represents the fake class entity. @@ -19,10 +22,10 @@ namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Te [HttpTrigger] HttpRequestData req ) { - var context = new FakeFunctionContext(); - var response = new FakeHttpResponseData(context); - return await Task.FromResult(response).ConfigureAwait(false); + var res = req.CreateResponse(HttpStatusCode.OK); + + return await Task.FromResult(res).ConfigureAwait(false); } } } diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/HttpRequestObjectTests.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/HttpRequestObjectTests.cs index c846658..7cb486c 100644 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/HttpRequestObjectTests.cs +++ b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/HttpRequestObjectTests.cs @@ -1,8 +1,10 @@ using System; +using System.Linq; using FluentAssertions; -using Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests.Fakes; +using Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests.Fakes; +using Microsoft.Azure.Functions.Worker.Http; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; @@ -27,17 +29,18 @@ namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests [DataRow("https", "localhost", 47071)] public void Given_Parameter_When_Instantiated_Then_It_Should_Return_Result(string scheme, string hostname, int port) { - var uri = new UriBuilder(scheme, hostname, port).Uri; - var context = new Mock(); - var req = new FakeHttpRequestData(context.Object); - req.SetUri(uri); + var ports = new[] { 80, 443 }; + var baseHost = $"{hostname}{(ports.Contains(port) ? string.Empty : $":{port}")}"; + var uri = Uri.TryCreate($"{scheme}://{baseHost}", UriKind.Absolute, out var tried) ? tried : null; + + var req = (HttpRequestData) new FakeHttpRequestData(context.Object, uri); var result = new HttpRequestObject(req); result.Scheme.Should().Be(scheme); - result.Host.Value.Should().Be(uri.Authority); + result.Host.Value.Should().Be(baseHost); } } } diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests.csproj b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests.csproj index 6cfea67..8f2712c 100644 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests.csproj +++ b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests.csproj @@ -27,8 +27,6 @@ - - diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/OpenApiHttpTriggerContextTests.cs b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/OpenApiHttpTriggerContextTests.cs index e51b3af..f809b56 100644 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/OpenApiHttpTriggerContextTests.cs +++ b/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests/OpenApiHttpTriggerContextTests.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using FluentAssertions; +using Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Functions; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Abstractions; using Microsoft.OpenApi; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -33,7 +34,7 @@ namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Tests [DataTestMethod] [DataRow(typeof(IOpenApiHttpTriggerContext))] [DataRow(typeof(OpenApiHttpTriggerContext))] - [DataRow(typeof(IOpenApiTriggerFunction))] + [DataRow(typeof(OpenApiTriggerFunction))] [DataRow(typeof(ISwaggerUI))] public async Task Given_Type_When_Initiated_Then_It_Should_NotReturn_ApplicationAssemblyWithGivenType(Type type) { diff --git a/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.Fakes/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.Fakes.csproj b/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.Fakes/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.Fakes.csproj deleted file mode 100644 index 6abe108..0000000 --- a/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.Fakes/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.Fakes.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - netstandard2.0 - - Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.Fakes - Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.Fakes - - - - - - - diff --git a/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.csproj b/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.csproj deleted file mode 100644 index 0643b24..0000000 --- a/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.csproj +++ /dev/null @@ -1,38 +0,0 @@ - - - - netcoreapp2.1;netcoreapp3.1;net5.0 - - false - - Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests - Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - - - - diff --git a/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests/SwaggerUIExtensionsTests.cs b/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests/SwaggerUIExtensionsTests.cs deleted file mode 100644 index 90b0a86..0000000 --- a/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests/SwaggerUIExtensionsTests.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using System.Threading.Tasks; - -using FluentAssertions; - -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Abstractions; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Enums; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -using Moq; - -namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests -{ - [TestClass] - public class SwaggerUIExtensionsTests - { - [TestMethod] - public void Given_Null_When_RenderAsync_Invoked_Then_It_Should_Throw_Exception() - { - Func func = async () => await SwaggerUIExtensions.RenderAsync(null, null).ConfigureAwait(false); - func.Should().Throw(); - - var ui = new Mock(); - var task = Task.FromResult(ui.Object); - - func = async () => await SwaggerUIExtensions.RenderAsync(task, null).ConfigureAwait(false); - func.Should().Throw(); - } - - [TestMethod] - public async Task Given_Value_When_RenderAsync_Invoked_Then_It_Should_Return_Value() - { - var endpoint = "swagger/ui"; - var rendered = "hello world"; - - var ui = new Mock(); - ui.Setup(p => p.RenderAsync(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(rendered); - - var task = Task.FromResult(ui.Object); - - var result = await SwaggerUIExtensions.RenderAsync(task, endpoint).ConfigureAwait(false); - - result.Should().BeEquivalentTo(rendered); - } - - [TestMethod] - public void Given_Null_When_RenderOAuth2RedirectAsync_Invoked_Then_It_Should_Throw_Exception() - { - Func func = async () => await SwaggerUIExtensions.RenderOAuth2RedirectAsync(null, null).ConfigureAwait(false); - func.Should().Throw(); - - var ui = new Mock(); - var task = Task.FromResult(ui.Object); - - func = async () => await SwaggerUIExtensions.RenderOAuth2RedirectAsync(task, null).ConfigureAwait(false); - func.Should().Throw(); - } - - [TestMethod] - public async Task Given_Value_When_RenderOAuth2RedirectAsync_Invoked_Then_It_Should_Return_Value() - { - var endpoint = "oauth2-redirect.html"; - var rendered = "hello world"; - - var ui = new Mock(); - ui.Setup(p => p.RenderOAuth2RedirectAsync(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(rendered); - - var task = Task.FromResult(ui.Object); - - var result = await SwaggerUIExtensions.RenderOAuth2RedirectAsync(task, endpoint).ConfigureAwait(false); - - result.Should().BeEquivalentTo(rendered); - } - } -} diff --git a/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.Fakes/FakeHttpTrigger.cs b/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes/FakeHttpTrigger.cs similarity index 89% rename from test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.Fakes/FakeHttpTrigger.cs rename to test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes/FakeHttpTrigger.cs index e94f745..313c39f 100644 --- a/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.Fakes/FakeHttpTrigger.cs +++ b/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes/FakeHttpTrigger.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; -namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.Fakes +namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes { /// /// This represents the fake class entity. diff --git a/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes.csproj b/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes.csproj index d679e7c..13e10aa 100644 --- a/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes.csproj +++ b/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes.csproj @@ -8,9 +8,7 @@ - - - + diff --git a/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests/FunctionNameAttributeExtensionsTests.cs b/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests/Extensions/FunctionNameAttributeExtensionsTests.cs similarity index 89% rename from test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests/FunctionNameAttributeExtensionsTests.cs rename to test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests/Extensions/FunctionNameAttributeExtensionsTests.cs index 43755d1..34035f8 100644 --- a/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests/FunctionNameAttributeExtensionsTests.cs +++ b/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests/Extensions/FunctionNameAttributeExtensionsTests.cs @@ -3,10 +3,11 @@ using System.Reflection; using FluentAssertions; -using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests.Fakes; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests.Fakes; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests +namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests { [TestClass] public class FunctionNameAttributeExtensionsTests diff --git a/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests/HttpTriggerAttributeExtensionsTests.cs b/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests/Extensions/HttpTriggerAttributeExtensionsTests.cs similarity index 77% rename from test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests/HttpTriggerAttributeExtensionsTests.cs rename to test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests/Extensions/HttpTriggerAttributeExtensionsTests.cs index 4f548ab..6cd26f3 100644 --- a/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests/HttpTriggerAttributeExtensionsTests.cs +++ b/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests/Extensions/HttpTriggerAttributeExtensionsTests.cs @@ -2,9 +2,10 @@ using System; using FluentAssertions; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions.Tests +namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests { [TestClass] public class MethodInfoExtensionsTests diff --git a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests/SwaggerUIExtensionsTests.cs b/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests/Extensions/SwaggerUIExtensionsTests.cs similarity index 95% rename from test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests/SwaggerUIExtensionsTests.cs rename to test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests/Extensions/SwaggerUIExtensionsTests.cs index 74cce61..58e1a39 100644 --- a/test/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests/SwaggerUIExtensionsTests.cs +++ b/test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests/Extensions/SwaggerUIExtensionsTests.cs @@ -5,11 +5,12 @@ using FluentAssertions; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Abstractions; using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Enums; +using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Extensions; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; -namespace Microsoft.Azure.Functions.Worker.Extensions.OpenApi.Core.Extensions.Tests +namespace Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests { [TestClass] public class SwaggerUIExtensionsTests