diff --git a/src/WireMock.Net/Server/WireMockServer.ImportWireMockOrg.cs b/src/WireMock.Net/Server/WireMockServer.ImportWireMockOrg.cs index 3b42051fc..42d65a7e9 100644 --- a/src/WireMock.Net/Server/WireMockServer.ImportWireMockOrg.cs +++ b/src/WireMock.Net/Server/WireMockServer.ImportWireMockOrg.cs @@ -10,7 +10,7 @@ using WireMock.ResponseBuilders; using WireMock.Util; using Stef.Validation; -using OrgMappings = WireMock.Org.Abstractions.Mappings; +using OrgMapping = WireMock.Org.Abstractions.Mapping; namespace WireMock.Server; @@ -25,14 +25,14 @@ public void ReadStaticWireMockOrgMappingAndAddOrUpdate(string path) { Guard.NotNull(path, nameof(path)); - string filenameWithoutExtension = Path.GetFileNameWithoutExtension(path); + var filenameWithoutExtension = Path.GetFileNameWithoutExtension(path); if (FileHelper.TryReadMappingFileWithRetryAndDelay(_settings.FileSystemHandler, path, out var value)) { - var mappings = DeserializeJsonToArray(value); + var mappings = DeserializeJsonToArray(value); foreach (var mapping in mappings) { - if (mappings.Length == 1 && Guid.TryParse(filenameWithoutExtension, out Guid guidFromFilename)) + if (mappings.Length == 1 && Guid.TryParse(filenameWithoutExtension, out var guidFromFilename)) { ConvertWireMockOrgMappingAndRegisterAsRespondProvider(mapping, guidFromFilename, path); } @@ -48,10 +48,10 @@ private IResponseMessage MappingsPostWireMockOrg(IRequestMessage requestMessage) { try { - var mappingModels = DeserializeRequestMessageToArray(requestMessage); + var mappingModels = DeserializeRequestMessageToArray(requestMessage); if (mappingModels.Length == 1) { - Guid? guid = ConvertWireMockOrgMappingAndRegisterAsRespondProvider(mappingModels[0]); + var guid = ConvertWireMockOrgMappingAndRegisterAsRespondProvider(mappingModels[0]); return ResponseMessageBuilder.Create(201, "Mapping added", guid); } @@ -74,7 +74,7 @@ private IResponseMessage MappingsPostWireMockOrg(IRequestMessage requestMessage) } } - private Guid? ConvertWireMockOrgMappingAndRegisterAsRespondProvider(OrgMappings mapping, Guid? guid = null, string? path = null) + private Guid? ConvertWireMockOrgMappingAndRegisterAsRespondProvider(Org.Abstractions.Mapping mapping, Guid? guid = null, string? path = null) { var requestBuilder = Request.Create(); @@ -159,7 +159,7 @@ private IResponseMessage MappingsPostWireMockOrg(IRequestMessage requestMessage) } } - IResponseBuilder responseBuilder = Response.Create(); + var responseBuilder = Response.Create(); var response = mapping.Response; if (response != null) diff --git a/src/WireMock.Org.Abstractions/GetAdminMappingsResult.cs b/src/WireMock.Org.Abstractions/GetAdminMappingsResult.cs index 29bd0b457..25861b341 100644 --- a/src/WireMock.Org.Abstractions/GetAdminMappingsResult.cs +++ b/src/WireMock.Org.Abstractions/GetAdminMappingsResult.cs @@ -1,9 +1,8 @@ -namespace WireMock.Org.Abstractions +namespace WireMock.Org.Abstractions; + +public class GetAdminMappingsResult { - public class GetAdminMappingsResult - { - public Mappings Mappings { get; set; } + public Mapping[] Mappings { get; set; } - public Meta Meta { get; set; } - } + public Meta Meta { get; set; } } \ No newline at end of file diff --git a/src/WireMock.Org.Abstractions/Mapping.cs b/src/WireMock.Org.Abstractions/Mapping.cs new file mode 100644 index 000000000..3ca4e26fe --- /dev/null +++ b/src/WireMock.Org.Abstractions/Mapping.cs @@ -0,0 +1,58 @@ +namespace WireMock.Org.Abstractions; + +public class Mapping +{ + /// + /// This stub mapping's unique identifier + /// + public string Id { get; set; } + + /// + /// Alias for the id + /// + public string Uuid { get; set; } + + /// + /// The stub mapping's name + /// + public string Name { get; set; } + + public MappingsRequest Request { get; set; } + + public MappingsResponse Response { get; set; } + + /// + /// Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default. + /// + public bool Persistent { get; set; } + + /// + /// This stub mapping's priority relative to others. 1 is highest. + /// + public int Priority { get; set; } + + /// + /// The name of the scenario that this stub mapping is part of + /// + public string ScenarioName { get; set; } + + /// + /// The required state of the scenario in order for this stub to be matched. + /// + public string RequiredScenarioState { get; set; } + + /// + /// The new state for the scenario to be updated to after this stub is served. + /// + public string NewScenarioState { get; set; } + + /// + /// A map of the names of post serve action extensions to trigger and their parameters. + /// + public object PostServeActions { get; set; } + + /// + /// Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs. + /// + public object Metadata { get; set; } +} \ No newline at end of file diff --git a/src/WireMock.Org.Abstractions/Mappings.cs b/src/WireMock.Org.Abstractions/Mappings.cs deleted file mode 100644 index 15b5a8c4b..000000000 --- a/src/WireMock.Org.Abstractions/Mappings.cs +++ /dev/null @@ -1,59 +0,0 @@ -namespace WireMock.Org.Abstractions -{ - public class Mappings - { - /// - /// This stub mapping's unique identifier - /// - public string Id { get; set; } - - /// - /// Alias for the id - /// - public string Uuid { get; set; } - - /// - /// The stub mapping's name - /// - public string Name { get; set; } - - public MappingsRequest Request { get; set; } - - public MappingsResponse Response { get; set; } - - /// - /// Indicates that the stub mapping should be persisted immediately on create/update/delete and survive resets to default. - /// - public bool Persistent { get; set; } - - /// - /// This stub mapping's priority relative to others. 1 is highest. - /// - public int Priority { get; set; } - - /// - /// The name of the scenario that this stub mapping is part of - /// - public string ScenarioName { get; set; } - - /// - /// The required state of the scenario in order for this stub to be matched. - /// - public string RequiredScenarioState { get; set; } - - /// - /// The new state for the scenario to be updated to after this stub is served. - /// - public string NewScenarioState { get; set; } - - /// - /// A map of the names of post serve action extensions to trigger and their parameters. - /// - public object PostServeActions { get; set; } - - /// - /// Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs. - /// - public object Metadata { get; set; } - } -} \ No newline at end of file diff --git a/src/WireMock.Org.Abstractions/PostAdminMappingsFindByMetadataResult.cs b/src/WireMock.Org.Abstractions/PostAdminMappingsFindByMetadataResult.cs index 2c784ab8f..af6116fbe 100644 --- a/src/WireMock.Org.Abstractions/PostAdminMappingsFindByMetadataResult.cs +++ b/src/WireMock.Org.Abstractions/PostAdminMappingsFindByMetadataResult.cs @@ -1,9 +1,8 @@ -namespace WireMock.Org.Abstractions +namespace WireMock.Org.Abstractions; + +public class PostAdminMappingsFindByMetadataResult { - public class PostAdminMappingsFindByMetadataResult - { - public Mappings Mappings { get; set; } + public Mapping[] Mappings { get; set; } - public Meta Meta { get; set; } - } + public Meta Meta { get; set; } } \ No newline at end of file diff --git a/src/WireMock.Org.Abstractions/PostAdminRecordingsSnapshotResult.cs b/src/WireMock.Org.Abstractions/PostAdminRecordingsSnapshotResult.cs index 5f3a65a57..88ccbd526 100644 --- a/src/WireMock.Org.Abstractions/PostAdminRecordingsSnapshotResult.cs +++ b/src/WireMock.Org.Abstractions/PostAdminRecordingsSnapshotResult.cs @@ -1,9 +1,8 @@ -namespace WireMock.Org.Abstractions +namespace WireMock.Org.Abstractions; + +public class PostAdminRecordingsSnapshotResult { - public class PostAdminRecordingsSnapshotResult - { - public Mappings Mappings { get; set; } + public Mapping[] Mappings { get; set; } - public Meta Meta { get; set; } - } + public Meta Meta { get; set; } } \ No newline at end of file diff --git a/src/WireMock.Org.Abstractions/PostAdminRecordingsStopResult.cs b/src/WireMock.Org.Abstractions/PostAdminRecordingsStopResult.cs index 5a1d80673..98264b006 100644 --- a/src/WireMock.Org.Abstractions/PostAdminRecordingsStopResult.cs +++ b/src/WireMock.Org.Abstractions/PostAdminRecordingsStopResult.cs @@ -1,9 +1,8 @@ -namespace WireMock.Org.Abstractions +namespace WireMock.Org.Abstractions; + +public class PostAdminRecordingsStopResult { - public class PostAdminRecordingsStopResult - { - public Mappings Mappings { get; set; } + public Mapping[] Mappings { get; set; } - public Meta Meta { get; set; } - } + public Meta Meta { get; set; } } \ No newline at end of file diff --git a/src/WireMock.Org.RestClient/IWireMockOrgApi.cs b/src/WireMock.Org.RestClient/IWireMockOrgApi.cs index 929d9f6e9..57a98eae7 100644 --- a/src/WireMock.Org.RestClient/IWireMockOrgApi.cs +++ b/src/WireMock.Org.RestClient/IWireMockOrgApi.cs @@ -1,299 +1,293 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Net.Http; -using System.Net.Http.Headers; using System.Threading.Tasks; using AnyOfTypes; using RestEase; using WireMock.Org.Abstractions; -namespace WireMock.Org.RestClient +namespace WireMock.Org.RestClient; + +/// +/// Summary: WireMockOrg +/// +/// Title : WireMock +/// Version: 2.3x +/// +public interface IWireMockOrgApi { /// - /// Summary: WireMockOrg - /// - /// Title : WireMock - /// Version: 2.33.2 - /// - public interface IWireMockOrgApi - { - /// - /// Get all stub mappings - /// - /// GetAdminMappings (/__admin/mappings) - /// - /// The maximum number of results to return - /// The start index of the results to return - [Get("/__admin/mappings")] - Task GetAdminMappingsAsync([Query] int? limit, [Query] int? offset); - - /// - /// Create a new stub mapping - /// - /// PostAdminMappings (/__admin/mappings) - /// - [Post("/__admin/mappings")] - [Header("Content-Type", "application/json")] - Task PostAdminMappingsAsync(); - - /// - /// Delete all stub mappings - /// - /// DeleteAdminMappings (/__admin/mappings) - /// - [Delete("/__admin/mappings")] - Task DeleteAdminMappingsAsync(); - - /// - /// Reset stub mappings - /// - /// PostAdminMappingsReset (/__admin/mappings/reset) - /// - [Post("/__admin/mappings/reset")] - Task PostAdminMappingsResetAsync(); - - /// - /// Persist stub mappings - /// - /// PostAdminMappingsSave (/__admin/mappings/save) - /// - [Post("/__admin/mappings/save")] - Task PostAdminMappingsSaveAsync(); - - /// - /// Get stub mapping by ID - /// - /// GetAdminMappingsByStubMappingId (/__admin/mappings/{stubMappingId}) - /// - /// The UUID of stub mapping - [Get("/__admin/mappings/{stubMappingId}")] - Task>> GetAdminMappingsByStubMappingIdAsync([Path] string stubMappingId); - - /// - /// Update a stub mapping - /// - /// PutAdminMappingsByStubMappingId (/__admin/mappings/{stubMappingId}) - /// - /// The UUID of stub mapping - [Put("/__admin/mappings/{stubMappingId}")] - [Header("Content-Type", "application/json")] - Task>> PutAdminMappingsByStubMappingIdAsync([Path] string stubMappingId); - - /// - /// Delete a stub mapping - /// - /// DeleteAdminMappingsByStubMappingId (/__admin/mappings/{stubMappingId}) - /// - /// The UUID of stub mapping - [Delete("/__admin/mappings/{stubMappingId}")] - Task DeleteAdminMappingsByStubMappingIdAsync([Path] string stubMappingId); - - /// - /// Find stubs by matching on their metadata - /// - /// PostAdminMappingsFindByMetadata (/__admin/mappings/find-by-metadata) - /// - [Post("/__admin/mappings/find-by-metadata")] - [Header("Content-Type", "application/json")] - Task PostAdminMappingsFindByMetadataAsync(); - - /// - /// Delete stub mappings matching metadata - /// - /// PostAdminMappingsRemoveByMetadata (/__admin/mappings/remove-by-metadata) - /// - [Post("/__admin/mappings/remove-by-metadata")] - [Header("Content-Type", "application/json")] - Task PostAdminMappingsRemoveByMetadataAsync(); - - /// - /// Get all requests in journal - /// - /// GetAdminRequests (/__admin/requests) - /// - /// The maximum number of results to return - /// Only return logged requests after this date - [Get("/__admin/requests")] - Task GetAdminRequestsAsync([Query] string limit, [Query] string since); - - /// - /// Delete all requests in journal - /// - /// DeleteAdminRequests (/__admin/requests) - /// - [Delete("/__admin/requests")] - Task DeleteAdminRequestsAsync(); - - /// - /// Get request by ID - /// - /// GetAdminRequestsByRequestId (/__admin/requests/{requestId}) - /// - /// The UUID of the logged request - [Get("/__admin/requests/{requestId}")] - Task GetAdminRequestsByRequestIdAsync([Path] string requestId); - - /// - /// Delete request by ID - /// - /// DeleteAdminRequestsByRequestId (/__admin/requests/{requestId}) - /// - /// The UUID of the logged request - [Delete("/__admin/requests/{requestId}")] - Task DeleteAdminRequestsByRequestIdAsync([Path] string requestId); - - /// - /// Empty the request journal - /// - /// PostAdminRequestsReset (/__admin/requests/reset) - /// - [Post("/__admin/requests/reset")] - Task PostAdminRequestsResetAsync(); - - /// - /// Count requests by criteria - /// - /// PostAdminRequestsCount (/__admin/requests/count) - /// - [Post("/__admin/requests/count")] - [Header("Content-Type", "application/json")] - Task PostAdminRequestsCountAsync(); - - /// - /// Remove requests by criteria - /// - /// PostAdminRequestsRemove (/__admin/requests/remove) - /// - [Post("/__admin/requests/remove")] - [Header("Content-Type", "application/json")] - Task PostAdminRequestsRemoveAsync(); - - /// - /// Delete requests mappings matching metadata - /// - /// PostAdminRequestsRemoveByMetadata (/__admin/requests/remove-by-metadata) - /// - [Post("/__admin/requests/remove-by-metadata")] - [Header("Content-Type", "application/json")] - Task PostAdminRequestsRemoveByMetadataAsync(); - - /// - /// Find requests by criteria - /// - /// PostAdminRequestsFind (/__admin/requests/find) - /// - [Post("/__admin/requests/find")] - [Header("Content-Type", "application/json")] - Task PostAdminRequestsFindAsync(); - - /// - /// Find unmatched requests - /// - /// GetAdminRequestsUnmatched (/__admin/requests/unmatched) - /// - [Get("/__admin/requests/unmatched")] - Task GetAdminRequestsUnmatchedAsync(); - - /// - /// Retrieve near-misses for all unmatched requests - /// - /// GetAdminRequestsUnmatchedNearMisses (/__admin/requests/unmatched/near-misses) - /// - [Get("/__admin/requests/unmatched/near-misses")] - Task GetAdminRequestsUnmatchedNearMissesAsync(); - - /// - /// Find near misses matching specific request - /// - /// PostAdminNearMissesRequest (/__admin/near-misses/request) - /// - [Post("/__admin/near-misses/request")] - [Header("Content-Type", "application/json")] - Task PostAdminNearMissesRequestAsync(); - - /// - /// Find near misses matching request pattern - /// - /// PostAdminNearMissesRequestPattern (/__admin/near-misses/request-pattern) - /// - [Post("/__admin/near-misses/request-pattern")] - [Header("Content-Type", "application/json")] - Task PostAdminNearMissesRequestPatternAsync(); - - /// - /// Start recording - /// - /// PostAdminRecordingsStart (/__admin/recordings/start) - /// - [Post("/__admin/recordings/start")] - [Header("Content-Type", "application/json")] - Task PostAdminRecordingsStartAsync(); - - /// - /// Stop recording - /// - /// PostAdminRecordingsStop (/__admin/recordings/stop) - /// - [Post("/__admin/recordings/stop")] - Task PostAdminRecordingsStopAsync(); - - /// - /// Get recording status - /// - /// GetAdminRecordingsStatus (/__admin/recordings/status) - /// - [Get("/__admin/recordings/status")] - Task GetAdminRecordingsStatusAsync(); - - /// - /// Take a snapshot recording - /// - /// PostAdminRecordingsSnapshot (/__admin/recordings/snapshot) - /// - [Post("/__admin/recordings/snapshot")] - [Header("Content-Type", "application/json")] - Task PostAdminRecordingsSnapshotAsync(); - - /// - /// Get all scenarios - /// - /// GetAdminScenarios (/__admin/scenarios) - /// - [Get("/__admin/scenarios")] - Task GetAdminScenariosAsync(); - - /// - /// Reset the state of all scenarios - /// - /// PostAdminScenariosReset (/__admin/scenarios/reset) - /// - [Post("/__admin/scenarios/reset")] - Task PostAdminScenariosResetAsync(); - - /// - /// Update global settings - /// - /// PostAdminSettings (/__admin/settings) - /// - [Post("/__admin/settings")] - [Header("Content-Type", "application/json")] - Task PostAdminSettingsAsync(); - - /// - /// Reset mappings and request journal - /// - /// PostAdminReset (/__admin/reset) - /// - [Post("/__admin/reset")] - Task PostAdminResetAsync(); - - /// - /// Shutdown the WireMock server - /// - /// PostAdminShutdown (/__admin/shutdown) - /// - [Post("/__admin/shutdown")] - Task PostAdminShutdownAsync(); - } + /// Get all stub mappings + /// + /// GetAdminMappings (/__admin/mappings) + /// + /// The maximum number of results to return + /// The start index of the results to return + [Get("/__admin/mappings")] + Task GetAdminMappingsAsync([Query] int? limit, [Query] int? offset); + + /// + /// Create a new stub mapping + /// + /// PostAdminMappings (/__admin/mappings) + /// + [Post("/__admin/mappings")] + [Header("Content-Type", "application/json")] + Task PostAdminMappingsAsync(); + + /// + /// Delete all stub mappings + /// + /// DeleteAdminMappings (/__admin/mappings) + /// + [Delete("/__admin/mappings")] + Task DeleteAdminMappingsAsync(); + + /// + /// Reset stub mappings + /// + /// PostAdminMappingsReset (/__admin/mappings/reset) + /// + [Post("/__admin/mappings/reset")] + Task PostAdminMappingsResetAsync(); + + /// + /// Persist stub mappings + /// + /// PostAdminMappingsSave (/__admin/mappings/save) + /// + [Post("/__admin/mappings/save")] + Task PostAdminMappingsSaveAsync(); + + /// + /// Get stub mapping by ID + /// + /// GetAdminMappingsByStubMappingId (/__admin/mappings/{stubMappingId}) + /// + /// The UUID of stub mapping + [Get("/__admin/mappings/{stubMappingId}")] + Task>> GetAdminMappingsByStubMappingIdAsync([Path] string stubMappingId); + + /// + /// Update a stub mapping + /// + /// PutAdminMappingsByStubMappingId (/__admin/mappings/{stubMappingId}) + /// + /// The UUID of stub mapping + [Put("/__admin/mappings/{stubMappingId}")] + [Header("Content-Type", "application/json")] + Task>> PutAdminMappingsByStubMappingIdAsync([Path] string stubMappingId); + + /// + /// Delete a stub mapping + /// + /// DeleteAdminMappingsByStubMappingId (/__admin/mappings/{stubMappingId}) + /// + /// The UUID of stub mapping + [Delete("/__admin/mappings/{stubMappingId}")] + Task DeleteAdminMappingsByStubMappingIdAsync([Path] string stubMappingId); + + /// + /// Find stubs by matching on their metadata + /// + /// PostAdminMappingsFindByMetadata (/__admin/mappings/find-by-metadata) + /// + [Post("/__admin/mappings/find-by-metadata")] + [Header("Content-Type", "application/json")] + Task PostAdminMappingsFindByMetadataAsync(); + + /// + /// Delete stub mappings matching metadata + /// + /// PostAdminMappingsRemoveByMetadata (/__admin/mappings/remove-by-metadata) + /// + [Post("/__admin/mappings/remove-by-metadata")] + [Header("Content-Type", "application/json")] + Task PostAdminMappingsRemoveByMetadataAsync(); + + /// + /// Get all requests in journal + /// + /// GetAdminRequests (/__admin/requests) + /// + /// The maximum number of results to return + /// Only return logged requests after this date + [Get("/__admin/requests")] + Task GetAdminRequestsAsync([Query] string limit, [Query] string since); + + /// + /// Delete all requests in journal + /// + /// DeleteAdminRequests (/__admin/requests) + /// + [Delete("/__admin/requests")] + Task DeleteAdminRequestsAsync(); + + /// + /// Get request by ID + /// + /// GetAdminRequestsByRequestId (/__admin/requests/{requestId}) + /// + /// The UUID of the logged request + [Get("/__admin/requests/{requestId}")] + Task GetAdminRequestsByRequestIdAsync([Path] string requestId); + + /// + /// Delete request by ID + /// + /// DeleteAdminRequestsByRequestId (/__admin/requests/{requestId}) + /// + /// The UUID of the logged request + [Delete("/__admin/requests/{requestId}")] + Task DeleteAdminRequestsByRequestIdAsync([Path] string requestId); + + /// + /// Empty the request journal + /// + /// PostAdminRequestsReset (/__admin/requests/reset) + /// + [Post("/__admin/requests/reset")] + Task PostAdminRequestsResetAsync(); + + /// + /// Count requests by criteria + /// + /// PostAdminRequestsCount (/__admin/requests/count) + /// + [Post("/__admin/requests/count")] + [Header("Content-Type", "application/json")] + Task PostAdminRequestsCountAsync(); + + /// + /// Remove requests by criteria + /// + /// PostAdminRequestsRemove (/__admin/requests/remove) + /// + [Post("/__admin/requests/remove")] + [Header("Content-Type", "application/json")] + Task PostAdminRequestsRemoveAsync(); + + /// + /// Delete requests mappings matching metadata + /// + /// PostAdminRequestsRemoveByMetadata (/__admin/requests/remove-by-metadata) + /// + [Post("/__admin/requests/remove-by-metadata")] + [Header("Content-Type", "application/json")] + Task PostAdminRequestsRemoveByMetadataAsync(); + + /// + /// Find requests by criteria + /// + /// PostAdminRequestsFind (/__admin/requests/find) + /// + [Post("/__admin/requests/find")] + [Header("Content-Type", "application/json")] + Task PostAdminRequestsFindAsync(); + + /// + /// Find unmatched requests + /// + /// GetAdminRequestsUnmatched (/__admin/requests/unmatched) + /// + [Get("/__admin/requests/unmatched")] + Task GetAdminRequestsUnmatchedAsync(); + + /// + /// Retrieve near-misses for all unmatched requests + /// + /// GetAdminRequestsUnmatchedNearMisses (/__admin/requests/unmatched/near-misses) + /// + [Get("/__admin/requests/unmatched/near-misses")] + Task GetAdminRequestsUnmatchedNearMissesAsync(); + + /// + /// Find near misses matching specific request + /// + /// PostAdminNearMissesRequest (/__admin/near-misses/request) + /// + [Post("/__admin/near-misses/request")] + [Header("Content-Type", "application/json")] + Task PostAdminNearMissesRequestAsync(); + + /// + /// Find near misses matching request pattern + /// + /// PostAdminNearMissesRequestPattern (/__admin/near-misses/request-pattern) + /// + [Post("/__admin/near-misses/request-pattern")] + [Header("Content-Type", "application/json")] + Task PostAdminNearMissesRequestPatternAsync(); + + /// + /// Start recording + /// + /// PostAdminRecordingsStart (/__admin/recordings/start) + /// + [Post("/__admin/recordings/start")] + [Header("Content-Type", "application/json")] + Task PostAdminRecordingsStartAsync(); + + /// + /// Stop recording + /// + /// PostAdminRecordingsStop (/__admin/recordings/stop) + /// + [Post("/__admin/recordings/stop")] + Task PostAdminRecordingsStopAsync(); + + /// + /// Get recording status + /// + /// GetAdminRecordingsStatus (/__admin/recordings/status) + /// + [Get("/__admin/recordings/status")] + Task GetAdminRecordingsStatusAsync(); + + /// + /// Take a snapshot recording + /// + /// PostAdminRecordingsSnapshot (/__admin/recordings/snapshot) + /// + [Post("/__admin/recordings/snapshot")] + [Header("Content-Type", "application/json")] + Task PostAdminRecordingsSnapshotAsync(); + + /// + /// Get all scenarios + /// + /// GetAdminScenarios (/__admin/scenarios) + /// + [Get("/__admin/scenarios")] + Task GetAdminScenariosAsync(); + + /// + /// Reset the state of all scenarios + /// + /// PostAdminScenariosReset (/__admin/scenarios/reset) + /// + [Post("/__admin/scenarios/reset")] + Task PostAdminScenariosResetAsync(); + + /// + /// Update global settings + /// + /// PostAdminSettings (/__admin/settings) + /// + [Post("/__admin/settings")] + [Header("Content-Type", "application/json")] + Task PostAdminSettingsAsync(); + + /// + /// Reset mappings and request journal + /// + /// PostAdminReset (/__admin/reset) + /// + [Post("/__admin/reset")] + Task PostAdminResetAsync(); + + /// + /// Shutdown the WireMock server + /// + /// PostAdminShutdown (/__admin/shutdown) + /// + [Post("/__admin/shutdown")] + Task PostAdminShutdownAsync(); } \ No newline at end of file