mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-17 14:40:00 +02:00
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:
@@ -57,6 +57,7 @@ public class PactTests
|
||||
.WithHeader("Accept", "application/json")
|
||||
)
|
||||
.WithTitle("A GET request to retrieve the something")
|
||||
.WithGuid("23e2aedb-166c-467b-b9f6-9b0817cb1636")
|
||||
.RespondWith(
|
||||
Response.Create()
|
||||
.WithStatusCode(HttpStatusCode.OK)
|
||||
@@ -77,6 +78,7 @@ public class PactTests
|
||||
.WithBody(new JsonMatcher("{ \"Id\" : \"1\", \"FirstName\" : \"Totally\" }"))
|
||||
)
|
||||
.WithTitle("A Post request to add the something")
|
||||
.WithGuid("f3f8abe7-7d1e-4518-afa1-d295ce7dadfd")
|
||||
.RespondWith(
|
||||
Response.Create()
|
||||
.WithStatusCode(HttpStatusCode.RedirectMethod)
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
{
|
||||
"Consumer": {
|
||||
"Name": "Something API Consumer Get"
|
||||
"consumer": {
|
||||
"name": "Something API Consumer Get"
|
||||
},
|
||||
"Interactions": [
|
||||
"interactions": [
|
||||
{
|
||||
"ProviderState": "A GET request to retrieve the something",
|
||||
"Request": {
|
||||
"Headers": {
|
||||
"providerState": "A GET request to retrieve the something",
|
||||
"request": {
|
||||
"headers": {
|
||||
"Accept": "application/json"
|
||||
},
|
||||
"Method": "GET",
|
||||
"Path": "/tester",
|
||||
"Query": "q1=test&q2=ok"
|
||||
"method": "GET",
|
||||
"path": "/tester",
|
||||
"query": "q1=test&q2=ok"
|
||||
},
|
||||
"Response": {
|
||||
"Body": {
|
||||
"Id": "tester",
|
||||
"FirstName": "Totally",
|
||||
"LastName": "Awesome"
|
||||
"response": {
|
||||
"body": {
|
||||
"id": "tester",
|
||||
"firstName": "Totally",
|
||||
"lastName": "Awesome"
|
||||
},
|
||||
"Headers": {
|
||||
"headers": {
|
||||
"Content-Type": "application/json; charset=utf-8"
|
||||
},
|
||||
"Status": 200
|
||||
"status": 200
|
||||
}
|
||||
}
|
||||
],
|
||||
"Provider": {
|
||||
"Name": "Something API"
|
||||
"provider": {
|
||||
"name": "Something API"
|
||||
}
|
||||
}
|
||||
@@ -1,50 +1,49 @@
|
||||
{
|
||||
"Consumer": {
|
||||
"Name": "Something API Consumer Multiple"
|
||||
"consumer": {
|
||||
"name": "Something API Consumer Multiple"
|
||||
},
|
||||
"Interactions": [
|
||||
"interactions": [
|
||||
{
|
||||
"ProviderState": "A Post request to add the something",
|
||||
"Request": {
|
||||
"Headers": {
|
||||
"providerState": "A GET request to retrieve the something",
|
||||
"request": {
|
||||
"headers": {
|
||||
"Accept": "application/json"
|
||||
},
|
||||
"Method": "POST",
|
||||
"Path": "/add",
|
||||
"Body": "{ \"Id\" : \"1\", \"FirstName\" : \"Totally\" }"
|
||||
"method": "POST",
|
||||
"path": "/tester",
|
||||
"query": "q1=test&q2=ok"
|
||||
},
|
||||
"Response": {
|
||||
"Body": {
|
||||
"Id": "1",
|
||||
"FirstName": "Totally"
|
||||
"response": {
|
||||
"body": {
|
||||
"id": "tester",
|
||||
"firstName": "Totally",
|
||||
"lastName": "Awesome"
|
||||
},
|
||||
"Status": 303
|
||||
"headers": {
|
||||
"Content-Type": "application/json; charset=utf-8"
|
||||
},
|
||||
"status": 200
|
||||
}
|
||||
},
|
||||
{
|
||||
"ProviderState": "A GET request to retrieve the something",
|
||||
"Request": {
|
||||
"Headers": {
|
||||
"providerState": "A Post request to add the something",
|
||||
"request": {
|
||||
"headers": {
|
||||
"Accept": "application/json"
|
||||
},
|
||||
"Method": "POST",
|
||||
"Path": "/tester",
|
||||
"Query": "q1=test&q2=ok"
|
||||
"method": "POST",
|
||||
"path": "/add"
|
||||
},
|
||||
"Response": {
|
||||
"Body": {
|
||||
"Id": "tester",
|
||||
"FirstName": "Totally",
|
||||
"LastName": "Awesome"
|
||||
"response": {
|
||||
"body": {
|
||||
"id": "1",
|
||||
"firstName": "Totally"
|
||||
},
|
||||
"Headers": {
|
||||
"Content-Type": "application/json; charset=utf-8"
|
||||
},
|
||||
"Status": 200
|
||||
"status": 303
|
||||
}
|
||||
}
|
||||
],
|
||||
"Provider": {
|
||||
"Name": "Something API"
|
||||
"provider": {
|
||||
"name": "Something API"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user