azure-functions-openapi-extension icon indicating copy to clipboard operation
azure-functions-openapi-extension copied to clipboard

This extension provides an Azure Functions app with Open API capability for better discoverability to consuming parties

Results 237 azure-functions-openapi-extension issues
Sort by recently updated
recently updated
newest added

Feature Request: SwaggerUI Auth Options

[{"_id":"6381f84d4b97542c9a3205cd","body":"This would be very useful for my project as well","issue_id":1660276102412,"origin_id":1072513525,"user_origin_id":49597090,"create_time":1647616810,"update_time":1647616836,"id":1669462093428,"updated_at":"2022-11-26T11:28:13.427000Z","created_at":"2022-11-26T11:28:13.427000Z"},{"_id":"6381f84d4b97542c9a3205ce","body":"@ctraftoncodes Thanks for the issue! We already support OAuth2 authentication. But it seems that you want some extra features in addition to it. Would you please eleborate?","issue_id":1660276102412,"origin_id":1073384331,"user_origin_id":1538528,"create_time":1647822474,"update_time":1647822474,"id":1669462093430,"updated_at":"2022-11-26T11:28:13.430000Z","created_at":"2022-11-26T11:28:13.430000Z"},{"_id":"6381f84d4b97542c9a3205cf","body":"> @ctraftoncodes Thanks for the issue! We already support OAuth2 authentication. But it seems that you want some extra features in addition to it. Would you please eleborate?\r\n\r\n@justinyoo I'm facing a similar situation. Using swashbuckle as a basis for comparison, if you check out the class [OAuthConfigObject](https:\/\/github.com\/domaindrivendev\/Swashbuckle.AspNetCore\/blob\/844e11cb202c96d3fb4e4ef551aba4af3ba9e6e0\/src\/Swashbuckle.AspNetCore.SwaggerUI\/SwaggerUIOptions.cs) it exposes properties allowing the client id and selected scopes to be pre-set in swagger UI; that's really just a convenience, but a very convenient one, particularly for my testers. \r\n\r\nMore importantly for my use case it provides a property `UsePkceWithAuthorizationCodeGrant`. Specifically I'm trying to configure swagger UI to allow sign-in to the same AzureAD B2C tenant\/client that our Angular webapp uses, and without access to PKCE configuration that's not currently possible. However it's unclear from the OpenAPI.NET repo whether they support 3.1.0 yet, which is when PKCE support appears, so this may be contingent on one of your dependencies updating first.","issue_id":1660276102412,"origin_id":1076241879,"user_origin_id":13615987,"create_time":1648033733,"update_time":1648033801,"id":1669462093434,"updated_at":"2022-11-26T11:28:13.433000Z","created_at":"2022-11-26T11:28:13.433000Z"},{"_id":"6381f84d4b97542c9a3205d0","body":"@DanMannMann that is the use case I am referring to - it would be nice to be able to pre-set a few values the way that you have described with Swashbuckle's OAuthConfigObject. For my use case, it is, as described, simply a convenience that would help us when testing and remove the need to copy and paste the ClientID for OAuth2. \r\n\r\nI understand this may be out of scope for this package but could be a useful as others have described.\r\n\r\nPlease let me know @justinyoo if I can provide further clarification. :)","issue_id":1660276102412,"origin_id":1076385539,"user_origin_id":75496244,"create_time":1648042660,"update_time":1648042660,"id":1669462093437,"updated_at":"2022-11-26T11:28:13.436000Z","created_at":"2022-11-26T11:28:13.436000Z"},{"_id":"6381f84d4b97542c9a3205d1","body":"> More importantly for my use case it provides a property `UsePkceWithAuthorizationCodeGrant`. Specifically I'm trying to configure swagger UI to allow sign-in to the same AzureAD B2C tenant\/client that our Angular webapp uses, and without access to PKCE configuration that's not currently possible. However it's unclear from the OpenAPI.NET repo whether they support 3.1.0 yet, which is when PKCE support appears, so this may be contingent on one of your dependencies updating first.\r\n\r\n@DanMannMann Unfortunately, this package relies on OpenAPI.NET and it's currently v1.2.3 - supports OpenAPI spec v3.0.1. Therefore PKCE support is not there yet. When OpenAPI.NET package supports PKCE then we can also support it.","issue_id":1660276102412,"origin_id":1076470774,"user_origin_id":1538528,"create_time":1648047665,"update_time":1648047723,"id":1669462093440,"updated_at":"2022-11-26T11:28:13.439000Z","created_at":"2022-11-26T11:28:13.439000Z"},{"_id":"6381f84d4b97542c9a3205d2","body":"@ctraftoncodes Oh I see. Let's keep this discussion open and see how it goes. I don't currently have a clear roadmap on this, though.","issue_id":1660276102412,"origin_id":1076472357,"user_origin_id":1538528,"create_time":1648047795,"update_time":1648047795,"id":1669462093442,"updated_at":"2022-11-26T11:28:13.442000Z","created_at":"2022-11-26T11:28:13.442000Z"},{"_id":"662f3a85b7a25c1c610ed5c8","body":"Any progress on adding support for allowing the client id and selected scopes to be pre-set in swagger UI?\r\n","issue_id":1660276102412,"origin_id":1433974662,"user_origin_id":17463037,"create_time":1676597808,"update_time":1676597808,"id":1714371205756,"updated_at":"2024-04-29T06:13:25.756000Z","created_at":"2024-04-29T06:13:25.756000Z"},{"_id":"662f3a85b7a25c1c610ed5ca","body":"There is an item on the OpenAPI github that concerns updating to 3.1.0. \r\nhttps:\/\/github.com\/microsoft\/OpenAPI.NET\/issues\/795\r\n\r\nAccording to the milestones [set here](https:\/\/github.com\/microsoft\/OpenAPI.NET\/milestone\/8) it might see daylight at the end of march this year. Subsequently, work has to be planned for this extension of course :-) So I'm rooting for you folks!! ;-) thanks in advance\r\n\r\nI'm really waiting for this :-) I've resorted to Token retrieval using PostMan, but I would love to have this within the swaggerui.\r\n\r\n![image](https:\/\/user-images.githubusercontent.com\/6482598\/219684703-bf43e9b4-1c6b-41c1-9d45-0f0aa08e3279.png)\r\n","issue_id":1660276102412,"origin_id":1434742725,"user_origin_id":6482598,"create_time":1676644945,"update_time":1676644945,"id":1714371205762,"updated_at":"2024-04-29T06:13:25.762000Z","created_at":"2024-04-29T06:13:25.762000Z"}] comment

