Repository navigation
Stop marking appsettings schema settings as required - #102
Merged
ronaldbarendse merged 1 commit intoNov 26, 2026
Merged
Conversation
ronaldbarendse
deleted the
bugfix/appsettings-schema-required-settings
branch
November 26, 2026 23:13
This was referenced Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #101.
The appsettings schemas generated since the move from hand-written schemas mark the
Umbraco,Storage,CdnandAzureBlobnodes asrequired(from the C#requiredmodifier on the schema wrapper types), andCdn:UrlandAzureBlob:{name}:VirtualPathtoo. Configuration is layered across appsettings files and environment variables, so any file that doesn't contain every Storage Providers setting, like anappsettings.Production.jsonthat only overrides a few CMS settings, gets a validation warning on the wholeUmbraconode.Umbraco.JsonSchema.Extensions 0.6.0 switches
JsonSchemaGenerateto the System.Text.JsonJsonSchemaExporterand no longer marks any property asrequiredby default (umbraco/Umbraco.JsonSchema.Extensions#18). Updating to it is the whole fix: the C#requiredmodifiers and[Required]attributes stay, so missing or empty settings are still reported at startup by options validation.Changes to the generated schemas
requiredanywhere.definitions, and the roottitleis gone.Cdn:Urlno longer hasminLength: 1;format: uristill flags an empty value in editors.How to verify
Build the solution and check the generated
appsettings-schema.Umbraco.StorageProviders.jsonandappsettings-schema.Umbraco.StorageProviders.AzureBlob.jsoncontain norequired. Then validate these files against the schemas (e.g. in VS Code via the test site'sappsettings-schema.json):appsettings.Production.json(noStoragenode)StoragerequiredCdnwith onlyRemoveMediaFromPathUrlrequiredAzureBlob:MediawithoutVirtualPath(set in code for media)VirtualPathrequiredAzureBlob:Mediawith onlyContainerNameVirtualPathrequiredCdn:Urlset to a numberAzureBlob:Media:Retry:Modeset to"Linear"I also built
release/18.1.0andrelease/19.0.0with the same update: both build without errors and generate schemas withoutrequiredthat pass the same cases, so this can be merged forward as is.Risks
Build-time only: the package is a global, private build dependency, so nothing changes for sites at runtime. The
JsonSchemaGeneratetask in 0.6.0 needs the .NET 10 SDK or MSBuild 18, which this branch already requires for 0.5.0.