Sumanta Roy
09/01/2022, 1:34 AMMatt (pactflow.io / pact-js / pact-go)
Sumanta Roy
09/01/2022, 3:03 AM{
"swagger": "2.0",
"x-authapikey": true,
"info": {
"description": "get points",
"version": "1.0",
"title": "app apis",
"license": {
"name": "test"
}
},
"basePath": "/tester/test/v1",
"schemes": [
"https"
],
"paths": {
"/data/accounts/points": {
"get": {
"tags": [
"test"
],
"summary": "Get points balance",
"description": "Get points balance",
"operationId": "getPoints",
"x-servers": [
{
"url": "",
"description": "test"
}
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "header",
"name": "token",
"description": "User Token",
"type": "string",
"required": true
},
{
"in": "header",
"name": "sub-key",
"description": "subscription key",
"type": "string",
"required": true
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "object",
"properties": {
"Customer": {
"type": "object",
"properties": {
"FirstName": {
"type": "string"
},
"PointsBal": {
"type": "integer"
}
}
}
}
}
}
}
}
}
}
}
Matt (pactflow.io / pact-js / pact-go)
Sumanta Roy
09/01/2022, 3:13 AM{
"consumer": {
"name": "MyPointsConsumer"
},
"interactions": [
{
"description": "a request for checking my points balance",
"providerState": "I want to check my points balance",
"request": {
"headers": {
"sub-key": "somekey",
"token": "sometoken"
},
"method": "GET",
"path": "/data/accounts/points"
},
"response": {
"body": [
{
"Customer": {
"FirstName": "SUMANTA",
"PointsBalance": 99354,
}
}
],
"headers": {
"Content-Type": "application/json"
},
"status": 200
}
}
],
"metadata": {
"pact-js": {
"version": "10.1.2"
},
"pactRust": {
"ffi": "0.3.9",
"models": "0.4.5"
},
"pactSpecification": {
"version": "2.0.0"
}
},
"provider": {
"name": "MyPointsProvider"
}
}
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Sumanta Roy
09/01/2022, 4:07 AMMatt (pactflow.io / pact-js / pact-go)
Sumanta Roy
09/01/2022, 4:10 AM