V14: Add missing action parameters mapping (#16557)

* Add missing mapping for ActionParameters

* Remove -ActionParameters as that is now mapped

* Update OpenApi.json

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
This commit is contained in:
Nikolaj Geisle
2024-06-07 10:22:13 +02:00
committed by GitHub
parent 42ce64c357
commit b04e4d7586
3 changed files with 17 additions and 1 deletions

View File

@@ -23,7 +23,7 @@ public class HealthCheckViewModelsMapDefinition : IMapDefinition
mapper.Define<IGrouping<string?, Core.HealthChecks.HealthCheck>, HealthCheckGroupResponseModel>((_, _) => new HealthCheckGroupResponseModel { Name = string.Empty }, Map);
}
// Umbraco.Code.MapAll -ActionParameters
// Umbraco.Code.MapAll
private static void Map(HealthCheckActionRequestModel source, HealthCheckAction target, MapperContext context)
{
target.Alias = source.Alias;
@@ -34,6 +34,7 @@ public class HealthCheckViewModelsMapDefinition : IMapDefinition
target.ProvidedValueValidation = source.ProvidedValueValidation;
target.ProvidedValueValidationRegex = source.ProvidedValueValidationRegex;
target.ProvidedValue = source.ProvidedValue;
target.ActionParameters = source.ActionParameters;
}
// Umbraco.Code.MapAll
@@ -50,6 +51,7 @@ public class HealthCheckViewModelsMapDefinition : IMapDefinition
target.ProvidedValue = source.ProvidedValue;
target.ProvidedValueValidation = source.ProvidedValueValidation;
target.ProvidedValueValidationRegex = source.ProvidedValueValidationRegex;
target.ActionParameters = source.ActionParameters;
}
// Umbraco.Code.MapAll

View File

@@ -37432,6 +37432,11 @@
"providedValueValidationRegex": {
"type": "string",
"nullable": true
},
"actionParameters": {
"type": "object",
"additionalProperties": { },
"nullable": true
}
},
"additionalProperties": false
@@ -38042,6 +38047,10 @@
"minLength": 1,
"type": "string"
},
"id": {
"type": "string",
"nullable": true
},
"version": {
"type": "string",
"nullable": true

View File

@@ -47,4 +47,9 @@ public class HealthCheckActionRequestModel
/// Gets or sets the regex to use when validating the provided value (if the value can be validated by a regex).
/// </summary>
public string? ProvidedValueValidationRegex { get; set; }
/// <summary>
/// Gets or sets the action parameters.
/// </summary>
public Dictionary<string, object>? ActionParameters { get; set; }
}