FixMapping[] for WireMock.Org REST API (#1023)

This commit is contained in:
Stef Heyenrath
2023-12-06 09:24:58 +01:00
committed by GitHub
parent c193bcf61f
commit 932dde07e4
8 changed files with 342 additions and 353 deletions

View File

@@ -1,9 +1,8 @@
namespace WireMock.Org.Abstractions
{
public class GetAdminMappingsResult
{
public Mappings Mappings { get; set; }
namespace WireMock.Org.Abstractions;
public Meta Meta { get; set; }
}
public class GetAdminMappingsResult
{
public Mapping[] Mappings { get; set; }
public Meta Meta { get; set; }
}

View File

@@ -0,0 +1,58 @@
namespace WireMock.Org.Abstractions;
public class Mapping
{
/// <summary>
/// This stub mapping's unique identifier
/// </summary>
public string Id { get; set; }
/// <summary>
/// Alias for the id
/// </summary>
public string Uuid { get; set; }
/// <summary>
/// The stub mapping's name
/// </summary>
public string Name { get; set; }
public MappingsRequest Request { get; set; }
public MappingsResponse Response { get; set; }
/// <summary>
/// Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.
/// </summary>
public bool Persistent { get; set; }
/// <summary>
/// This stub mapping's priority relative to others. 1 is highest.
/// </summary>
public int Priority { get; set; }
/// <summary>
/// The name of the scenario that this stub mapping is part of
/// </summary>
public string ScenarioName { get; set; }
/// <summary>
/// The required state of the scenario in order for this stub to be matched.
/// </summary>
public string RequiredScenarioState { get; set; }
/// <summary>
/// The new state for the scenario to be updated to after this stub is served.
/// </summary>
public string NewScenarioState { get; set; }
/// <summary>
/// A map of the names of post serve action extensions to trigger and their parameters.
/// </summary>
public object PostServeActions { get; set; }
/// <summary>
/// Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.
/// </summary>
public object Metadata { get; set; }
}

View File

@@ -1,59 +0,0 @@
namespace WireMock.Org.Abstractions
{
public class Mappings
{
/// <summary>
/// This stub mapping's unique identifier
/// </summary>
public string Id { get; set; }
/// <summary>
/// Alias for the id
/// </summary>
public string Uuid { get; set; }
/// <summary>
/// The stub mapping's name
/// </summary>
public string Name { get; set; }
public MappingsRequest Request { get; set; }
public MappingsResponse Response { get; set; }
/// <summary>
/// Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default.
/// </summary>
public bool Persistent { get; set; }
/// <summary>
/// This stub mapping's priority relative to others. 1 is highest.
/// </summary>
public int Priority { get; set; }
/// <summary>
/// The name of the scenario that this stub mapping is part of
/// </summary>
public string ScenarioName { get; set; }
/// <summary>
/// The required state of the scenario in order for this stub to be matched.
/// </summary>
public string RequiredScenarioState { get; set; }
/// <summary>
/// The new state for the scenario to be updated to after this stub is served.
/// </summary>
public string NewScenarioState { get; set; }
/// <summary>
/// A map of the names of post serve action extensions to trigger and their parameters.
/// </summary>
public object PostServeActions { get; set; }
/// <summary>
/// Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs.
/// </summary>
public object Metadata { get; set; }
}
}

View File

@@ -1,9 +1,8 @@
namespace WireMock.Org.Abstractions
{
public class PostAdminMappingsFindByMetadataResult
{
public Mappings Mappings { get; set; }
namespace WireMock.Org.Abstractions;
public Meta Meta { get; set; }
}
public class PostAdminMappingsFindByMetadataResult
{
public Mapping[] Mappings { get; set; }
public Meta Meta { get; set; }
}

View File

@@ -1,9 +1,8 @@
namespace WireMock.Org.Abstractions
{
public class PostAdminRecordingsSnapshotResult
{
public Mappings Mappings { get; set; }
namespace WireMock.Org.Abstractions;
public Meta Meta { get; set; }
}
public class PostAdminRecordingsSnapshotResult
{
public Mapping[] Mappings { get; set; }
public Meta Meta { get; set; }
}

View File

@@ -1,9 +1,8 @@
namespace WireMock.Org.Abstractions
{
public class PostAdminRecordingsStopResult
{
public Mappings Mappings { get; set; }
namespace WireMock.Org.Abstractions;
public Meta Meta { get; set; }
}
public class PostAdminRecordingsStopResult
{
public Mapping[] Mappings { get; set; }
public Meta Meta { get; set; }
}