Comments (8)
@justinyoo, the new version (v0.6.0-preview) did NOT resolved my problem!
from azure-functions-openapi-extension.
@marceloodiniz Unfortunately, I'm not able to reproduce your issue on my end.
Here's the screenshot I presented at Global Integration Bootcamp about less than a month ago, which uses the same v0.5.1-preview.
Can you please try the sample code in this repo and check if it's working or not on your end?
from azure-functions-openapi-extension.
Hi @justinyoo.
I get the sample project and have the same problem:
If I change the swagger.json url on Swagger UI to use HTTPS, it works:
Maybe is some config on Function App.
from azure-functions-openapi-extension.
Same issue here
from azure-functions-openapi-extension.
@marceloodiniz Thanks for the issue! A new version, v0.6.0-preview, has been released and if I use the new version, it sorts out your issue from my end. Could you please have a look and let us know?
from azure-functions-openapi-extension.
@marceloodiniz As I haven't heard from you for a while, I'm closing this issue for now. If you still have the same issue, please open a new one and link to this.
from azure-functions-openapi-extension.
@justinyoo, I am having the same issue and narrowed the cause down to running a function app on a Linux hosted app service plan.
Here is what I found:
- Windows Consumption Plan - Success
- Linux Consumption Plan - Success
- Linux Hosted Plan (P1v2) - Failure
You can see the error here:
https://openapitestl.azurewebsites.net/api/swagger/ui
I used the same function code on each plan. It is the Function1 template that is created by Visual Studio (2019) when picking the Http trigger with OpenAPI option.
public static class Function1
{
[FunctionName("Function1")]
[OpenApiOperation(operationId: "Run", tags: new[] { "name" })]
[OpenApiSecurity("function_key", SecuritySchemeType.ApiKey, Name = "code", In = OpenApiSecurityLocationType.Query)]
[OpenApiParameter(name: "name", In = ParameterLocation.Query, Required = true, Type = typeof(string), Description = "The **Name** parameter")]
[OpenApiResponseWithBody(statusCode: HttpStatusCode.OK, contentType: "text/plain", bodyType: typeof(string), Description = "The OK response")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
log.LogInformation("C# HTTP trigger function processed a request.");
string name = req.Query["name"];
string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
dynamic data = JsonConvert.DeserializeObject(requestBody);
name = name ?? data?.name;
string responseMessage = string.IsNullOrEmpty(name)
? "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response."
: $"Hello, {name}. This HTTP triggered function executed successfully.";
return new OkObjectResult(responseMessage);
}
}
from azure-functions-openapi-extension.
@mikemassa84 Thanks for the issue! It seems that we would need to raise the issue to the other place because it looks more relevant to the instance itself, rather than this library. Would you please raise the issue to here and tag this issue?
from azure-functions-openapi-extension.
Related Issues (20)
- Microsoft.Azure.Functions.Worker.Extensions.OpenApi throws System.IO.FileNotFoundException HOT 2
- Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore support HOT 1
- .NET 8, Function Decorators Not Recognized HOT 27
- Loading types from referenced dll's should be optional, very poor performance of generating swagger document for large projects.
- .NET 8 isolated process - "The type or namespace name 'Azure' does not exist..." HOT 1
- Cannot Generate Open API swagger.json file if inheriting from ITableEntity From Azure.Data.Tables HOT 1
- Support for X-Forwarded-Host HOT 2
- Ordering tags alphanumerically
- IOpenApiHttpTriggerAuthorization requires IHttpRequestDataObject but function has HttpRequestData
- Support Specification Extensions HOT 1
- Setting the base url in isolated worker azure function HOT 2
- Add more options to control exposed Swagger endpoints HOT 1
- .NET framework Isolated - The system cannot find the file specified.
- No way to add example to a parameter definition using attributes - OpenApiParameterAttribute does not support all properties of Microsoft.OpenApi.Models OpenApiParameter
- Easy Auth enabled on Azure portal for function app not allowed to exposed Swagger endpoints
- Future of this project? HOT 3
- Adding custom attribute to the openAPI endpoints possible?
- Documentation: Update .ConfigureFunctionsWorkerDefaults(...) to be .ConfigureFunctionsWebApplication(...)
- Synchronous operations are disallowed HOT 1
- Generate OpenApi swagger at build time. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-functions-openapi-extension.