This commit is contained in:
Bjarke Berg
2021-06-25 10:56:49 +02:00
parent c170123f3a
commit 7449bf2947
5 changed files with 4 additions and 34 deletions

View File

@@ -216,16 +216,11 @@
Write-Host "Generating JSON Schema for AppSettings"
Write-Host "Logging to $($this.BuildTemp)\json.schema.log"
## NOTE: Need to specify the outputfile
## As this path is now relative to the 'build' folder we are in and not from the JsonSchema project
##
## src/Umbraco.Web.UI.NetCore/umbraco/config/appsettings-schema.json
## NOTE: Need to specify the outputfile to point to the build temp folder
&dotnet run --project "$($this.SolutionRoot)\src\JsonSchema\JsonSchema.csproj" `
--verbosity detailed `
-c Release > "$($this.BuildTemp)\json.schema.log" `
-- `
--outputFile "$($this.BuildTemp)\WebApp\umbraco\config\appsettings-schema.json"
})
$ubuild.DefineMethod("PrepareTests",

View File

@@ -59,6 +59,9 @@ namespace JsonSchema
public Umbraco.Forms.Core.Configuration.SecuritySettings Security { get; set; }
public FieldTypesDefinition FieldTypes { get; set; }
/// <summary>
/// Configurations for the Umbraco Forms Field Types
/// </summary>
public class FieldTypesDefinition
{
public DatePickerSettings DatePicker { get; set; }

View File

@@ -1,24 +0,0 @@
using System.Collections.Generic;
using NJsonSchema;
namespace JsonSchema
{
/// <summary>
/// Prefixes all definitions with the injected prefix.
/// </summary>
public class PrefixedTypeNameGenerator : DefaultTypeNameGenerator
{
private readonly string _definitionPrefix;
/// <summary>
/// Creates a new instance of <see cref="PrefixedTypeNameGenerator"/>.
/// </summary>
/// <param name="definitionPrefix">The prefix to use.</param>
public PrefixedTypeNameGenerator(string definitionPrefix) => _definitionPrefix = definitionPrefix;
/// <inheritdoc />
public override string Generate(NJsonSchema.JsonSchema schema, string typeNameHint, IEnumerable<string> reservedTypeNames)
=> $"{_definitionPrefix}{base.Generate(schema, typeNameHint, reservedTypeNames)}";
}
}

View File

@@ -1,8 +1,6 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.
using Umbraco.Cms.Core.Configuration.Models;
namespace Umbraco.Cms.Core.Configuration.Models
{
/// <summary>

View File

@@ -1,8 +1,6 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.
using Umbraco.Cms.Core.Configuration.Models;
namespace Umbraco.Cms.Core.Configuration.Models
{
/// <summary>