Sections in Azure App configuration as in appsettings.json

Do you have some Application settings in appsettings.json for App Service (or Azure Function) structured in sections? And do you know how to set up same structure as Application settings in Azure?

It’s easy – just write Application settings Key in format Section:MyAttribute

for appsettings.json:

{
  "myGreatApi": {
    "baseUrl": "https://localhost:7071/api/",
    "version": 2,
  }
}

will Application settings look like:

myGreatApi:baseUrl
myGreatApi:version

Napsat komentář

Vaše emailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *