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

@@ -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)

View File

@@ -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"
}
}

View File

@@ -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"
}
}