2
votes

I have deployed ASP.NETCore 2.1 code into Azure App Service with Basic Authentication. After that I have imported this API App into Azure API Management, then I can see all API actions in GUID format instead of original operations.

And tried to import the Azure API using Open API Specification, then it is giving the below error.

The OpenAPI specification of this demo-api-dev App should contain 'host' value.

So, can anyone suggest on this

1
We need more info, to understand your problem. Do you use Swagger in your API App Service? Do you have an host value in your OpenAPI file?nmbrphi
@nmbrphi, Yes, I'm using Swagger for my API.Pradeep
the openAPI file generated from swashbuckle is reacheable anonymously? Do this OpenAPI file have a property named 'host'? if so, is its value is correct?nmbrphi

1 Answers

0
votes

I think the core issue here is that Swashbuckle doesn't auto-generate the host value in the Swagger file. I think the answer for this issue will be the same as the answer to this related question

Effectively, we need to give Swashbuckle a few more hints about configuring itself by giving it an IDocumentFilter.