yuka1984 / azure-functions-extensions-swashbuckle

MIT License
33 stars 29 forks source link

Customize Swagger page with Azure Functions v. 3 #44

Open erossini opened 4 years ago

erossini commented 4 years ago

Great job! I'm using your extension with Azure Functions v. 3 and I don't face any issue.

image

I want to customize the Swagger page, for example the title. I read a post where it explains how to add some configuration but it doesn't work for me.

Basically, I added some json in the host.json

{
  "version": "2.0",
  "extensions": {
    ...

    "Swashbuckle": {
      "Documents": [
        {
          "Title": "YOUR_TITLE",
          "Version": "v1",
          "Description": "YOUR_DESCRIPTION"
        }
      ]
    }
  }
}

What is the right think to do? Thank you!

erossini commented 4 years ago

PS: I redeployed the Azure Functions on Azure and now I have an error

{
  "schemaValidationMessages": [
    {
      "level": "error",
      "message": "Can't read from file https://azuks-myfnz-q001.azurewebsites.net/api/swagger/json?code="
    }
  ]
}

I haven't changed the Startup file. When I published, I deleted existing files

vitalybibikov commented 4 years ago

Hi @erossini guess it is supported only here at the moment. (v3 functions ) As this repo is abandoned

https://github.com/vitalybibikov/azure-functions-extensions-swashbuckle

You will find all the docs there