{"openapi":"3.1.0","info":{"title":"BJCompare demo","version":"1.0.0"},"paths":{"/api/v1/assistant/status":{"get":{"summary":"Status","operationId":"status_api_v1_assistant_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/assistant/extract":{"post":{"summary":"Extract","operationId":"extract_api_v1_assistant_extract_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/quotes":{"post":{"summary":"Quotes","operationId":"quotes_api_v1_quotes_post","parameters":[{"name":"scenario","in":"query","required":false,"schema":{"enum":["normal","timeout","error","invalid"],"type":"string","default":"normal","title":"Scenario"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceApplication"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comparison"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/transformations":{"post":{"summary":"Transformations","operationId":"transformations_api_v1_transformations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceApplication"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Comparison":{"properties":{"quotes":{"items":{"$ref":"#/components/schemas/NormalizedQuote"},"type":"array","title":"Quotes"},"failed_insurers":{"items":{"$ref":"#/components/schemas/FailedInsurer"},"type":"array","title":"Failed Insurers"}},"additionalProperties":false,"type":"object","required":["quotes","failed_insurers"],"title":"Comparison"},"Customer":{"properties":{"first_name":{"type":"string","maxLength":100,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":100,"minLength":1,"title":"Last Name"},"date_of_birth":{"type":"string","format":"date","title":"Date Of Birth"},"postcode":{"type":"string","pattern":"(?i)^[a-z]{1,2}[0-9][a-z0-9]?(?:\\s?[0-9][a-z]{2})?$","title":"Postcode"},"occupation":{"type":"string","maxLength":100,"minLength":1,"title":"Occupation"}},"additionalProperties":false,"type":"object","required":["first_name","last_name","date_of_birth","postcode","occupation"],"title":"Customer"},"ExtractRequest":{"properties":{"text":{"type":"string","maxLength":1500,"minLength":10,"title":"Text"},"consent":{"type":"boolean","const":true,"title":"Consent"}},"additionalProperties":false,"type":"object","required":["text","consent"],"title":"ExtractRequest"},"FailedInsurer":{"properties":{"insurer":{"type":"string","title":"Insurer"},"status":{"type":"string","const":"failed","title":"Status","default":"failed"},"error":{"type":"string","title":"Error"}},"additionalProperties":false,"type":"object","required":["insurer","error"],"title":"FailedInsurer"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InsuranceApplication":{"properties":{"customer":{"$ref":"#/components/schemas/Customer"},"vehicle":{"$ref":"#/components/schemas/Vehicle"},"annual_mileage":{"type":"integer","maximum":100000.0,"minimum":1.0,"title":"Annual Mileage"},"years_no_claims":{"type":"integer","maximum":80.0,"minimum":0.0,"title":"Years No Claims"},"voluntary_excess":{"anyOf":[{"type":"number","maximum":5000.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"}],"title":"Voluntary Excess"}},"additionalProperties":false,"type":"object","required":["customer","vehicle","annual_mileage","years_no_claims","voluntary_excess"],"title":"InsuranceApplication"},"NormalizedQuote":{"properties":{"insurer":{"type":"string","title":"Insurer"},"quote_reference":{"type":"string","title":"Quote Reference"},"annual_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,10}|(?=[\\d.]{1,13}0*$)\\d{0,10}\\.\\d{0,2}0*$)","title":"Annual Price"},"total_excess":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,10}|(?=[\\d.]{1,13}0*$)\\d{0,10}\\.\\d{0,2}0*$)","title":"Total Excess"},"coverage_type":{"type":"string","const":"comprehensive","title":"Coverage Type"},"status":{"type":"string","const":"success","title":"Status","default":"success"},"error":{"type":"null","title":"Error"}},"additionalProperties":false,"type":"object","required":["insurer","quote_reference","annual_price","total_excess","coverage_type"],"title":"NormalizedQuote"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"Vehicle":{"properties":{"registration":{"type":"string","pattern":"(?i)^[a-z0-9 ]{2,10}$","title":"Registration"},"make":{"type":"string","maxLength":100,"minLength":1,"title":"Make"},"model":{"type":"string","maxLength":100,"minLength":1,"title":"Model"},"year":{"type":"integer","maximum":2027.0,"minimum":1900.0,"title":"Year"},"estimated_value":{"anyOf":[{"type":"number","maximum":10000000.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,10}|(?=[\\d.]{1,13}0*$)\\d{0,10}\\.\\d{0,2}0*$)"}],"title":"Estimated Value"}},"additionalProperties":false,"type":"object","required":["registration","make","model","year","estimated_value"],"title":"Vehicle"}}}}