Swagger support (#749)

* r

* fix

* sw

* x

* s

* .

* .

* .

* CreateTypeFromJObject

* .

* .

* f

* c

* .

* .

* .

* .

* .

* .

* ok

* ,

* .

* .

* .

* .

* n

* pact

* fix

* schema

* null

* fluent

* r

* -p

* .

* .

* refs

* .
This commit is contained in:
Stef Heyenrath
2022-05-13 22:01:46 +02:00
committed by GitHub
parent 0d8b3b1438
commit 5e301fd74b
45 changed files with 2371 additions and 1123 deletions

View File

@@ -0,0 +1,20 @@
using WireMock.Admin.Mappings;
namespace WireMock.Extensions;
public static class ResponseModelExtensions
{
private const string DefaultStatusCode = "200";
public static string GetStatusCodeAsString(this ResponseModel response)
{
return response.StatusCode switch
{
string statusCodeAsString => statusCodeAsString,
int statusCodeAsInt => statusCodeAsInt.ToString(),
_ => response.StatusCode?.ToString() ?? DefaultStatusCode
};
}
}