**Describe the issue** [SwashBuckle.ASpDotnetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore#enable-oauth20-flows) Provides built-in UI support for for OAuth 2.0 flows that help developers quickly stand up Swagger UIs with data pre-filled in, such as OAuth ClientIds, etc....

enhancement
discussion

**Describe the issue** I'm getting an exception trying to render the Swagger Document when my API includes a class that has a Nullable in it. **To Reproduce** Steps to reproduce...

Question: OpenApiOAuthFlows configuration options

[{"_id":"6381fe015ae95c7a22316924","body":"@Skovvart Thanks for the issue!\r\n\r\nI'm not sure what you want to achieve. `OpenApiOAuthFlows` comes from [OpenAPI.NET](https:\/\/github.com\/microsoft\/OpenAPI.NET\/blob\/vnext\/src\/Microsoft.OpenApi\/Models\/OpenApiOAuthFlows.cs), which only has a parameterless constructor.\r\n\r\nThis extension has `OpenApiOAuthSecurityFlows` that inherits `OpenApiOAuthFlows`, and it also only has the parameterless constructor. If you want to use this, you should inherit it and can add as many constructors as you want.","issue_id":1660276102420,"origin_id":877174159,"user_origin_id":1538528,"create_time":1625836089,"update_time":1625836089,"id":1669463553630,"updated_at":"2022-11-26T11:52:33.630000Z","created_at":"2022-11-26T11:52:33.630000Z"},{"_id":"6381fe015ae95c7a22316925","body":"Hi @justinyoo \r\n\r\nThanks for replying. Let me try to elaborate on what I am trying to achieve.\r\n\r\nAs mentioned, I am trying to describe OAuth 2 Client Credentials flow on my API.\r\n\r\nTo do this, I am using this extensions `OpenApiSecurity` attribute with the `Flows` property pointing to my (client credentials) configuration:\r\n```\r\n[OpenApiSecurity(MyOAuthFlows.SchemeName, SecuritySchemeType.OAuth2, Flows = typeof(MyOAuthFlows))]\r\n``` \r\n\r\nIn my `OpenApiOAuthFlows` implementation I need to set up values, in this case for the `ClientCredentials` flow:\r\n```csharp\r\n public class MyOAuthFlows : OpenApiOAuthFlows\r\n {\r\n private const string MyAzureAadTenantId = \"sure would be nice to configure this\";\r\n\r\n public const string SchemeName = \"MyApiSecurityScheme\";\r\n\r\n public MyOAuthFlows()\r\n {\r\n var apiScopeEnvironment = \"sure would be nice to configure this\";\r\n ClientCredentials = new OpenApiOAuthFlow\r\n {\r\n TokenUrl = new Uri($\"https:\/\/login.microsoft.com\/{MyAzureAadTenantId}\/oauth2\/v2.0\/token\"),\r\n Scopes = { { $\"api:\/\/my-api-{apiScopeEnvironment}\/.default\", $\"Access API ({apiScopeEnvironment})\" } }\r\n };\r\n }\r\n}\r\n```\r\n\r\nIt was my hope that this extension (as it is the one pointing to the `Flows` type) would instantiate my class using dependency injection so I could inject dependencies like `IConfiguration`, bound configuration, etc. in the constructor, but it seems like the current implementation is a simple `Activator.CreateInstance` (https:\/\/github.com\/Azure\/azure-functions-openapi-extension\/blob\/ef3819d79de6d58ca80500d7d1072522437886d3\/src\/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core\/DocumentHelper.cs#L309) that does not support this.\r\n\r\nIf the above is unreasonable, an alternative recommended approach would be appreciated - right now I am using `System.Environment.GetEnvironmentVariable(...)`, but it is of course a little limited compared to the .NET core configuration options.","issue_id":1660276102420,"origin_id":878049704,"user_origin_id":1453295,"create_time":1626075734,"update_time":1626081066,"id":1669463553634,"updated_at":"2022-11-26T11:52:33.633000Z","created_at":"2022-11-26T11:52:33.633000Z"},{"_id":"6381fe015ae95c7a22316926","body":"@Skovvart Thanks for the detailed explanation! Please use `Environment.GetEnvironmentVariable(...)` option for the time being. I'll keep this open for further discussion.","issue_id":1660276102420,"origin_id":878281571,"user_origin_id":1538528,"create_time":1626096635,"update_time":1626096635,"id":1669463553637,"updated_at":"2022-11-26T11:52:33.637000Z","created_at":"2022-11-26T11:52:33.637000Z"},{"_id":"6381fe015ae95c7a22316927","body":"Perhaps going on a year later, my team would also find this useful. \r\n\r\nJust wanted to put my two cents in to see if this could go on a list of possible features for the future :)","issue_id":1660276102420,"origin_id":1072579645,"user_origin_id":75496244,"create_time":1647620925,"update_time":1647620925,"id":1669463553640,"updated_at":"2022-11-26T11:52:33.640000Z","created_at":"2022-11-26T11:52:33.640000Z"},{"_id":"662f3a7dfa3686d6a10c68c9","body":"Do I understand correctly that there is still no possibility of DI here?\r\n\r\nIt would be great if the feature would come.","issue_id":1660276102420,"origin_id":1571983893,"user_origin_id":83231877,"create_time":1685623419,"update_time":1685623419,"id":1714371197130,"updated_at":"2024-04-29T06:13:17.130000Z","created_at":"2024-04-29T06:13:17.130000Z"}] comment

I am in the process of trying to configure an `OpenApiOAuthFlows` (for oauth clientcredentials) and was hoping to be able to access configuration (or maybe even other services), but it...

discussion

Error with loading file Microsoft.Azure.WebJobs.Extensions.Http.dll

[{"_id":"6381fa864b97542c9a3208cf","body":"@Ashan-FCC Thanks for the issue! Would you please try the new release, v0.8.1-preview and let me know?\r\n\r\nIf the same issue still persists, please let me know how to reproduce your issue on my end.","issue_id":1660276102422,"origin_id":897649362,"user_origin_id":1538528,"create_time":1628775663,"update_time":1628775663,"id":1669462662327,"updated_at":"2022-11-26T11:37:42.327000Z","created_at":"2022-11-26T11:37:42.327000Z"},{"_id":"6381fa864b97542c9a3208d1","body":"@justinyoo I was able to reproduce the same behavior as @Ashan-FCC on v0.8.1-preview \r\n\r\nThe http dll is missing from _bin\/Debug\/netcore3.1\/bin\/_\r\n\r\n![image](https:\/\/user-images.githubusercontent.com\/11277680\/129837555-d35bee5c-2e3c-4bef-b976-a772aa1eaff3.png)\r\n\r\nCore Tools Version: 3.0.3442 \r\nFunction Runtime Version: 3.0.15417.0","issue_id":1660276102422,"origin_id":900805656,"user_origin_id":11277680,"create_time":1629261380,"update_time":1629261380,"id":1669462662333,"updated_at":"2022-11-26T11:37:42.332000Z","created_at":"2022-11-26T11:37:42.332000Z"},{"_id":"6381fa864b97542c9a3208d2","body":"Alright. Would you please provide steps you've reproduced this error, so that I can follow the steps?","issue_id":1660276102422,"origin_id":900831831,"user_origin_id":1538528,"create_time":1629266089,"update_time":1629266089,"id":1669462662336,"updated_at":"2022-11-26T11:37:42.336000Z","created_at":"2022-11-26T11:37:42.336000Z"},{"_id":"6381fa864b97542c9a3208d3","body":"Ok I did something super simple. I followed the instructions defined here: \r\n[https:\/\/github.com\/Azure\/azure-functions-openapi-extension\/blob\/main\/docs\/enable-open-api-endpoints-in-proc.md](url)\r\n\r\n1. Installed the lib on my project v0.8.1-preview. Code snippets from my csproj\r\n`\r\n<TargetFramework>netcoreapp3.1<\/TargetFramework>\r\n<PackageReference Include=\"Microsoft.Azure.WebJobs.Extensions.OpenApi\" Version=\"0.8.1-preview\" \/>`\r\n\r\n2. The class I'm trying to test looks like this. (sorry for the screenshot).\r\n_The class and the functions are not static. Do I have to have the rest of the functions marked as ignore? Bc they are not. Only this one has the decorators, Just in case._ \r\n![image](https:\/\/user-images.githubusercontent.com\/11277680\/129846161-673ff0c1-4a1e-43bd-bdaa-d45a78fa16b3.png)\r\n\r\n3. Run the functions app on my http:\/\/localhost:7071\r\n4. Navigate to http:\/\/localhost:7071\/api\/swagger\/ui\r\n5. Then the console throws the assembly error and the ui says error\r\n\r\nThanks @justinyoo \r\n\r\n\r\n","issue_id":1660276102422,"origin_id":900841520,"user_origin_id":11277680,"create_time":1629266980,"update_time":1629267090,"id":1669462662339,"updated_at":"2022-11-26T11:37:42.338000Z","created_at":"2022-11-26T11:37:42.338000Z"},{"_id":"6381fa864b97542c9a3208d4","body":"@alinapach Could you confirm whether your `bin\/Debug\/netcoreapp3.1` and `bin\/Debug\/netcoreapp3.1\/bin` directories have only one `*.deps.json` file or multiple `*.deps.json` files?","issue_id":1660276102422,"origin_id":912670117,"user_origin_id":1538528,"create_time":1630687263,"update_time":1630687296,"id":1669462662342,"updated_at":"2022-11-26T11:37:42.342000Z","created_at":"2022-11-26T11:37:42.342000Z"},{"_id":"6381fa864b97542c9a3208d6","body":"Getting this on my end as well.\r\nI'm able to reproduce just by using the starter that visual studio provides and removing all of the static keywords","issue_id":1660276102422,"origin_id":916463526,"user_origin_id":85189792,"create_time":1631224391,"update_time":1631224512,"id":1669462662346,"updated_at":"2022-11-26T11:37:42.345000Z","created_at":"2022-11-26T11:37:42.345000Z"},{"_id":"6381fa864b97542c9a3208d7","body":"There are possibly two causes on this issue:\r\n\r\n1. If there are multiple `*.deps.json` files within your `bin\/Debug\/netcoreapp3.1` or `bin\/Debug\/netcoreapp3.1\/bin` directory, it might be the one, as mentioned above.\r\n2. Try this approach on your `.csproj` file, which is **a sort of official workaround** for the time being:\r\n\r\n ```xml\r\n <PropertyGroup>\r\n ...\r\n <_FunctionsSkipCleanOutput>true<\/_FunctionsSkipCleanOutput>\r\n <\/PropertyGroup>\r\n ```","issue_id":1660276102422,"origin_id":916469861,"user_origin_id":1538528,"create_time":1631224823,"update_time":1631224823,"id":1669462662348,"updated_at":"2022-11-26T11:37:42.348000Z","created_at":"2022-11-26T11:37:42.348000Z"},{"_id":"6381fa864b97542c9a3208d9","body":"> There are possibly two causes on this issue:\r\n> \r\n> 1. If there are multiple `*.deps.json` files within your `bin\/Debug\/netcoreapp3.1` or `bin\/Debug\/netcoreapp3.1\/bin` directory, it might be the one, as mentioned above.\r\n> 2. Try this approach on your `.csproj` file, which is **a sort of official workaround** for the time being:\r\n> ```\r\n> <PropertyGroup>\r\n> ...\r\n> <_FunctionsSkipCleanOutput>true<\/_FunctionsSkipCleanOutput>\r\n> <\/PropertyGroup>\r\n> ```\r\n\r\nIt is easy to reproduce the bug, and the _FunctionsSkipCleanOutput didn't work for me.\r\n\r\nsteps:\r\n1. follow the article https:\/\/techcommunity.microsoft.com\/t5\/apps-on-azure\/create-and-publish-openapi-enabled-azure-functions-with-visual\/ba-p\/2381067 to create a template project with OpenApi 0.7.2-preview.\r\n2. change the openapi to 0.8.1-preview (optional)\r\n2. add `<PackageReference Include=\"Microsoft.Azure.WebJobs.Extensions.Http\" Version=\"3.0.12\" \/>` to the project.\r\n3. press F5 to start debugging, then visit http:\/\/localhost:7071\/api\/swagger\/ui you will get error `Could not load file or assembly 'Microsoft.Azure.WebJobs.Extensions.Http, Version=3.0.12.0`\r\n4. add `<_FunctionsSkipCleanOutput>true<\/_FunctionsSkipCleanOutput>` to the project\r\n5. visit http:\/\/localhost:7071\/api\/swagger\/ui again, it seems work and the assembly is fine right now. but you will get `No operations defined in spec!` which mean there is nothing in the openapi document.\r\n\r\nWe did some research and find out it could be this [code](https:\/\/github.com\/Azure\/azure-functions-openapi-extension\/blob\/6520c5fac9d673ededc20f8e138adeff24c5560d\/src\/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core\/Extensions\/DocumentHelperExtensions.cs#L36)\r\n`Where(p => p.GetParameters().FirstOrDefault(q => q.ExistsCustomAttribute<HttpTriggerAttribute>()) != null)`\r\nHttpTriggerAttribute may have 3.0.2 and 3.0.12 conflict.\r\n\r\nA possible solution for me is to downgrade Microsoft.Azure.WebJobs.Extensions.Http to 3.0.2\r\n\r\nWish my practice can help.\r\n","issue_id":1660276102422,"origin_id":916731185,"user_origin_id":75244582,"create_time":1631262717,"update_time":1631263254,"id":1669462662352,"updated_at":"2022-11-26T11:37:42.352000Z","created_at":"2022-11-26T11:37:42.352000Z"},{"_id":"6381fa864b97542c9a3208da","body":"> > There are possibly two causes on this issue:\r\n> > \r\n> > 1. If there are multiple `*.deps.json` files within your `bin\/Debug\/netcoreapp3.1` or `bin\/Debug\/netcoreapp3.1\/bin` directory, it might be the one, as mentioned above.\r\n> > 2. Try this approach on your `.csproj` file, which is **a sort of official workaround** for the time being:\r\n> > ```\r\n> > <PropertyGroup>\r\n> > ...\r\n> > <_FunctionsSkipCleanOutput>true<\/_FunctionsSkipCleanOutput>\r\n> > <\/PropertyGroup>\r\n> > ```\r\n> \r\n> It is easy to reproduce the bug, and the _FunctionsSkipCleanOutput didn't work for me.\r\n> \r\n> steps:\r\n> \r\n> 1. follow the article https:\/\/techcommunity.microsoft.com\/t5\/apps-on-azure\/create-and-publish-openapi-enabled-azure-functions-with-visual\/ba-p\/2381067 to create a template project with OpenApi 0.7.2-preview.\r\n> 2. change the openapi to 0.8.1-preview (optional)\r\n> 3. add `<PackageReference Include=\"Microsoft.Azure.WebJobs.Extensions.Http\" Version=\"3.0.12\" \/>` to the project.\r\n> 4. press F5 to start debugging, then visit http:\/\/localhost:7071\/api\/swagger\/ui you will get error `Could not load file or assembly 'Microsoft.Azure.WebJobs.Extensions.Http, Version=3.0.12.0`\r\n> 5. add `<_FunctionsSkipCleanOutput>true<\/_FunctionsSkipCleanOutput>` to the project\r\n> 6. visit http:\/\/localhost:7071\/api\/swagger\/ui again, it seems work and the assembly is fine right now. but you will get `No operations defined in spec!` which mean there is nothing in the openapi document.\r\n> \r\n> We did some research and find out it could be this [code](https:\/\/github.com\/Azure\/azure-functions-openapi-extension\/blob\/6520c5fac9d673ededc20f8e138adeff24c5560d\/src\/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core\/Extensions\/DocumentHelperExtensions.cs#L36)\r\n> `Where(p => p.GetParameters().FirstOrDefault(q => q.ExistsCustomAttribute<HttpTriggerAttribute>()) != null)`\r\n> HttpTriggerAttribute may have 3.0.2 and 3.0.12 conflict.\r\n> \r\n> A possible solution for me is to downgrade Microsoft.Azure.WebJobs.Extensions.Http to 3.0.2\r\n> \r\n> Wish my practice can help.\r\n\r\nThis exactly. I was able to resolve my issues when I removed a package reference that used 3.0.12. (In this case, I was using a third-party package to generate open api documents in the past and we were migrating to this package because of another bug...) When I removed the package, all references were downgraded to 3.0.2 and my problems went away","issue_id":1660276102422,"origin_id":916914473,"user_origin_id":85189792,"create_time":1631281370,"update_time":1631281370,"id":1669462662355,"updated_at":"2022-11-26T11:37:42.355000Z","created_at":"2022-11-26T11:37:42.355000Z"},{"_id":"6381fa864b97542c9a3208db","body":"> > There are possibly two causes on this issue:\r\n> > \r\n> > 1. If there are multiple `*.deps.json` files within your `bin\/Debug\/netcoreapp3.1` or `bin\/Debug\/netcoreapp3.1\/bin` directory, it might be the one, as mentioned above.\r\n> > 2. Try this approach on your `.csproj` file, which is **a sort of official workaround** for the time being:\r\n> > ```\r\n> > <PropertyGroup>\r\n> > ...\r\n> > <_FunctionsSkipCleanOutput>true<\/_FunctionsSkipCleanOutput>\r\n> > <\/PropertyGroup>\r\n> > ```\r\n> \r\n> It is easy to reproduce the bug, and the _FunctionsSkipCleanOutput didn't work for me.\r\n> \r\n> steps:\r\n> \r\n> 1. follow the article https:\/\/techcommunity.microsoft.com\/t5\/apps-on-azure\/create-and-publish-openapi-enabled-azure-functions-with-visual\/ba-p\/2381067 to create a template project with OpenApi 0.7.2-preview.\r\n> 2. change the openapi to 0.8.1-preview (optional)\r\n> 3. add `<PackageReference Include=\"Microsoft.Azure.WebJobs.Extensions.Http\" Version=\"3.0.12\" \/>` to the project.\r\n> 4. press F5 to start debugging, then visit http:\/\/localhost:7071\/api\/swagger\/ui you will get error `Could not load file or assembly 'Microsoft.Azure.WebJobs.Extensions.Http, Version=3.0.12.0`\r\n> 5. add `<_FunctionsSkipCleanOutput>true<\/_FunctionsSkipCleanOutput>` to the project\r\n> 6. visit http:\/\/localhost:7071\/api\/swagger\/ui again, it seems work and the assembly is fine right now. but you will get `No operations defined in spec!` which mean there is nothing in the openapi document.\r\n> \r\n> We did some research and find out it could be this [code](https:\/\/github.com\/Azure\/azure-functions-openapi-extension\/blob\/6520c5fac9d673ededc20f8e138adeff24c5560d\/src\/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core\/Extensions\/DocumentHelperExtensions.cs#L36) `Where(p => p.GetParameters().FirstOrDefault(q => q.ExistsCustomAttribute<HttpTriggerAttribute>()) != null)` HttpTriggerAttribute may have 3.0.2 and 3.0.12 conflict.\r\n> \r\n> A possible solution for me is to downgrade Microsoft.Azure.WebJobs.Extensions.Http to 3.0.2\r\n> \r\n> Wish my practice can help.\r\n\r\nHow do you know the API conflicts?","issue_id":1660276102422,"origin_id":1054233945,"user_origin_id":47079990,"create_time":1646053353,"update_time":1646053353,"id":1669462662359,"updated_at":"2022-11-26T11:37:42.358000Z","created_at":"2022-11-26T11:37:42.358000Z"}] comment

I'm using 0.7.2-preview version and I get this error when I go to URL `/swagger/ui` ![image](https://user-images.githubusercontent.com/20638666/127287527-4966f428-9da9-4832-af9e-345155b5dcca.png) The assemble is available in _bin/Debug/netcore3.1/_ directory but not in _bin/Debug/netcore3.1/bin/_. I tried manually...

OpenApiRequestBodyAttribute Example parameter is ignored

[{"_id":"662f3a88d8e74d79d1056823","body":"I was having similar issues. Eventually determined (thanks to #106) that v2 just doesn't support it without using `OpenApiExampleAttribute`, and setting `OpenApiVersion` to `OpenApiVersionType.V3` in my config options forced `swagger.json` to use the v3 OAS instead of the v2 it defaults to.","issue_id":1660276102424,"origin_id":1947641115,"user_origin_id":17701655,"create_time":1708048638,"update_time":1708048638,"id":1714371208090,"updated_at":"2024-04-29T06:13:28.089000Z","created_at":"2024-04-29T06:13:28.089000Z"}] comment

The example object used for the Example parameter in OpenApiRequestBodyAttribute appears ignored. I've added the OpenApiRequestBodyAttribute to an HTTP trigger function as below: `[OpenApiRequestBody("application/json", typeof(Trip), Required = true, Example =...

An optional string parameter is not passed correctly by swagger ui

[{"_id":"6381fbbb4b97542c9a320a08","body":"@GilShalit Thanks for the issue! I'll take a look.","issue_id":1660276102427,"origin_id":953366886,"user_origin_id":1538528,"create_time":1635375040,"update_time":1635375040,"id":1669462971285,"updated_at":"2022-11-26T11:42:51.285000Z","created_at":"2022-11-26T11:42:51.285000Z"},{"_id":"6381fbbb4b97542c9a320a09","body":"Hi, This is still happening in OpenAPI 1.0.0 on .Net 6 :-\\\r\n\r\nThank you for your work!","issue_id":1660276102427,"origin_id":972976521,"user_origin_id":34002589,"create_time":1637249596,"update_time":1637249596,"id":1669462971290,"updated_at":"2022-11-26T11:42:51.290000Z","created_at":"2022-11-26T11:42:51.290000Z"},{"_id":"6381fbbb4b97542c9a320a0a","body":"Still the case in v1.1.0\r\nCode by TS is the way to reproduce","issue_id":1660276102427,"origin_id":1048762527,"user_origin_id":11781825,"create_time":1645621590,"update_time":1645621590,"id":1669462971293,"updated_at":"2022-11-26T11:42:51.293000Z","created_at":"2022-11-26T11:42:51.293000Z"},{"_id":"6381fbbb4b97542c9a320a0b","body":"I checked the OpenAPI spec (v3.0.1) about this: https:\/\/github.com\/OAI\/OpenAPI-Specification\/blob\/main\/versions\/3.0.1.md#paths-object\r\n\r\nUnfortunately, the spec doesn't support the wildcard characters in the path template. In other words, if you declare path template, the path part MUST be required value, not optional - it MUST NOT be nullable.","issue_id":1660276102427,"origin_id":1049489055,"user_origin_id":1538528,"create_time":1645677618,"update_time":1645677618,"id":1669462971296,"updated_at":"2022-11-26T11:42:51.296000Z","created_at":"2022-11-26T11:42:51.296000Z"}] comment

An Azure function (V3) is declared with an optional string parameter. it is sent incorrectly to the function from the swagger UI regardless if the parameter is specified or left...

resolved
triage

Auto-generate swagger.json

[{"_id":"6381f7065ae95c7a223161a4","body":"I second that request, as we need the _static_ file to be present for NSwag to generate our clients during CI\/CD.","issue_id":1660276102432,"origin_id":1012042038,"user_origin_id":6885003,"create_time":1642072722,"update_time":1642072722,"id":1669461766667,"updated_at":"2022-11-26T11:22:46.667000Z","created_at":"2022-11-26T11:22:46.667000Z"},{"_id":"6381f7065ae95c7a223161a5","body":"@wis3guy I bypass this limitation by running the function locally (during CI build) with docker compose and azurite container. Then I provide `http:\/\/myapp\/api\/swagger.json` to NSwag. ","issue_id":1660276102432,"origin_id":1012298120,"user_origin_id":6664858,"create_time":1642091236,"update_time":1642091236,"id":1669461766672,"updated_at":"2022-11-26T11:22:46.671000Z","created_at":"2022-11-26T11:22:46.671000Z"},{"_id":"6381f7065ae95c7a223161a6","body":"This sound very similar to #58","issue_id":1660276102432,"origin_id":1028899371,"user_origin_id":4662023,"create_time":1643887930,"update_time":1643887930,"id":1669461766675,"updated_at":"2022-11-26T11:22:46.675000Z","created_at":"2022-11-26T11:22:46.675000Z"},{"_id":"6381f7065ae95c7a223161a7","body":"@jvmlet Thanks for the issue! Yes, we're aware of that, but it's de-priotised over other issues. Let's keep this open for further discussion.","issue_id":1660276102432,"origin_id":1038577166,"user_origin_id":1538528,"create_time":1644807829,"update_time":1644807829,"id":1669461766679,"updated_at":"2022-11-26T11:22:46.679000Z","created_at":"2022-11-26T11:22:46.679000Z"},{"_id":"6381f7065ae95c7a223161a8","body":"Related: #343 ","issue_id":1660276102432,"origin_id":1038577448,"user_origin_id":1538528,"create_time":1644807855,"update_time":1644807855,"id":1669461766682,"updated_at":"2022-11-26T11:22:46.681000Z","created_at":"2022-11-26T11:22:46.681000Z"},{"_id":"6381f7065ae95c7a223161a9","body":"As the PR, #489, has been merged, you can generate the OpenAPI doc on-the-fly, within the GitHub Actions workflow.\r\n","issue_id":1660276102432,"origin_id":1251955894,"user_origin_id":1538528,"create_time":1663659181,"update_time":1663659181,"id":1669461766685,"updated_at":"2022-11-26T11:22:46.684000Z","created_at":"2022-11-26T11:22:46.684000Z"}] comment

Would you please provide the sample of how to auto-generate `swagger.json` **during build** to use it for clients/dtos bindings generation for different languages later. I see `Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI` project that looks...

enhancement
discussion

Build method gives Object Reference exception when called with Assembly.GetExecutingAssembly()

[{"_id":"638208cabc25e83db00bfcae","body":"@SapnaSoni123 Thanks for the issue! It's a known issue the CLI project. But it's de-priotised over other issues. Let's keep this issue open for further discussion.","issue_id":1660276102436,"origin_id":1038576188,"user_origin_id":1538528,"create_time":1644807723,"update_time":1644807723,"id":1669466314980,"updated_at":"2022-11-26T12:38:34.980000Z","created_at":"2022-11-26T12:38:34.980000Z"},{"_id":"638208cabc25e83db00bfcaf","body":"As the PR, #489, has been merged, you can generate the OpenAPI doc on-the-fly, within the GitHub Actions workflow.\r\n","issue_id":1660276102436,"origin_id":1251959483,"user_origin_id":1538528,"create_time":1663659400,"update_time":1663659400,"id":1669466314984,"updated_at":"2022-11-26T12:38:34.983000Z","created_at":"2022-11-26T12:38:34.983000Z"}] comment

Hi, I have written unit tests to check if the Open API document is getting generated successfully or not. The method is as below: async Task CoreAsync() { var helper...

bug
discussion

feature request OpenApiExample for interface

[{"_id":"6381fa7370db72139b12ad08","body":"@AT-OSWORKS Thanks for the issue! Would you please elaborate the request with some examples? I'm not sure how an interface is used to provide an example.","issue_id":1660276102438,"origin_id":1035910191,"user_origin_id":1538528,"create_time":1644559907,"update_time":1644559907,"id":1669462643617,"updated_at":"2022-11-26T11:37:23.617000Z","created_at":"2022-11-26T11:37:23.617000Z"}] comment

It would be great if I could define example for an interface. Unfortunately the OpenApExampleAttribe can be used only with a class. Can you add the AttributeTargets.Interface to the attribute...

discussion

Feature Request: Add Metadata to All/Multiple Functions At Once

[{"_id":"6382003570db72139b12b457","body":"@jhartman-resurgent Thanks for the idea! It looks brilliant. At this moment, I'm not able to guarantee whether this idea is implemented soon or not, but let's keep this discussion open.","issue_id":1660276102441,"origin_id":1035862754,"user_origin_id":1538528,"create_time":1644551890,"update_time":1644551890,"id":1669464117036,"updated_at":"2022-11-26T12:01:57.036000Z","created_at":"2022-11-26T12:01:57.036000Z"}] comment

I currently have to add an OpenApiSecurity attribute to every function, even though they are all the same. I would like to be able to add metadata to functions using...

enhancement
discussion