Quality Assurance system for Hopper services
Make a system that can:
QA system
{
"query": {
"alternate_destinations": [],
"alternate_origins": [],
"origin": "LON",
"filters": {
"exclude_carriers": []
},
"departure_date": "2016-09-20",
"destination": "PRG"
},
"timestamp": 1472719555730,
"took": 1389,
"results": [
{
"id": "O7dxPabyulfikvBs5WTIBWyefwcV7z",
"timestamp": 1472719555713,
"base_amount": 32,
"tax_amount": 0,
"currency_code": "USD",
"segments": [
{
"origin": "LTN",
"destination": "PRG",
"departure_time": 1474401900000,
"departure_tz_offset": 60,
"arrival_time": 1474408500000,
"arrival_tz_offset": 120,
"duration": 110,
"outgoing": true,
"flight_number": "2602",
"marketing_carrier_code": "W6",
"fare_code": "",
"stops": 0,
"available_seats": 9,
"booking_code": ""
}
],
"source": "Kiwi",
"conversation_id": "...",
"pax_type": "ADT",
"exchange_rate": 1,
"provider": {
"pcc": "BRNO",
"Provider": "Kiwi"
}
}
}
List
Integer
String
Value inside an Object inside a List
Boolean
{
...
"took": 1389,
"results": [
{
...
"base_amount": 32,
...
}
]
}
{
...
"took": {"min": 100, "max": 10000},
"results": [
{
...
"base_amount":
{
"min":20,
"max":231
},
...
}
]
}
We want to have a way we can say
{
...
"took": 1389,
"results": [
{
...
"base_amount": 32,
...
}
]
}
{
"took":
{
"min": 100,
"max": 10000
},
"results":
{
"minLength": 1,
"maxLength": 200
},
"seq_results":
{
"base_amount":
{
"max":2000
}
}
}
This gives us the ability to describe various validators for different fields in a single JSON
Benefits
Documentation can be found at:
TODOs