* Simplify JSON schema and only generate appsettings-schema.Umbraco.Cms.json * Use Umbraco.JsonSchema.Extensions to dynamically add JSON schema references * Move DependentUpon items to shared MSBuild props * Update LangVersion to latest * Update Umbraco.GitVersioning.Extensions to 0.2.0 * Remove JSON schemas on clean * Remove Umbraco.JsonSchema.Core project * Fix JSON schema nullability * Ignore additional JSON schema files in template * Update CompatibilitySuppressions.xml * Remove GlobalSettings.UmbracoPath from JSON schema again * Remove RemoveUmbracoJsonSchemaFiles target * Update Umbraco.JsonSchema.Extensions to 0.2.0 and add weights * Flatten generated JSON schema hierarchy * Remove LicensesSettings from CMS codebase * Change AdditionalParameters to IDictionary
15 lines
626 B
C#
15 lines
626 B
C#
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());
|
|
});
|