Description
Ensure AppService
is identical to StaticWebApp
The goal is to ensure AppService
is identical to StaticWebApp
because we want to stop using StaticWebApp
and start using AppService
.
data-api-builder/src/Config/ObjectModel/EasyAuthType.cs
Lines 6 to 10 in ebbe989
Modify the Engine default references to StaticWebApps
These references are scattered throughout the codebase. We're shifting to AppService
as the default, so wherever StaticWebApps
appears in code or comments, it should be updated. We're not removing support for StaticWebApps
, just removing it as the default.
Comment example:
Code example:
Modify the CLI default references to StaticWebApps
This primarily applies to dab init
. The goal is to ensure the CLI no longer defaults to StaticWebApps
as the auth provider but to AppService
. Users can still configure StaticWebApps
, but they must do so manually.
Modify the JSON Schema
Update the schema to change the default value to AppService
.
data-api-builder/schemas/dab.draft.schema.json
Lines 275 to 283 in ebbe989
Also update the schema to restrict the provider property to only supported values (including StaticWebApps
).
Modify DAB Validate
Update ValidateAuthenticationOptions
to log a warning if the runtime host is set to StaticWebApps
.
if (Enum.TryParse<EasyAuthType>(runtimeConfig.Runtime.Host.Authentication.Provider, ignoreCase: true, out var provider) &&
provider == EasyAuthType.StaticWebApps)
{
_logger.LogWarning("The 'StaticWebApps' authentication provider is deprecated.");
}
Modify DAB Init
Ensure dab init
generates a config functionally identical to before. However, the default provider should now be AppService
instead of StaticWebApps
.
data-api-builder/src/Cli/Commands/InitOptions.cs
Lines 91 to 92 in ebbe989