-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
767c417
commit ad82fe8
Showing
5 changed files
with
48 additions
and
52 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
using CommandLine; | ||
using Umbraco.Cms.Core.Configuration.Models; | ||
|
||
await Parser.Default.ParseArguments<Options>(args).WithParsedAsync(async options => | ||
{ | ||
// Generate CMS schema | ||
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()); | ||
}); |
This file contains 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
This file contains 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