v14: JSON schema tool improvements (#16035)
* Use require modifier instead of setting null-suppressed default values * Only remove read-only properties when IgnoreReadOnlyProperties is set * Obsolete UmbracoPath property and remove work-around for obsolete setter
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using CommandLine;
|
||||
using Umbraco.Cms.Core.Configuration.Models;
|
||||
|
||||
await Parser.Default.ParseArguments<Options>(args).WithParsedAsync(async options =>
|
||||
{
|
||||
@@ -7,8 +6,5 @@ await Parser.Default.ParseArguments<Options>(args).WithParsedAsync(async options
|
||||
var jsonSchemaGenerator = new UmbracoJsonSchemaGenerator();
|
||||
var jsonSchema = jsonSchemaGenerator.Generate(typeof(UmbracoCmsSchema));
|
||||
|
||||
// TODO: When the UmbracoPath setter is removed from GlobalSettings (scheduled for V12), remove this line as well
|
||||
jsonSchema.Definitions[nameof(GlobalSettings)]?.Properties?.Remove(nameof(GlobalSettings.UmbracoPath));
|
||||
|
||||
await File.WriteAllTextAsync(options.OutputFile, jsonSchema.ToJson());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user