{ "$schema": "http://json-schema.org/draft-04/schema", "title": "appsettings.StormPetrel.json file schema", "description": "See more details in Configuration Documentation: https://github.com/Scandltd/storm-petrel/blob/main/generator/README.md#configuration", "type": "object", "definitions": { "targetProjectGeneratorExpression": { "type": "string", "description": "[optional] string, configures the default `Generator`. An expression for the `IGenerator` instance." }, "generatorConfig": { "type": [ "object", "null" ], "description": "[optional] object to configure `Generator` behavior.", "properties": { "BackuperExpression": { "type": [ "string", "null" ], "description": "[optional] string, instantiates `GeneratorBackuper` by default. An expression for the `IGeneratorBackuper` instance. Set to 'null' to skip creating backup files." }, "DumperExpression": { "type": "string", "description": "[optional] string, instantiates `GeneratorDumper` by default. An expression for the `IGeneratorDumper` instance." }, "RewriterExpression": { "type": "string", "description": "[optional] string, instantiates `GeneratorRewriter` by default. An expression for the `IGeneratorRewriter` instance." } } }, "isDisabled": { "type": "boolean", "description": "[optional] boolean, false is by default. Indicates whether the generator should create 'StormPetrel' classes. Even if set to 'false', the generator still adds classes like 'IGeneratorDumper', 'GeneratorDumper' to avoid test project compilation failures in the case when custom classes uses them." }, "ignoreFilePathRegex": { "type": [ "string", "null" ], "description": "[optional] string, empty by default. Regular Expression to exclude certain paths from 'StormPetrel' class generation." }, "ignoreInvocationExpressionRegex": { "type": [ "string", "null" ], "description": "[optional] string, empty by default. Regular Expression to detect invocation expressions to not execute StormPetrel rewriting for." }, "isAddNullableEnable": { "type": "boolean", "description": "[optional] boolean, true is by default. Indicates whether the generator should add `#nullable enable` and related directives under `#if !NETFRAMEWORK || SCAND_STORM_PETREL_NULLABLE_ENABLE` condition to auto-generated StormPetrel' files. This allows to avoid related compiler warnings/errors since auto-generated code has nullable reference types disabled regardless project global settings." }, "testVariablePairConfigs": { "type": "array", "items": { "type": "object", "properties": { "ActualVarNameTokenRegex": { "type": [ "string", "null" ], "description": "Default configuration object. Assumes variable pair names like (expected, actual), (myExpected, myActual), (expectedOne, actualOne), (ExpectedTwo, ActualTwo), etc." }, "ExpectedVarNameTokenRegex": { "type": [ "string", "null" ], "description": "Corresponds to the `ActualVarNameTokenRegex` for pairing." } } }, "description": "[optional] array of objects. Configures naming pairs for actual/expected variables to generate correct expected baselines." }, "serilog": { "type": [ "object", "null" ], "description": "[optional] Logging configuration using Serilog. Defaults to logging warnings to the test project's Logs folder. Set to 'null' to disable logging. Use the '{StormPetrelRootPath}' token to indicate the target test project root path." } }, "properties": { "TargetProjectGeneratorExpression": { "$ref": "#/definitions/targetProjectGeneratorExpression" }, "GeneratorConfig": { "$ref": "#/definitions/generatorConfig" }, "IsDisabled": { "$ref": "#/definitions/isDisabled" }, "IgnoreFilePathRegex": { "$ref": "#/definitions/ignoreFilePathRegex" }, "IgnoreInvocationExpressionRegex": { "$ref": "#/definitions/ignoreInvocationExpressionRegex" }, "TestVariablePairConfigs": { "$ref": "#/definitions/testVariablePairConfigs" } }, "patternProperties": { "^(Serilog|serilog)$": { "$ref": "#/definitions/serilog" } } }