Implement "/__admin/requests"

This commit is contained in:
Stef Heyenrath
2017-01-26 12:00:30 +01:00
parent 1bf543a91e
commit a334974bef
30 changed files with 319 additions and 104 deletions

View File

@@ -0,0 +1,16 @@
namespace WireMock.Admin.Mappings
{
/// <summary>
/// Body Model
/// </summary>
public class BodyModel
{
/// <summary>
/// Gets or sets the matcher.
/// </summary>
/// <value>
/// The matcher.
/// </value>
public MatcherModel Matcher { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
using System.Collections.Generic;
namespace WireMock.Admin.Mappings
{
/// <summary>
/// Cookie Model
/// </summary>
public class CookieModel
{
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>
/// The name.
/// </value>
public string Name { get; set; }
/// <summary>
/// Gets or sets the matchers.
/// </summary>
/// <value>
/// The matchers.
/// </value>
public IList<MatcherModel> Matchers { get; set; }
}
}

View File

@@ -0,0 +1,7 @@
//namespace WireMock.Admin
//{
// public class FuncModel
// {
// public string Name { get; set; }
// }
//}

View File

@@ -0,0 +1,26 @@
using System.Collections.Generic;
namespace WireMock.Admin.Mappings
{
/// <summary>
/// Header Model
/// </summary>
public class HeaderModel
{
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>
/// The name.
/// </value>
public string Name { get; set; }
/// <summary>
/// Gets or sets the matchers.
/// </summary>
/// <value>
/// The matchers.
/// </value>
public IList<MatcherModel> Matchers { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
using System;
namespace WireMock.Admin.Mappings
{
/// <summary>
/// MappingModel
/// </summary>
public class MappingModel
{
/// <summary>
/// Gets or sets the unique identifier.
/// </summary>
/// <value>
/// The unique identifier.
/// </value>
public Guid Guid { get; set; }
/// <summary>
/// Gets or sets the request.
/// </summary>
/// <value>
/// The request.
/// </value>
public RequestModel Request { get; set; }
/// <summary>
/// Gets or sets the response.
/// </summary>
/// <value>
/// The response.
/// </value>
public ResponseModel Response { get; set; }
}
}

View File

@@ -0,0 +1,24 @@
namespace WireMock.Admin.Mappings
{
/// <summary>
/// MatcherModel
/// </summary>
public class MatcherModel
{
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>
/// The name.
/// </value>
public string Name { get; set; }
/// <summary>
/// Gets or sets the pattern.
/// </summary>
/// <value>
/// The pattern.
/// </value>
public string Pattern { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
using System.Collections.Generic;
namespace WireMock.Admin.Mappings
{
/// <summary>
/// Param Model
/// </summary>
public class ParamModel
{
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>
/// The name.
/// </value>
public string Name { get; set; }
/// <summary>
/// Gets or sets the values.
/// </summary>
/// <value>
/// The values.
/// </value>
public IList<string> Values { get; set; }
}
}

View File

@@ -0,0 +1,55 @@
using System.Collections.Generic;
namespace WireMock.Admin.Mappings
{
/// <summary>
/// RequestModel
/// </summary>
public class RequestModel
{
/// <summary>
/// Gets or sets the URL.
/// </summary>
/// <value>
/// The URL.
/// </value>
public UrlModel Url { get; set; }
/// <summary>
/// The methods
/// </summary>
public string[] Methods { get; set; }
/// <summary>
/// Gets or sets the Headers.
/// </summary>
/// <value>
/// The Headers.
/// </value>
public IList<HeaderModel> Headers { get; set; }
/// <summary>
/// Gets or sets the Cookies.
/// </summary>
/// <value>
/// The Cookies.
/// </value>
public IList<CookieModel> Cookies { get; set; }
/// <summary>
/// Gets or sets the Params.
/// </summary>
/// <value>
/// The Headers.
/// </value>
public IList<ParamModel> Params { get; set; }
/// <summary>
/// Gets or sets the body.
/// </summary>
/// <value>
/// The body.
/// </value>
public BodyModel Body { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
using System.Collections.Generic;
namespace WireMock.Admin.Mappings
{
/// <summary>
/// ResponseModel
/// </summary>
public class ResponseModel
{
/// <summary>
/// Gets or sets the HTTP status.
/// </summary>
/// <value>
/// The HTTP status.
/// </value>
public int StatusCode { get; set; }
/// <summary>
/// Gets or sets the body.
/// </summary>
/// <value>
/// The body.
/// </value>
public string Body { get; set; }
/// <summary>
/// Gets or sets the headers.
/// </summary>
/// <value>
/// The headers.
/// </value>
public IDictionary<string, string> Headers { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using System.Collections.Generic;
namespace WireMock.Admin.Mappings
{
/// <summary>
/// UrlModel
/// </summary>
public class UrlModel
{
/// <summary>
/// Gets or sets the matchers.
/// </summary>
/// <value>
/// The matchers.
/// </value>
public IList<MatcherModel> Matchers { get; set; }
}
}