From 5f534abd8444748420200f3e9ff809a883671a10 Mon Sep 17 00:00:00 2001 From: Eric Beland Date: Sun, 23 Mar 2025 21:36:36 -0400 Subject: [PATCH 1/8] Rename Counters to Metrics in the proxy. We already do this in the grid. --- CLAUDE.md | 13 ++ browserup-proxy.schema.json | 174 +++++++++--------- .../browserup/browserup_addons_manager.py | 4 +- mitmproxy/addons/browserup/har/har_manager.py | 4 +- .../addons/browserup/har/har_resources.py | 26 +-- mitmproxy/addons/browserup/har/har_schemas.py | 6 +- .../addons/browserup/har_capture_addon.py | 4 +- mitmproxy/addons/browserup/schemas/Page.json | 4 +- test/mitmproxy/addons/browserup/test_api.py | 16 +- .../addons/browserup/test_counters.py | 83 --------- .../addons/browserup/test_metrics.py | 83 +++++++++ 11 files changed, 215 insertions(+), 202 deletions(-) create mode 100644 CLAUDE.md delete mode 100644 test/mitmproxy/addons/browserup/test_counters.py create mode 100644 test/mitmproxy/addons/browserup/test_metrics.py diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000000..a840edeb4f --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,13 @@ +This is a fork of the mitmproxy project by a company named browserup. The mitmproxy +is used to man-in-the-middle connections to provide debugging info, allow for security research +and other uses. + +Browserup uses the mitmproxy to capture traffic from within containers that are run during a load test. +This captured traffic, through mitmproxy addons, is used to build a HAR (HTTP Archive) file. The HAR +file is made available via an API. The API is also used to control the proxy, and to add custom metrics +to a har at runtime, as well as adding verifications for HAR content. Clients for +this API are generated in multiple languages via the open api specification. The clients live in /clients +which should be ignored, as they are generated files. + +Browserup extends mitmproxy's mitmdump executable with addons +The most important code for browserup live in mmitmproxy/addons/browserup \ No newline at end of file diff --git a/browserup-proxy.schema.json b/browserup-proxy.schema.json index 7e54d02df7..2a73b8df5d 100644 --- a/browserup-proxy.schema.json +++ b/browserup-proxy.schema.json @@ -337,30 +337,30 @@ } } }, - "/har/counters": { + "/har/metrics": { "post": { - "description": "Add Custom Counter to the captured traffic har", - "operationId": "addCounter", + "description": "Add Custom Metric to the captured traffic har", + "operationId": "addMetric", "tags": [ "BrowserUpProxy" ], "requestBody": { - "description": "Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key", + "description": "Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Counter" + "$ref": "#/components/schemas/Metric" } } } }, "responses": { "204": { - "description": "The counter was added." + "description": "The metric was added." }, "422": { - "description": "The counter was invalid." + "description": "The metric was invalid." } } } @@ -594,17 +594,17 @@ } } }, - "Counter": { + "Metric": { "type": "object", "properties": { "name": { "type": "string", - "description": "Name of Custom Counter to add to the page under _counters" + "description": "Name of Custom Metric to add to the page under _metrics" }, "value": { "type": "number", "format": "double", - "description": "Value for the counter" + "description": "Value for the metric" } } }, @@ -634,6 +634,77 @@ } } }, + "WebSocketMessage": { + "type": "object", + "required": [ + "type", + "opcode", + "data", + "time" + ], + "properties": { + "type": { + "type": "string" + }, + "opcode": { + "type": "number" + }, + "data": { + "type": "string" + }, + "time": { + "type": "number" + } + } + }, + "Header": { + "type": "object", + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + }, + "comment": { + "type": "string" + } + } + }, + "Action": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "id": { + "type": "string" + }, + "className": { + "type": "string" + }, + "tagName": { + "type": "string" + }, + "xpath": { + "type": "string" + }, + "dataAttributes": { + "type": "string" + }, + "formName": { + "type": "string" + }, + "content": { + "type": "string" + } + }, + "additionalProperties": false + }, "PageTimings": { "type": "object", "required": [ @@ -714,28 +785,6 @@ } } }, - "CustomHarData": { - "type": "object", - "minProperties": 1 - }, - "Header": { - "type": "object", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - }, - "comment": { - "type": "string" - } - } - }, "Har": { "type": "object", "required": [ @@ -814,59 +863,6 @@ } } }, - "WebSocketMessage": { - "type": "object", - "required": [ - "type", - "opcode", - "data", - "time" - ], - "properties": { - "type": { - "type": "string" - }, - "opcode": { - "type": "number" - }, - "data": { - "type": "string" - }, - "time": { - "type": "number" - } - } - }, - "Action": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "id": { - "type": "string" - }, - "className": { - "type": "string" - }, - "tagName": { - "type": "string" - }, - "xpath": { - "type": "string" - }, - "dataAttributes": { - "type": "string" - }, - "formName": { - "type": "string" - }, - "content": { - "type": "string" - } - }, - "additionalProperties": false - }, "HarEntry": { "type": "object", "required": [ @@ -1326,6 +1322,10 @@ } } }, + "CustomHarData": { + "type": "object", + "minProperties": 1 + }, "Page": { "type": "object", "required": [ @@ -1353,10 +1353,10 @@ }, "default": [] }, - "_counters": { + "_metrics": { "type": "array", "items": { - "$ref": "#/components/schemas/Counter" + "$ref": "#/components/schemas/Metric" }, "default": [] }, diff --git a/mitmproxy/addons/browserup/browserup_addons_manager.py b/mitmproxy/addons/browserup/browserup_addons_manager.py index c5304ae901..76df6991e6 100644 --- a/mitmproxy/addons/browserup/browserup_addons_manager.py +++ b/mitmproxy/addons/browserup/browserup_addons_manager.py @@ -14,7 +14,7 @@ from mitmproxy import ctx from mitmproxy.addons.browserup.browser_data_addon import BrowserDataAddOn -from mitmproxy.addons.browserup.har.har_schemas import CounterSchema +from mitmproxy.addons.browserup.har.har_schemas import MetricSchema from mitmproxy.addons.browserup.har.har_schemas import ErrorSchema from mitmproxy.addons.browserup.har.har_schemas import MatchCriteriaSchema from mitmproxy.addons.browserup.har.har_schemas import PageTimingSchema @@ -130,7 +130,7 @@ def get_app(self): spec.components.schema("MatchCriteria", schema=MatchCriteriaSchema) spec.components.schema("VerifyResult", schema=VerifyResultSchema) spec.components.schema("Error", schema=ErrorSchema) - spec.components.schema("Counter", schema=CounterSchema) + spec.components.schema("Metric", schema=MetricSchema) self.load_resources_from_addons(app, spec) self.write_spec(spec) return app diff --git a/mitmproxy/addons/browserup/har/har_manager.py b/mitmproxy/addons/browserup/har/har_manager.py index 548a0ce8e0..5c29b969ca 100644 --- a/mitmproxy/addons/browserup/har/har_manager.py +++ b/mitmproxy/addons/browserup/har/har_manager.py @@ -109,8 +109,8 @@ def add_verification_to_har(self, verification_type, verification_name, result): {"name": verification_name, "type": verification_type, "result": result}, ) - def add_counter_to_har(self, counter_dict): - self.add_custom_value_to_har("_counters", counter_dict) + def add_metric_to_har(self, metric_dict): + self.add_custom_value_to_har("_metrics", metric_dict) def add_error_to_har(self, error_dict): self.add_custom_value_to_har("_errors", error_dict) diff --git a/mitmproxy/addons/browserup/har/har_resources.py b/mitmproxy/addons/browserup/har/har_resources.py index ab7d0e7a8d..467cf3873b 100644 --- a/mitmproxy/addons/browserup/har/har_resources.py +++ b/mitmproxy/addons/browserup/har/har_resources.py @@ -8,7 +8,7 @@ from marshmallow import ValidationError from mitmproxy.addons.browserup.har.har_capture_types import HarCaptureTypes -from mitmproxy.addons.browserup.har.har_schemas import CounterSchema +from mitmproxy.addons.browserup.har.har_schemas import MetricSchema from mitmproxy.addons.browserup.har.har_schemas import ErrorSchema from mitmproxy.addons.browserup.har.har_schemas import MatchCriteriaSchema from mitmproxy.addons.browserup.har.har_verifications import HarVerifications @@ -508,41 +508,41 @@ def on_post(self, req, resp, time, name): self.respond_with_bool(resp, result) -class CounterResource: +class MetricResource: def __init__(self, HarCaptureAddon): self.name = "harcapture" self.HarCaptureAddon = HarCaptureAddon def addon_path(self): - return "har/counters" + return "har/metrics" def apispec(self, spec): spec.path(resource=self) def on_post(self, req, resp): - """Adds a custom counter to the har page/step under _counters + """Adds a custom metric to the har page/step under _metrics --- - description: Add Custom Counter to the captured traffic har - operationId: addCounter + description: Add Custom Metric to the captured traffic har + operationId: addMetric tags: - BrowserUpProxy requestBody: - description: Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key + description: Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key required: true content: application/json: schema: - $ref: "#/components/schemas/Counter" + $ref: "#/components/schemas/Metric" responses: 204: - description: The counter was added. + description: The metric was added. 422: - description: The counter was invalid. + description: The metric was invalid. """ try: - counter = req.media - CounterSchema().load(counter) - self.HarCaptureAddon.add_counter_to_har(counter) + metric = req.media + MetricSchema().load(metric) + self.HarCaptureAddon.add_metric_to_har(metric) except ValidationError as err: resp.status = falcon.HTTP_422 resp.content_type = falcon.MEDIA_JSON diff --git a/mitmproxy/addons/browserup/har/har_schemas.py b/mitmproxy/addons/browserup/har/har_schemas.py index 5f88a4de72..9315cf7161 100644 --- a/mitmproxy/addons/browserup/har/har_schemas.py +++ b/mitmproxy/addons/browserup/har/har_schemas.py @@ -27,18 +27,18 @@ class ErrorSchema(Schema): ) -class CounterSchema(Schema): +class MetricSchema(Schema): name = fields.Str( metadata={ "optional": False, - "description": "Name of Custom Counter to add to the page under _counters", + "description": "Name of Custom Metric to add to the page under _metrics", } ) value = fields.Number( metadata={ "optional": False, "format": "double", - "description": "Value for the counter", + "description": "Value for the metric", } ) diff --git a/mitmproxy/addons/browserup/har_capture_addon.py b/mitmproxy/addons/browserup/har_capture_addon.py index b00916186e..273548266b 100644 --- a/mitmproxy/addons/browserup/har_capture_addon.py +++ b/mitmproxy/addons/browserup/har_capture_addon.py @@ -4,7 +4,7 @@ from mitmproxy.addons.browserup.har import flow_har_entry_patch from mitmproxy.addons.browserup.har.flow_capture import FlowCaptureMixin from mitmproxy.addons.browserup.har.har_manager import HarManagerMixin -from mitmproxy.addons.browserup.har.har_resources import CounterResource +from mitmproxy.addons.browserup.har.har_resources import MetricResource from mitmproxy.addons.browserup.har.har_resources import ErrorResource from mitmproxy.addons.browserup.har.har_resources import HarCaptureTypesResource from mitmproxy.addons.browserup.har.har_resources import HarPageResource @@ -33,7 +33,7 @@ def get_resources(self): SizeResource(self), SLAResource(self), ErrorResource(self), - CounterResource(self), + MetricResource(self), HealthCheckResource(), ] diff --git a/mitmproxy/addons/browserup/schemas/Page.json b/mitmproxy/addons/browserup/schemas/Page.json index 49194dacdf..4fa1320aae 100644 --- a/mitmproxy/addons/browserup/schemas/Page.json +++ b/mitmproxy/addons/browserup/schemas/Page.json @@ -25,10 +25,10 @@ }, "default": [] }, - "_counters": { + "_metrics": { "type": "array", "items": { - "$ref": "#/components/schemas/Counter" + "$ref": "#/components/schemas/Metric" }, "default": [] }, diff --git a/test/mitmproxy/addons/browserup/test_api.py b/test/mitmproxy/addons/browserup/test_api.py index 9e61b63f1e..d3719d4ec9 100644 --- a/test/mitmproxy/addons/browserup/test_api.py +++ b/test/mitmproxy/addons/browserup/test_api.py @@ -67,26 +67,26 @@ def test_verify_size_bad_match_criteria(self, hc): ) assert response.status == falcon.HTTP_422 - def test_add_float_counter(self, hc): + def test_add_float_metric(self, hc): response = self.client().simulate_post( - "/har/counters", json={"name": "fooAmount", "value": 5.0} + "/har/metrics", json={"name": "fooAmount", "value": 5.0} ) assert response.status == falcon.HTTP_204 - def test_add_integer_counter(self, hc): + def test_add_integer_metric(self, hc): response = self.client().simulate_post( - "/har/counters", json={"name": "fooAmount", "value": 5} + "/har/metrics", json={"name": "fooAmount", "value": 5} ) assert response.status == falcon.HTTP_204 - def test_add_counter_schema_wrong_string_instead_of_number(self, hc): + def test_add_metric_schema_wrong_string_instead_of_number(self, hc): response = self.client().simulate_post( - "/har/counters", json={"name": 3, "value": "nope"} + "/har/metrics", json={"name": 3, "value": "nope"} ) assert response.status == falcon.HTTP_422 - def test_add_counter_schema_wrong(self, hc): - response = self.client().simulate_post("/har/counters", json={"name": 3}) + def test_add_metric_schema_wrong(self, hc): + response = self.client().simulate_post("/har/metrics", json={"name": 3}) assert response.status == falcon.HTTP_422 def test_add_error(self, hc): diff --git a/test/mitmproxy/addons/browserup/test_counters.py b/test/mitmproxy/addons/browserup/test_counters.py deleted file mode 100644 index 05a92a5c68..0000000000 --- a/test/mitmproxy/addons/browserup/test_counters.py +++ /dev/null @@ -1,83 +0,0 @@ -import pytest - -from mitmproxy import http -from mitmproxy.addons.browserup import har_capture_addon -from mitmproxy.test import taddons -from mitmproxy.test import tflow -from mitmproxy.test import tutils - - -class TestHARCounters: - def test_counter_added(self, hc, flow): - hc.add_counter_to_har({"name": "time-to-first-paint", "value": 3}) - assert len(hc.get_or_create_current_page().get("_counters")) == 1 - - def test_valid_counters_added(self, hc, flow): - hc.add_counter_to_har({"name": "time-to-first-byte", "value": 1}) - hc.add_counter_to_har({"name": "time-to-first-paint", "value": 2}) - counters = hc.get_or_create_current_page().get("_counters") - assert len(counters) == 2 - assert counters[0].get("name") == "time-to-first-byte" - assert counters[0].get("value") == 1 - assert counters[1].get("name") == "time-to-first-paint" - assert counters[1].get("value") == 2 - - def test_valid_counter_added_then_reset(self, hc, flow): - hc.add_counter_to_har({"name": "time-to-first-byte", "value": 1}) - hc.add_counter_to_har({"name": "time-to-first-paint", "value": 2}) - hc.new_page("page1", "New Page!") - assert hc.get_or_create_current_page().get("_counters") is None - hc.add_counter_to_har({"name": "time-to-first-byte", "value": 1}) - counters = hc.get_or_create_current_page().get("_counters") - assert len(counters) == 1 - - def test_new_har_empty_counters(self, hc, flow): - hc.add_counter_to_har({"name": "time-to-first-byte", "value": 1}) - hc.add_counter_to_har({"name": "time-to-first-paint", "value": 2}) - hc.reset_har_and_return_old_har() - hc.new_page("page1", "New Page!") - assert hc.get_or_create_current_page().get("_counters") is None - - -@pytest.fixture() -def flow(): - resp_content = b"message" - times = dict( - timestamp_start=746203200, - timestamp_end=746203290, - ) - - return tflow.tflow( - req=tutils.treq(method=b"GET", **times), - resp=tutils.tresp(content=resp_content, **times), - ) - - -@pytest.fixture() -def json_flow(): - times = dict( - timestamp_start=746203200, - timestamp_end=746203290, - ) - - return tflow.tflow( - req=tutils.treq(method=b"GET", path=b"/path/foo.json", **times), - resp=tutils.tresp( - content=b'{"foo": "bar"}', - headers=http.Headers( - ( - (b"header-response", b"svalue"), - (b"content-type", b"application/json"), - ) - ), - **times, - ), - ) - - -@pytest.fixture() -def hc(flow): - a = har_capture_addon.HarCaptureAddOn() - with taddons.context(hc) as ctx: - ctx.configure(a) - return a diff --git a/test/mitmproxy/addons/browserup/test_metrics.py b/test/mitmproxy/addons/browserup/test_metrics.py new file mode 100644 index 0000000000..3469e8d30c --- /dev/null +++ b/test/mitmproxy/addons/browserup/test_metrics.py @@ -0,0 +1,83 @@ +import pytest + +from mitmproxy import http +from mitmproxy.addons.browserup import har_capture_addon +from mitmproxy.test import taddons +from mitmproxy.test import tflow +from mitmproxy.test import tutils + + +class TestHARMetrics: + def test_metric_added(self, hc, flow): + hc.add_metric_to_har({"name": "time-to-first-paint", "value": 3}) + assert len(hc.get_or_create_current_page().get("_metrics")) == 1 + + def test_valid_metrics_added(self, hc, flow): + hc.add_metric_to_har({"name": "time-to-first-byte", "value": 1}) + hc.add_metric_to_har({"name": "time-to-first-paint", "value": 2}) + metrics = hc.get_or_create_current_page().get("_metrics") + assert len(metrics) == 2 + assert metrics[0].get("name") == "time-to-first-byte" + assert metrics[0].get("value") == 1 + assert metrics[1].get("name") == "time-to-first-paint" + assert metrics[1].get("value") == 2 + + def test_valid_metric_added_then_reset(self, hc, flow): + hc.add_metric_to_har({"name": "time-to-first-byte", "value": 1}) + hc.add_metric_to_har({"name": "time-to-first-paint", "value": 2}) + hc.new_page("page1", "New Page!") + assert hc.get_or_create_current_page().get("_metrics") is None + hc.add_metric_to_har({"name": "time-to-first-byte", "value": 1}) + metrics = hc.get_or_create_current_page().get("_metrics") + assert len(metrics) == 1 + + def test_new_har_empty_metrics(self, hc, flow): + hc.add_metric_to_har({"name": "time-to-first-byte", "value": 1}) + hc.add_metric_to_har({"name": "time-to-first-paint", "value": 2}) + hc.reset_har_and_return_old_har() + hc.new_page("page1", "New Page!") + assert hc.get_or_create_current_page().get("_metrics") is None + + +@pytest.fixture() +def flow(): + resp_content = b"message" + times = dict( + timestamp_start=746203200, + timestamp_end=746203290, + ) + + return tflow.tflow( + req=tutils.treq(method=b"GET", **times), + resp=tutils.tresp(content=resp_content, **times), + ) + + +@pytest.fixture() +def json_flow(): + times = dict( + timestamp_start=746203200, + timestamp_end=746203290, + ) + + return tflow.tflow( + req=tutils.treq(method=b"GET", path=b"/path/foo.json", **times), + resp=tutils.tresp( + content=b'{"foo": "bar"}', + headers=http.Headers( + ( + (b"header-response", b"svalue"), + (b"content-type", b"application/json"), + ) + ), + **times, + ), + ) + + +@pytest.fixture() +def hc(flow): + a = har_capture_addon.HarCaptureAddOn() + with taddons.context(hc) as ctx: + ctx.configure(a) + return a From 438d7e8c8fb778bdbed8f91e72c3137d66875f66 Mon Sep 17 00:00:00 2001 From: Eric Beland Date: Mon, 24 Mar 2025 00:00:35 -0400 Subject: [PATCH 2/8] Add dev-null.com domain for fake requests that produce a HAR, but cause no external traffic. --- .../browserup/browserup_addons_manager.py | 4 + .../browserup/har_dummy_traffic_addon.py | 169 ++++++++++++++++++ .../browserup/test_har_dummy_traffic_addon.py | 147 +++++++++++++++ 3 files changed, 320 insertions(+) create mode 100644 mitmproxy/addons/browserup/har_dummy_traffic_addon.py create mode 100644 test/mitmproxy/addons/browserup/test_har_dummy_traffic_addon.py diff --git a/mitmproxy/addons/browserup/browserup_addons_manager.py b/mitmproxy/addons/browserup/browserup_addons_manager.py index 76df6991e6..7d38348540 100644 --- a/mitmproxy/addons/browserup/browserup_addons_manager.py +++ b/mitmproxy/addons/browserup/browserup_addons_manager.py @@ -20,6 +20,7 @@ from mitmproxy.addons.browserup.har.har_schemas import PageTimingSchema from mitmproxy.addons.browserup.har.har_schemas import VerifyResultSchema from mitmproxy.addons.browserup.har_capture_addon import HarCaptureAddOn +from mitmproxy.addons.browserup.har_dummy_traffic_addon import HarDummyTrafficAddon # https://marshmallow.readthedocs.io/en/stable/quickstart.html @@ -168,8 +169,11 @@ def start_falcon(self): har_capture_addon = HarCaptureAddOn() +har_dummy_traffic_addon = HarDummyTrafficAddon() + addons = [ har_capture_addon, BrowserDataAddOn(har_capture_addon), + har_dummy_traffic_addon, BrowserUpAddonsManagerAddOn(), ] diff --git a/mitmproxy/addons/browserup/har_dummy_traffic_addon.py b/mitmproxy/addons/browserup/har_dummy_traffic_addon.py new file mode 100644 index 0000000000..4f51fc24ff --- /dev/null +++ b/mitmproxy/addons/browserup/har_dummy_traffic_addon.py @@ -0,0 +1,169 @@ +import logging +import json +from urllib.parse import parse_qsl +import copy + +from mitmproxy import http + + +def set_nested_value(obj, path, value): + """ + Given a dictionary `obj`, create/overwrite a nested key following dot notation. + Example: set_nested_value(obj, "response.headers.0.name", "Content-Type") + """ + parts = path.split(".") + ref = obj + for i, part in enumerate(parts): + is_last = (i == len(parts) - 1) + + # Handle array-like keys: e.g. "headers.0" + if part.isdigit(): + # Convert string index to int + idx = int(part) + if not isinstance(ref, list): + ref[:] = [] # or initialize list if needed + # Expand list size if needed + while len(ref) <= idx: + ref.append({}) + if is_last: + ref[idx] = value + else: + if not isinstance(ref[idx], dict) and not isinstance(ref[idx], list): + ref[idx] = {} + ref = ref[idx] + else: + # Dictionary key + if part not in ref or not isinstance(ref[part], (dict, list)): + # Create nested dict if needed + if not is_last: + ref[part] = {} + if is_last: + # Final key gets the value + ref[part] = value + else: + ref = ref[part] + return obj + + +class HarDummyResource: + def addon_path(self): + return "har/dummy/example" + + def __init__(self, dummy_addon): + self.dummy_addon = dummy_addon + + def on_get(self, req, resp): + """ + Example endpoint to explain dummy traffic feature + --- + description: Example of how to use the dummy traffic feature + operationId: getDummyTrafficExample + tags: + - BrowserUpProxy + responses: + 200: + description: Success - Returns example usage + content: + application/json: + schema: + type: object + properties: + example: + type: string + """ + examples = { + "examples": [ + "http://dev-null.com/any/path?timings.wait=20&response.bodySize=1453", + "http://dev-null.com/any/path?status=404&timings.wait=20&response.bodySize=1453", + "http://dev-null.com/any/path?response.headers.0.name=Content-Type&response.headers.0.value=application/json" + ], + "description": "The dev-null.com domain is reserved for dummy traffic. Any requests to this domain will be intercepted and used to create HAR entries with custom values." + } + resp.content_type = "application/json" + resp.body = json.dumps(examples).encode('utf-8') + + +class HarDummyTrafficAddon: + def __init__(self): + self.har_manager = None + + def load(self, loader): + logging.info("Loading HarDummyTrafficAddon") + + def configure(self, updated): + pass + + def get_resources(self): + return [HarDummyResource(self)] + + def request(self, flow: http.HTTPFlow): + # Only handle dev-null.com domain + if not flow.request.pretty_host.lower().endswith("dev-null.com"): + return + + # Default status code + status_code = 204 + har_updates = {} + + # Parse query string for HAR customizations + for key, val in flow.request.query.items(): + if key == "status": + # Override status code + try: + status_code = int(val) + except ValueError: + status_code = 204 # Default if value is not a valid integer + else: + # Convert to appropriate type (int or float if possible) + try: + if "." in val: + numeric_val = float(val) + else: + numeric_val = int(val) + val = numeric_val + except ValueError: + pass # Keep as string if not numeric + + # Store the key-value pair for HAR customization + har_updates[key] = val + + # Add minimal headers + headers = {"Content-Type": "text/plain"} + + # Short-circuit the flow with an empty body + flow.response = http.Response.make( + status_code, + b"", # empty body + headers + ) + + # Store the HAR updates in flow.metadata so we can apply them in the response hook + flow.metadata["har_updates"] = har_updates + logging.info(f"Created dummy response with HAR updates: {har_updates}") + + def response(self, flow: http.HTTPFlow): + # Only process requests to dev-null.com that have HAR updates + if not flow.request.pretty_host.lower().endswith("dev-null.com") or "har_updates" not in flow.metadata: + return + + # Access the har_entry directly from the flow (added by flow_har_entry_patch) + if not hasattr(flow, "har_entry"): + logging.warning("Flow has no har_entry attribute, cannot apply HAR updates") + return + + har_entry = flow.har_entry + har_updates = flow.metadata["har_updates"] + + # Apply each update to the HAR entry using dot notation + for path, value in har_updates.items(): + if "." in path: + # Handle dot notation for nested fields + set_nested_value(har_entry, path, value) + else: + # Handle simple top-level fields + har_entry[path] = value + + logging.info(f"Applied HAR updates to entry: {har_updates}") + + +addons = [HarDummyTrafficAddon()] \ No newline at end of file diff --git a/test/mitmproxy/addons/browserup/test_har_dummy_traffic_addon.py b/test/mitmproxy/addons/browserup/test_har_dummy_traffic_addon.py new file mode 100644 index 0000000000..c649fc564a --- /dev/null +++ b/test/mitmproxy/addons/browserup/test_har_dummy_traffic_addon.py @@ -0,0 +1,147 @@ +import pytest +import json +from unittest.mock import MagicMock + +from mitmproxy.test import tflow +from mitmproxy.addons.browserup.har_dummy_traffic_addon import ( + HarDummyTrafficAddon, + set_nested_value +) + + +def test_set_nested_value_basic_dict(): + obj = {} + set_nested_value(obj, "a", 1) + assert obj == {"a": 1} + + +def test_set_nested_value_nested_dict(): + obj = {} + set_nested_value(obj, "a.b.c", 1) + assert obj == {"a": {"b": {"c": 1}}} + + +def test_set_nested_value_array_index(): + obj = {"items": []} + set_nested_value(obj, "items.0.name", "item1") + assert obj == {"items": [{"name": "item1"}]} + + +def test_set_nested_value_create_arrays_with_gaps(): + obj = {} + set_nested_value(obj, "items.2.name", "item3") + assert obj["items"][0] == {} + assert obj["items"][1] == {} + assert obj["items"][2]["name"] == "item3" + + +def test_request_non_devnull(): + # Setup + addon = HarDummyTrafficAddon() + flow = tflow.tflow() + flow.request.host = "example.com" + + # Test + addon.request(flow) + + # Verify - should not modify normal flows + assert flow.response is None + + +def test_request_devnull_basic(): + # Setup + addon = HarDummyTrafficAddon() + flow = tflow.tflow() + flow.request.host = "dev-null.com" + flow.request.query = {} + + # Test + addon.request(flow) + + # Verify - should create default 204 response + assert flow.response.status_code == 204 + assert flow.response.content == b"" + assert flow.metadata["har_updates"] == {} + + +def test_request_devnull_with_status(): + # Setup + addon = HarDummyTrafficAddon() + flow = tflow.tflow() + flow.request.host = "dev-null.com" + flow.request.query = {"status": "404"} + + # Test + addon.request(flow) + + # Verify - should create response with specified status + assert flow.response.status_code == 404 + assert flow.response.content == b"" + + +def test_request_devnull_with_har_values(): + # Setup + addon = HarDummyTrafficAddon() + flow = tflow.tflow() + flow.request.host = "dev-null.com" + flow.request.query = { + "timings.wait": "20", + "response.bodySize": "1453" + } + + # Test + addon.request(flow) + + # Verify - should store HAR updates in metadata + assert flow.response.status_code == 204 + assert flow.metadata["har_updates"] == { + "timings.wait": 20, + "response.bodySize": 1453 + } + + +def test_response_updates_har_entry(): + # Setup + addon = HarDummyTrafficAddon() + flow = tflow.tflow(resp=True) + flow.request.host = "dev-null.com" + + # Mock a HAR entry on the flow + flow.har_entry = { + "timings": {}, + "response": {} + } + + flow.metadata = { + "har_updates": { + "timings.wait": 50, + "response.bodySize": 2000 + } + } + + # Test + addon.response(flow) + + # Verify HAR entry was updated correctly + assert flow.har_entry["timings"]["wait"] == 50 + assert flow.har_entry["response"]["bodySize"] == 2000 + + +def test_resource_provides_examples(): + # Setup + from mitmproxy.addons.browserup.har_dummy_traffic_addon import HarDummyResource + + addon = HarDummyTrafficAddon() + resource = HarDummyResource(addon) + + req = MagicMock() + resp = MagicMock() + + # Test + resource.on_get(req, resp) + + # Verify response contains examples + assert resp.content_type == "application/json" + response_body = json.loads(resp.body.decode('utf-8')) + assert "examples" in response_body + assert len(response_body["examples"]) > 0 \ No newline at end of file From 3b1086d38da356a8e2ea9ec8b95eab888d841598 Mon Sep 17 00:00:00 2001 From: Eric Beland Date: Tue, 25 Mar 2025 21:28:13 -0400 Subject: [PATCH 3/8] Add har dummy traffic addon --- .../browserup/har_dummy_traffic_addon.py | 183 ++++++++++++++++-- .../browserup/test_har_dummy_traffic_addon.py | 88 ++++++--- test/mitmproxy/addons/test_clientplayback.py | 1 - 3 files changed, 220 insertions(+), 52 deletions(-) diff --git a/mitmproxy/addons/browserup/har_dummy_traffic_addon.py b/mitmproxy/addons/browserup/har_dummy_traffic_addon.py index 4f51fc24ff..877b1b8841 100644 --- a/mitmproxy/addons/browserup/har_dummy_traffic_addon.py +++ b/mitmproxy/addons/browserup/har_dummy_traffic_addon.py @@ -1,9 +1,13 @@ -import logging -import json -from urllib.parse import parse_qsl import copy +import json +import logging +import time +import uuid +from datetime import datetime +from datetime import timezone from mitmproxy import http +from mitmproxy.addons.browserup.har.har_builder import HarBuilder def set_nested_value(obj, path, value): @@ -21,10 +25,20 @@ def set_nested_value(obj, path, value): # Convert string index to int idx = int(part) if not isinstance(ref, list): - ref[:] = [] # or initialize list if needed + # Initialize as a list if it's not already one + if isinstance(ref, dict) and not ref: + ref.clear() # Make sure it's empty + ref[part] = [] + ref = ref[part] + continue + # If we're trying to set an array on something else, just create a new list + ref = [] + obj[parts[i-1]] = ref # Reassign to the parent + # Expand list size if needed while len(ref) <= idx: ref.append({}) + if is_last: ref[idx] = value else: @@ -68,21 +82,121 @@ def on_get(self, req, resp): schema: type: object properties: - example: + examples: + type: array + items: + type: string + description: type: string + defaultValues: + type: object """ examples = { + "description": "The dev-null.com domain is reserved for dummy traffic. Any requests to this domain will be intercepted and used to create HAR entries with custom values.", + "examples": [ - "http://dev-null.com/any/path?timings.wait=20&response.bodySize=1453", + "http://dev-null.com/any/path", + "http://dev-null.com/any/path?timings.wait=150", "http://dev-null.com/any/path?status=404&timings.wait=20&response.bodySize=1453", "http://dev-null.com/any/path?response.headers.0.name=Content-Type&response.headers.0.value=application/json" ], - "description": "The dev-null.com domain is reserved for dummy traffic. Any requests to this domain will be intercepted and used to create HAR entries with custom values." + + "defaultValues": { + "General structure": "A default HAR entry is automatically created with reasonable values for timings, sizes, etc.", + "Request": "Includes method, URL, HTTP version, headers, etc.", + "Response": "Includes status code, headers, content info, etc.", + "Timings": "Includes reasonable values for send, wait, receive times", + "Other": "Includes server IP, connection ID, etc." + }, + + "commonCustomizations": { + "status": "HTTP status code (e.g., 200, 404, 500)", + "timings.wait": "Time waiting for server response in ms", + "timings.receive": "Time downloading response in ms", + "response.bodySize": "Size of response body in bytes", + "response.content.size": "Size of content in bytes", + "response.content.mimeType": "MIME type of response (e.g., 'application/json')" + } } + resp.content_type = "application/json" resp.body = json.dumps(examples).encode('utf-8') +def create_default_har_entry(url, method="GET", status_code=200): + """ + Create a default HAR entry with reasonable values that can be overridden. + """ + now = datetime.now(timezone.utc).isoformat() + req_start_time = time.time() - 1 # 1 second ago + req_end_time = time.time() + + # Calculate some reasonable default timing values + total_time = int((req_end_time - req_start_time) * 1000) # milliseconds + wait_time = int(total_time * 0.6) # 60% of time in wait + receive_time = int(total_time * 0.3) # 30% in receive + send_time = total_time - wait_time - receive_time # remainder in send + + # Use UUID for unique IDs + connection_id = str(uuid.uuid4()) + + # Create default HAR entry using HarBuilder for consistency + har_entry = HarBuilder.entry() + + # Override with sensible defaults + har_entry.update({ + "startedDateTime": now, + "time": total_time, + "request": { + "method": method, + "url": url, + "httpVersion": "HTTP/1.1", + "cookies": [], + "headers": [ + {"name": "Host", "value": "dev-null.com"}, + {"name": "User-Agent", "value": "BrowserUp-DummyTraffic/1.0"}, + {"name": "Accept", "value": "*/*"} + ], + "queryString": [], + "headersSize": 250, + "bodySize": 0, + }, + "response": { + "status": status_code, + "statusText": "OK" if status_code == 200 else "", + "httpVersion": "HTTP/1.1", + "cookies": [], + "headers": [ + {"name": "Content-Type", "value": "text/plain"}, + {"name": "Content-Length", "value": "0"}, + {"name": "Date", "value": now} + ], + "content": { + "size": 0, + "mimeType": "text/plain", + "text": "", + }, + "redirectURL": "", + "headersSize": 150, + "bodySize": 0, + }, + "cache": {}, + "timings": { + "blocked": 0, + "dns": 0, + "connect": 0, + "ssl": 0, + "send": send_time, + "wait": wait_time, + "receive": receive_time, + }, + "serverIPAddress": "127.0.0.1", + "connection": connection_id, + }) + + return har_entry + + class HarDummyTrafficAddon: def __init__(self): self.har_manager = None @@ -137,13 +251,25 @@ def request(self, flow: http.HTTPFlow): headers ) + # Create a default HAR entry that will be populated later + flow.metadata["dummy_har_entry"] = create_default_har_entry( + url=flow.request.url, + method=flow.request.method, + status_code=status_code + ) + # Store the HAR updates in flow.metadata so we can apply them in the response hook flow.metadata["har_updates"] = har_updates logging.info(f"Created dummy response with HAR updates: {har_updates}") def response(self, flow: http.HTTPFlow): - # Only process requests to dev-null.com that have HAR updates - if not flow.request.pretty_host.lower().endswith("dev-null.com") or "har_updates" not in flow.metadata: + # Only process requests to dev-null.com + if not flow.request.pretty_host.lower().endswith("dev-null.com"): + return + + # Check if we have a default HAR entry from our request handler + if "dummy_har_entry" not in flow.metadata: + logging.warning("No dummy HAR entry found in flow metadata") return # Access the har_entry directly from the flow (added by flow_har_entry_patch) @@ -151,19 +277,36 @@ def response(self, flow: http.HTTPFlow): logging.warning("Flow has no har_entry attribute, cannot apply HAR updates") return + # Copy our default HAR entry to the real HAR entry + default_har = flow.metadata["dummy_har_entry"] har_entry = flow.har_entry - har_updates = flow.metadata["har_updates"] - - # Apply each update to the HAR entry using dot notation - for path, value in har_updates.items(): - if "." in path: - # Handle dot notation for nested fields - set_nested_value(har_entry, path, value) + + # Apply all values from our default HAR to the real HAR entry + # This is a deep update that preserves existing nested structures + for key, value in default_har.items(): + if key in har_entry and isinstance(har_entry[key], dict) and isinstance(value, dict): + # Deep update dictionaries + har_entry[key].update(value) else: - # Handle simple top-level fields - har_entry[path] = value - - logging.info(f"Applied HAR updates to entry: {har_updates}") + # Otherwise, just replace the value + har_entry[key] = copy.deepcopy(value) + + # Apply any custom updates from query parameters + if "har_updates" in flow.metadata: + har_updates = flow.metadata["har_updates"] + + # Apply each update to the HAR entry using dot notation + for path, value in har_updates.items(): + if "." in path: + # Handle dot notation for nested fields + set_nested_value(har_entry, path, value) + else: + # Handle simple top-level fields + har_entry[path] = value + + logging.info(f"Applied HAR updates to entry: {har_updates}") + + logging.info("Successfully updated HAR entry with default values and custom overrides") addons = [HarDummyTrafficAddon()] \ No newline at end of file diff --git a/test/mitmproxy/addons/browserup/test_har_dummy_traffic_addon.py b/test/mitmproxy/addons/browserup/test_har_dummy_traffic_addon.py index c649fc564a..9d96081c6e 100644 --- a/test/mitmproxy/addons/browserup/test_har_dummy_traffic_addon.py +++ b/test/mitmproxy/addons/browserup/test_har_dummy_traffic_addon.py @@ -1,12 +1,14 @@ -import pytest import json from unittest.mock import MagicMock +import pytest + +from mitmproxy.addons.browserup.har_dummy_traffic_addon import create_default_har_entry +from mitmproxy.addons.browserup.har_dummy_traffic_addon import HarDummyResource +from mitmproxy.addons.browserup.har_dummy_traffic_addon import HarDummyTrafficAddon +from mitmproxy.addons.browserup.har_dummy_traffic_addon import set_nested_value +from mitmproxy.test import taddons from mitmproxy.test import tflow -from mitmproxy.addons.browserup.har_dummy_traffic_addon import ( - HarDummyTrafficAddon, - set_nested_value -) def test_set_nested_value_basic_dict(): @@ -28,60 +30,57 @@ def test_set_nested_value_array_index(): def test_set_nested_value_create_arrays_with_gaps(): - obj = {} + obj = {"items": []} # Initialize with an empty array set_nested_value(obj, "items.2.name", "item3") assert obj["items"][0] == {} assert obj["items"][1] == {} assert obj["items"][2]["name"] == "item3" -def test_request_non_devnull(): +def test_request_non_devnull(dummy_addon): # Setup - addon = HarDummyTrafficAddon() flow = tflow.tflow() flow.request.host = "example.com" # Test - addon.request(flow) + dummy_addon.request(flow) # Verify - should not modify normal flows assert flow.response is None -def test_request_devnull_basic(): +def test_request_devnull_basic(dummy_addon): # Setup - addon = HarDummyTrafficAddon() flow = tflow.tflow() flow.request.host = "dev-null.com" flow.request.query = {} # Test - addon.request(flow) + dummy_addon.request(flow) # Verify - should create default 204 response assert flow.response.status_code == 204 assert flow.response.content == b"" assert flow.metadata["har_updates"] == {} + assert "dummy_har_entry" in flow.metadata -def test_request_devnull_with_status(): +def test_request_devnull_with_status(dummy_addon): # Setup - addon = HarDummyTrafficAddon() flow = tflow.tflow() flow.request.host = "dev-null.com" flow.request.query = {"status": "404"} # Test - addon.request(flow) + dummy_addon.request(flow) # Verify - should create response with specified status assert flow.response.status_code == 404 assert flow.response.content == b"" -def test_request_devnull_with_har_values(): +def test_request_devnull_with_har_values(dummy_addon): # Setup - addon = HarDummyTrafficAddon() flow = tflow.tflow() flow.request.host = "dev-null.com" flow.request.query = { @@ -90,7 +89,7 @@ def test_request_devnull_with_har_values(): } # Test - addon.request(flow) + dummy_addon.request(flow) # Verify - should store HAR updates in metadata assert flow.response.status_code == 204 @@ -100,9 +99,8 @@ def test_request_devnull_with_har_values(): } -def test_response_updates_har_entry(): +def test_response_updates_har_entry(dummy_addon): # Setup - addon = HarDummyTrafficAddon() flow = tflow.tflow(resp=True) flow.request.host = "dev-null.com" @@ -112,7 +110,9 @@ def test_response_updates_har_entry(): "response": {} } + # Create a dummy HAR entry and apply updates flow.metadata = { + "dummy_har_entry": create_default_har_entry(url=flow.request.url), "har_updates": { "timings.wait": 50, "response.bodySize": 2000 @@ -120,19 +120,35 @@ def test_response_updates_har_entry(): } # Test - addon.response(flow) + dummy_addon.response(flow) - # Verify HAR entry was updated correctly - assert flow.har_entry["timings"]["wait"] == 50 - assert flow.har_entry["response"]["bodySize"] == 2000 + # Verify HAR entry was updated with both default values and custom overrides + assert flow.har_entry["timings"]["wait"] == 50 # Custom override + assert flow.har_entry["response"]["bodySize"] == 2000 # Custom override + assert flow.har_entry["request"]["method"] == "GET" # Default value + assert "serverIPAddress" in flow.har_entry # Default value + assert len(flow.har_entry["request"]["headers"]) > 0 # Default headers -def test_resource_provides_examples(): - # Setup - from mitmproxy.addons.browserup.har_dummy_traffic_addon import HarDummyResource +def test_create_default_har_entry(): + # Create a default HAR entry + url = "http://example.com/test" + har_entry = create_default_har_entry(url=url, method="POST", status_code=201) - addon = HarDummyTrafficAddon() - resource = HarDummyResource(addon) + # Verify it has the correct structure and values + assert har_entry["request"]["url"] == url + assert har_entry["request"]["method"] == "POST" + assert har_entry["response"]["status"] == 201 + assert "timings" in har_entry + for key in ["send", "wait", "receive"]: + assert key in har_entry["timings"] + assert "serverIPAddress" in har_entry + assert "connection" in har_entry + + +def test_resource_provides_examples(dummy_addon): + # Setup + resource = HarDummyResource(dummy_addon) req = MagicMock() resp = MagicMock() @@ -140,8 +156,18 @@ def test_resource_provides_examples(): # Test resource.on_get(req, resp) - # Verify response contains examples + # Verify response contains examples and documentation assert resp.content_type == "application/json" response_body = json.loads(resp.body.decode('utf-8')) assert "examples" in response_body - assert len(response_body["examples"]) > 0 \ No newline at end of file + assert len(response_body["examples"]) > 0 + assert "defaultValues" in response_body + assert "commonCustomizations" in response_body + + +@pytest.fixture() +def dummy_addon(): + a = HarDummyTrafficAddon() + with taddons.context(a) as ctx: + ctx.configure(a) + return a \ No newline at end of file diff --git a/test/mitmproxy/addons/test_clientplayback.py b/test/mitmproxy/addons/test_clientplayback.py index b2f210606f..69fd06b897 100644 --- a/test/mitmproxy/addons/test_clientplayback.py +++ b/test/mitmproxy/addons/test_clientplayback.py @@ -14,7 +14,6 @@ from mitmproxy.test import taddons from mitmproxy.test import tflow - @asynccontextmanager async def tcp_server(handle_conn, **server_args) -> Address: """TCP server context manager that... From 647eac17f2eaad27d8d12f2f4f3c9729e22e955c Mon Sep 17 00:00:00 2001 From: Eric Beland Date: Tue, 25 Mar 2025 21:36:47 -0400 Subject: [PATCH 4/8] Regenerated clients --- clients/csharp/.openapi-generator/FILES | 131 +- clients/csharp/.openapi-generator/VERSION | 2 +- ...lient.sln => BrowserUpMitmProxyClient.sln} | 12 +- clients/csharp/README.md | 53 +- clients/csharp/api/openapi.yaml | 2098 ----------------- clients/csharp/appveyor.yml | 2 +- clients/csharp/docs/Action.md | 2 +- clients/csharp/docs/BrowserUpProxyApi.md | 136 +- clients/csharp/docs/Error.md | 2 +- clients/csharp/docs/Har.md | 2 +- clients/csharp/docs/HarEntry.md | 2 +- clients/csharp/docs/HarEntryCache.md | 2 +- .../csharp/docs/HarEntryCacheBeforeRequest.md | 2 +- .../docs/HarEntryCacheBeforeRequestOneOf.md | 2 +- clients/csharp/docs/HarEntryRequest.md | 2 +- .../docs/HarEntryRequestCookiesInner.md | 2 +- .../csharp/docs/HarEntryRequestPostData.md | 4 +- .../HarEntryRequestPostDataParamsInner.md | 2 +- .../docs/HarEntryRequestQueryStringInner.md | 2 +- clients/csharp/docs/HarEntryResponse.md | 2 +- .../csharp/docs/HarEntryResponseContent.md | 2 +- clients/csharp/docs/HarEntryTimings.md | 2 +- clients/csharp/docs/HarLog.md | 4 +- clients/csharp/docs/HarLogCreator.md | 4 +- clients/csharp/docs/Header.md | 2 +- clients/csharp/docs/LargestContentfulPaint.md | 2 +- clients/csharp/docs/MatchCriteria.md | 10 +- .../csharp/docs/MatchCriteriaRequestHeader.md | 2 +- clients/csharp/docs/{Counter.md => Metric.md} | 6 +- clients/csharp/docs/NameValuePair.md | 2 +- clients/csharp/docs/Page.md | 4 +- clients/csharp/docs/PageTiming.md | 2 +- clients/csharp/docs/PageTimings.md | 2 +- clients/csharp/docs/VerifyResult.md | 2 +- clients/csharp/docs/WebSocketMessage.md | 2 +- .../Model/HarEntryCacheBeforeRequest.cs | 211 -- .../Api/BrowserUpProxyApiTests.cs | 26 +- .../BrowserUpMitmProxyClient.Test.csproj} | 12 +- .../Model/ActionTests.cs | 9 +- .../Model/ErrorTests.cs | 21 +- .../HarEntryCacheBeforeRequestOneOfTests.cs | 9 +- .../Model/HarEntryCacheBeforeRequestTests.cs | 9 +- .../Model/HarEntryCacheTests.cs | 9 +- .../Model/HarEntryRequestCookiesInnerTests.cs | 9 +- ...HarEntryRequestPostDataParamsInnerTests.cs | 9 +- .../Model/HarEntryRequestPostDataTests.cs | 9 +- .../HarEntryRequestQueryStringInnerTests.cs | 9 +- .../Model/HarEntryRequestTests.cs | 9 +- .../Model/HarEntryResponseContentTests.cs | 73 +- .../Model/HarEntryResponseTests.cs | 9 +- .../Model/HarEntryTests.cs | 9 +- .../Model/HarEntryTimingsTests.cs | 9 +- .../Model/HarLogCreatorTests.cs | 9 +- .../Model/HarLogTests.cs | 9 +- .../Model/HarTests.cs | 9 +- .../Model/HeaderTests.cs | 9 +- .../Model/LargestContentfulPaintTests.cs | 9 +- .../Model/MatchCriteriaRequestHeaderTests.cs | 21 +- .../Model/MatchCriteriaTests.cs | 9 +- .../Model/MetricTests.cs} | 43 +- .../Model/NameValuePairTests.cs | 21 +- .../Model/PageTests.cs | 15 +- .../Model/PageTimingTests.cs | 81 +- .../Model/PageTimingsTests.cs | 9 +- .../Model/VerifyResultTests.cs | 21 +- .../Model/WebSocketMessageTests.cs | 9 +- .../Api/BrowserUpProxyApi.cs | 610 ++--- .../BrowserUpMitmProxyClient.csproj} | 15 +- .../Client/ApiClient.cs | 288 +-- .../Client/ApiException.cs | 4 +- .../Client/ApiResponse.cs | 4 +- .../Client/ClientUtils.cs | 13 +- .../Client/Configuration.cs | 32 +- .../Client/ExceptionFactory.cs | 4 +- .../Client/GlobalConfiguration.cs | 4 +- .../Client/HttpMethod.cs | 4 +- .../Client/IApiAccessor.cs | 4 +- .../Client/IAsynchronousClient.cs | 4 +- .../Client/IReadableConfiguration.cs | 16 +- .../Client/ISynchronousClient.cs | 4 +- .../Client/Multimap.cs | 4 +- .../Client/OpenAPIDateConverter.cs | 4 +- .../Client/RequestOptions.cs | 4 +- .../Client/RetryConfiguration.cs | 4 +- .../Model/AbstractOpenAPISchema.cs | 4 +- .../Model/Action.cs | 8 +- .../Model/Error.cs | 8 +- .../Model/Har.cs | 18 +- .../Model/HarEntry.cs | 8 +- .../Model/HarEntryCache.cs | 12 +- .../Model/HarEntryCacheBeforeRequest.cs | 256 ++ .../Model/HarEntryCacheBeforeRequestOneOf.cs | 8 +- .../Model/HarEntryRequest.cs | 18 +- .../Model/HarEntryRequestCookiesInner.cs | 8 +- .../Model/HarEntryRequestPostData.cs | 32 +- .../HarEntryRequestPostDataParamsInner.cs | 8 +- .../Model/HarEntryRequestQueryStringInner.cs | 8 +- .../Model/HarEntryResponse.cs | 18 +- .../Model/HarEntryResponseContent.cs | 8 +- .../Model/HarEntryTimings.cs | 8 +- .../Model/HarLog.cs | 36 +- .../Model/HarLogCreator.cs | 36 +- .../Model/Header.cs | 8 +- .../Model/LargestContentfulPaint.cs | 24 +- .../Model/MatchCriteria.cs | 18 +- .../Model/MatchCriteriaRequestHeader.cs | 8 +- .../Model/Metric.cs} | 40 +- .../Model/NameValuePair.cs | 8 +- .../Model/Page.cs | 44 +- .../Model/PageTiming.cs | 8 +- .../Model/PageTimings.cs | 22 +- .../Model/VerifyResult.cs | 8 +- .../Model/WebSocketMessage.cs | 8 +- clients/java/.openapi-generator/FILES | 38 +- clients/java/.openapi-generator/VERSION | 2 +- clients/java/README.md | 19 +- clients/java/api/openapi.yaml | 230 +- clients/java/build.gradle | 52 +- clients/java/build.sbt | 2 +- clients/java/docs/BrowserUpProxyApi.md | 58 +- clients/java/docs/Counter.md | 14 - clients/java/docs/HarEntryRequest.md | 2 +- clients/java/docs/MatchCriteria.md | 8 +- clients/java/docs/Metric.md | 14 + clients/java/docs/Page.md | 2 +- clients/java/pom.xml | 3 +- .../proxy/api/BrowserUpProxyApi.java | 125 +- .../proxy_client/AbstractOpenApiSchema.java | 5 +- .../com/browserup/proxy_client/Action.java | 39 +- .../browserup/proxy_client/ApiCallback.java | 2 +- .../com/browserup/proxy_client/ApiClient.java | 11 +- .../browserup/proxy_client/ApiException.java | 5 +- .../browserup/proxy_client/ApiResponse.java | 2 +- .../browserup/proxy_client/Configuration.java | 4 +- .../com/browserup/proxy_client/Error.java | 33 +- .../proxy_client/GzipRequestInterceptor.java | 2 +- .../java/com/browserup/proxy_client/Har.java | 33 +- .../com/browserup/proxy_client/HarEntry.java | 54 +- .../browserup/proxy_client/HarEntryCache.java | 50 +- .../HarEntryCacheBeforeRequest.java | 428 ++-- .../HarEntryCacheBeforeRequestOneOf.java | 11 +- .../proxy_client/HarEntryRequest.java | 66 +- .../HarEntryRequestCookiesInner.java | 43 +- .../proxy_client/HarEntryRequestPostData.java | 42 +- .../HarEntryRequestPostDataParamsInner.java | 36 +- .../HarEntryRequestQueryStringInner.java | 38 +- .../proxy_client/HarEntryResponse.java | 52 +- .../proxy_client/HarEntryResponseContent.java | 49 +- .../proxy_client/HarEntryTimings.java | 43 +- .../com/browserup/proxy_client/HarLog.java | 53 +- .../browserup/proxy_client/HarLogCreator.java | 38 +- .../com/browserup/proxy_client/Header.java | 38 +- .../java/com/browserup/proxy_client/JSON.java | 6 +- .../proxy_client/LargestContentfulPaint.java | 30 +- .../browserup/proxy_client/MatchCriteria.java | 87 +- .../MatchCriteriaRequestHeader.java | 8 +- .../{Counter.java => Metric.java} | 85 +- .../browserup/proxy_client/NameValuePair.java | 33 +- .../java/com/browserup/proxy_client/Page.java | 106 +- .../browserup/proxy_client/PageTiming.java | 43 +- .../browserup/proxy_client/PageTimings.java | 43 +- .../java/com/browserup/proxy_client/Pair.java | 2 +- .../proxy_client/ProgressRequestBody.java | 2 +- .../proxy_client/ProgressResponseBody.java | 2 +- .../browserup/proxy_client/StringUtil.java | 2 +- .../browserup/proxy_client/VerifyResult.java | 34 +- .../proxy_client/WebSocketMessage.java | 39 +- .../proxy_client/auth/ApiKeyAuth.java | 2 +- .../proxy_client/auth/Authentication.java | 2 +- .../proxy_client/auth/HttpBasicAuth.java | 2 +- .../proxy_client/auth/HttpBearerAuth.java | 2 +- .../proxy/api/BrowserUpProxyApiTest.java | 20 +- .../browserup/proxy_client/ActionTest.java | 2 +- .../com/browserup/proxy_client/ErrorTest.java | 14 +- .../HarEntryCacheBeforeRequestOneOfTest.java | 2 +- .../HarEntryCacheBeforeRequestTest.java | 2 +- .../proxy_client/HarEntryCacheTest.java | 2 +- .../HarEntryRequestCookiesInnerTest.java | 2 +- ...arEntryRequestPostDataParamsInnerTest.java | 2 +- .../HarEntryRequestPostDataTest.java | 2 +- .../HarEntryRequestQueryStringInnerTest.java | 2 +- .../proxy_client/HarEntryRequestTest.java | 3 +- .../HarEntryResponseContentTest.java | 66 +- .../proxy_client/HarEntryResponseTest.java | 2 +- .../browserup/proxy_client/HarEntryTest.java | 2 +- .../proxy_client/HarEntryTimingsTest.java | 2 +- .../proxy_client/HarLogCreatorTest.java | 2 +- .../browserup/proxy_client/HarLogTest.java | 2 +- .../com/browserup/proxy_client/HarTest.java | 2 +- .../browserup/proxy_client/HeaderTest.java | 2 +- .../LargestContentfulPaintTest.java | 2 +- .../MatchCriteriaRequestHeaderTest.java | 14 +- .../proxy_client/MatchCriteriaTest.java | 2 +- .../{CounterTest.java => MetricTest.java} | 26 +- .../proxy_client/NameValuePairTest.java | 14 +- .../com/browserup/proxy_client/PageTest.java | 10 +- .../proxy_client/PageTimingTest.java | 74 +- .../proxy_client/PageTimingsTest.java | 2 +- .../proxy_client/VerifyResultTest.java | 14 +- .../proxy_client/WebSocketMessageTest.java | 2 +- clients/javascript/.openapi-generator/FILES | 9 +- clients/javascript/README.md | 11 +- clients/javascript/docs/Action.md | 16 + clients/javascript/docs/BrowserUpProxyApi.md | 26 +- clients/javascript/docs/Counter.md | 10 - clients/javascript/docs/Error.md | 2 +- .../docs/HarEntryResponseContent.md | 8 + .../docs/MatchCriteriaRequestHeader.md | 2 +- clients/javascript/docs/Metric.md | 10 + clients/javascript/docs/NameValuePair.md | 2 +- clients/javascript/docs/Page.md | 2 +- clients/javascript/docs/PageTiming.md | 16 +- clients/javascript/docs/VerifyResult.md | 4 +- .../src/BrowserUpMitmProxyClient/ApiClient.js | 2 +- .../BrowserUpProxyApi.js | 48 +- .../src/BrowserUpMitmProxyClient/index.js | 17 +- .../BrowserUpMitmProxyClient/model/Action.js | 171 ++ .../BrowserUpMitmProxyClient/model/Error.js | 28 +- .../src/BrowserUpMitmProxyClient/model/Har.js | 2 +- .../model/HarEntry.js | 2 +- .../model/HarEntryCache.js | 2 +- .../model/HarEntryCacheBeforeRequest.js | 2 +- .../model/HarEntryCacheBeforeRequestOneOf.js | 2 +- .../model/HarEntryRequest.js | 2 +- .../model/HarEntryRequestCookiesInner.js | 2 +- .../model/HarEntryRequestPostData.js | 2 +- .../HarEntryRequestPostDataParamsInner.js | 2 +- .../model/HarEntryRequestQueryStringInner.js | 2 +- .../model/HarEntryResponse.js | 2 +- .../model/HarEntryResponseContent.js | 74 +- .../model/HarEntryTimings.js | 2 +- .../BrowserUpMitmProxyClient/model/HarLog.js | 2 +- .../model/HarLogCreator.js | 2 +- .../BrowserUpMitmProxyClient/model/Header.js | 2 +- .../model/LargestContentfulPaint.js | 2 +- .../model/MatchCriteria.js | 2 +- .../model/MatchCriteriaRequestHeader.js | 34 +- .../model/{Counter.js => Metric.js} | 46 +- .../model/NameValuePair.js | 28 +- .../BrowserUpMitmProxyClient/model/Page.js | 24 +- .../model/PageTiming.js | 108 +- .../model/PageTimings.js | 2 +- .../model/VerifyResult.js | 30 +- .../model/WebSocketMessage.js | 2 +- .../api/BrowserUpProxyApi.spec.js | 18 +- .../model/Action.spec.js | 107 + .../model/Error.spec.js | 10 +- .../model/Har.spec.js | 2 +- .../model/HarEntry.spec.js | 2 +- .../model/HarEntryCache.spec.js | 2 +- .../model/HarEntryCacheBeforeRequest.spec.js | 2 +- .../HarEntryCacheBeforeRequestOneOf.spec.js | 2 +- .../model/HarEntryRequest.spec.js | 2 +- .../model/HarEntryRequestCookiesInner.spec.js | 2 +- .../model/HarEntryRequestPostData.spec.js | 2 +- ...HarEntryRequestPostDataParamsInner.spec.js | 2 +- .../HarEntryRequestQueryStringInner.spec.js | 2 +- .../model/HarEntryResponse.spec.js | 2 +- .../model/HarEntryResponseContent.spec.js | 50 +- .../model/HarEntryTimings.spec.js | 2 +- .../model/HarLog.spec.js | 2 +- .../model/HarLogCreator.spec.js | 2 +- .../model/Header.spec.js | 2 +- .../model/LargestContentfulPaint.spec.js | 2 +- .../model/MatchCriteria.spec.js | 2 +- .../model/MatchCriteriaRequestHeader.spec.js | 10 +- .../model/{Counter.spec.js => Metric.spec.js} | 26 +- .../model/NameValuePair.spec.js | 10 +- .../model/Page.spec.js | 6 +- .../model/PageTiming.spec.js | 50 +- .../model/PageTimings.spec.js | 2 +- .../model/VerifyResult.spec.js | 10 +- .../model/WebSocketMessage.spec.js | 2 +- clients/markdown/.openapi-generator/FILES | 5 +- clients/markdown/.openapi-generator/VERSION | 2 +- clients/markdown/Apis/BrowserUpProxyApi.md | 22 +- clients/markdown/Models/HarEntry_request.md | 2 +- clients/markdown/Models/MatchCriteria.md | 8 +- .../markdown/Models/{Counter.md => Metric.md} | 6 +- clients/markdown/Models/Page.md | 2 +- clients/markdown/README.md | 8 +- clients/python/.github/workflows/python.yml | 37 - clients/python/.gitignore | 66 - clients/python/.gitlab-ci.yml | 25 - clients/python/.openapi-generator-ignore | 23 - clients/python/.openapi-generator/FILES | 78 - clients/python/.openapi-generator/VERSION | 1 - clients/python/.travis.yml | 17 - .../BrowserUpMitmProxyClient/__init__.py | 73 - .../BrowserUpMitmProxyClient/api/__init__.py | 4 - .../api/browser_up_proxy_api.py | 1693 ------------- .../BrowserUpMitmProxyClient/api_client.py | 834 ------- .../BrowserUpMitmProxyClient/api_response.py | 32 - .../BrowserUpMitmProxyClient/configuration.py | 458 ---- .../BrowserUpMitmProxyClient/exceptions.py | 160 -- .../models/__init__.py | 56 - .../BrowserUpMitmProxyClient/models/action.py | 96 - .../models/counter.py | 77 - .../BrowserUpMitmProxyClient/models/error.py | 72 - .../BrowserUpMitmProxyClient/models/har.py | 92 - .../models/har_entry.py | 148 -- .../models/har_entry_cache.py | 109 - .../models/har_entry_cache_before_request.py | 82 - .../models/har_entry_request.py | 169 -- .../models/har_entry_request_cookies_inner.py | 97 - .../models/har_entry_request_post_data.py | 94 - ...ar_entry_request_post_data_params_inner.py | 81 - .../har_entry_request_query_string_inner.py | 77 - .../models/har_entry_response.py | 152 -- .../models/har_entry_response_content.py | 148 -- .../models/har_entry_timings.py | 97 - .../models/har_log.py | 116 - .../models/har_log_creator.py | 77 - .../BrowserUpMitmProxyClient/models/header.py | 77 - .../models/largest_contentful_paint.py | 98 - .../models/match_criteria.py | 147 -- .../models/name_value_pair.py | 72 - .../BrowserUpMitmProxyClient/models/page.py | 151 -- .../models/page_timing.py | 145 -- .../models/page_timings.py | 165 -- .../models/verify_result.py | 78 - .../models/web_socket_message.py | 81 - .../python/BrowserUpMitmProxyClient/py.typed | 0 .../python/BrowserUpMitmProxyClient/rest.py | 394 ---- clients/python/LICENSE | 202 -- clients/python/README.md | 142 -- clients/python/docs/Action.md | 35 - clients/python/docs/BrowserUpProxyApi.md | 681 ------ clients/python/docs/Counter.md | 29 - clients/python/docs/Error.md | 29 - clients/python/docs/Har.md | 28 - clients/python/docs/HarEntry.md | 38 - clients/python/docs/HarEntryCache.md | 30 - .../python/docs/HarEntryCacheBeforeRequest.md | 32 - clients/python/docs/HarEntryRequest.md | 37 - .../docs/HarEntryRequestCookiesInner.md | 35 - .../python/docs/HarEntryRequestPostData.md | 31 - .../HarEntryRequestPostDataParamsInner.md | 32 - .../docs/HarEntryRequestQueryStringInner.md | 30 - clients/python/docs/HarEntryResponse.md | 37 - .../python/docs/HarEntryResponseContent.md | 41 - clients/python/docs/HarEntryTimings.md | 35 - clients/python/docs/HarLog.md | 33 - clients/python/docs/HarLogCreator.md | 30 - clients/python/docs/Header.md | 30 - clients/python/docs/LargestContentfulPaint.md | 31 - clients/python/docs/MatchCriteria.md | 42 - clients/python/docs/NameValuePair.md | 29 - clients/python/docs/Page.md | 35 - clients/python/docs/PageTiming.md | 39 - clients/python/docs/PageTimings.md | 40 - clients/python/docs/VerifyResult.md | 30 - clients/python/docs/WebSocketMessage.md | 31 - clients/python/git_push.sh | 57 - clients/python/pyproject.toml | 5 - clients/python/requirements.txt | 5 - clients/python/setup.cfg | 2 - clients/python/setup.py | 50 - clients/python/test-requirements.txt | 3 - clients/python/test/__init__.py | 0 clients/python/test/test_action.py | 58 - .../python/test/test_browser_up_proxy_api.py | 71 - clients/python/test/test_counter.py | 52 - clients/python/test/test_error.py | 52 - clients/python/test/test_har.py | 160 -- clients/python/test/test_har_entry.py | 115 - clients/python/test/test_har_entry_cache.py | 63 - .../test_har_entry_cache_before_request.py | 58 - clients/python/test/test_har_entry_request.py | 118 - .../test_har_entry_request_cookies_inner.py | 60 - .../test/test_har_entry_request_post_data.py | 61 - ...ar_entry_request_post_data_params_inner.py | 55 - ...st_har_entry_request_query_string_inner.py | 55 - .../python/test/test_har_entry_response.py | 119 - .../test/test_har_entry_response_content.py | 58 - clients/python/test/test_har_entry_timings.py | 65 - clients/python/test/test_har_log.py | 153 -- clients/python/test/test_har_log_creator.py | 55 - clients/python/test/test_header.py | 55 - .../test/test_largest_contentful_paint.py | 54 - clients/python/test/test_match_criteria.py | 72 - clients/python/test/test_name_value_pair.py | 52 - clients/python/test/test_page.py | 75 - clients/python/test/test_page_timing.py | 62 - clients/python/test/test_page_timings.py | 65 - clients/python/test/test_verify_result.py | 53 - .../python/test/test_web_socket_message.py | 58 - clients/python/tox.ini | 9 - clients/ruby/.openapi-generator/FILES | 38 +- clients/ruby/.openapi-generator/VERSION | 2 +- clients/ruby/README.md | 16 +- .../ruby/browserup_mitmproxy_client.gemspec | 4 +- clients/ruby/docs/BrowserUpProxyApi.md | 46 +- clients/ruby/docs/Counter.md | 20 - .../ruby/docs/HarEntryCacheBeforeRequest.md | 55 +- clients/ruby/docs/MatchCriteria.md | 8 +- clients/ruby/docs/Metric.md | 20 + clients/ruby/docs/Page.md | 4 +- .../ruby/lib/browserup_mitmproxy_client.rb | 8 +- .../api/browser_up_proxy_api.rb | 64 +- .../browserup_mitmproxy_client/api_client.rb | 4 +- .../browserup_mitmproxy_client/api_error.rb | 4 +- .../configuration.rb | 25 +- .../models/action.rb | 33 +- .../models/error.rb | 33 +- .../browserup_mitmproxy_client/models/har.rb | 35 +- .../models/har_entry.rb | 45 +- .../models/har_entry_cache.rb | 35 +- .../models/har_entry_cache_before_request.rb | 318 +-- .../har_entry_cache_before_request_one_of.rb | 4 +- .../models/har_entry_request.rb | 49 +- .../models/har_entry_request_cookies_inner.rb | 37 +- .../models/har_entry_request_post_data.rb | 35 +- ...ar_entry_request_post_data_params_inner.rb | 33 +- .../har_entry_request_query_string_inner.rb | 37 +- .../models/har_entry_response.rb | 51 +- .../models/har_entry_response_content.rb | 85 +- .../models/har_entry_timings.rb | 33 +- .../models/har_log.rb | 41 +- .../models/har_log_creator.rb | 37 +- .../models/header.rb | 37 +- .../models/largest_contentful_paint.rb | 45 +- .../models/match_criteria.rb | 41 +- .../models/match_criteria_request_header.rb | 4 +- .../models/{counter.rb => metric.rb} | 43 +- .../models/name_value_pair.rb | 33 +- .../browserup_mitmproxy_client/models/page.rb | 57 +- .../models/page_timing.rb | 33 +- .../models/page_timings.rb | 81 +- .../models/verify_result.rb | 33 +- .../models/web_socket_message.rb | 41 +- .../lib/browserup_mitmproxy_client/version.rb | 4 +- .../spec/api/browser_up_proxy_api_spec.rb | 18 +- clients/ruby/spec/api_client_spec.rb | 4 +- clients/ruby/spec/configuration_spec.rb | 4 +- clients/ruby/spec/models/action_spec.rb | 20 +- clients/ruby/spec/models/error_spec.rb | 6 +- ..._entry_cache_before_request_one_of_spec.rb | 2 +- .../har_entry_cache_before_request_spec.rb | 2 +- .../ruby/spec/models/har_entry_cache_spec.rb | 2 +- .../har_entry_request_cookies_inner_spec.rb | 2 +- ...try_request_post_data_params_inner_spec.rb | 2 +- .../har_entry_request_post_data_spec.rb | 2 +- ...r_entry_request_query_string_inner_spec.rb | 2 +- .../spec/models/har_entry_request_spec.rb | 2 +- .../models/har_entry_response_content_spec.rb | 50 +- .../spec/models/har_entry_response_spec.rb | 2 +- clients/ruby/spec/models/har_entry_spec.rb | 2 +- .../spec/models/har_entry_timings_spec.rb | 2 +- .../ruby/spec/models/har_log_creator_spec.rb | 2 +- clients/ruby/spec/models/har_log_spec.rb | 2 +- clients/ruby/spec/models/har_spec.rb | 2 +- clients/ruby/spec/models/header_spec.rb | 2 +- .../models/largest_contentful_paint_spec.rb | 2 +- .../match_criteria_request_header_spec.rb | 6 +- .../ruby/spec/models/match_criteria_spec.rb | 2 +- .../{counter_spec.rb => metric_spec.rb} | 18 +- .../ruby/spec/models/name_value_pair_spec.rb | 6 +- clients/ruby/spec/models/page_spec.rb | 4 +- clients/ruby/spec/models/page_timing_spec.rb | 26 +- clients/ruby/spec/models/page_timings_spec.rb | 2 +- .../ruby/spec/models/verify_result_spec.rb | 6 +- .../spec/models/web_socket_message_spec.rb | 2 +- clients/ruby/spec/spec_helper.rb | 4 +- 464 files changed, 4434 insertions(+), 16915 deletions(-) rename clients/csharp/{BrowserUp.Mitmproxy.Client.sln => BrowserUpMitmProxyClient.sln} (58%) delete mode 100644 clients/csharp/api/openapi.yaml rename clients/csharp/docs/{Counter.md => Metric.md} (57%) delete mode 100644 clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryCacheBeforeRequest.cs rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Api/BrowserUpProxyApiTests.cs (93%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test/BrowserUp.Mitmproxy.Client.Test.csproj => BrowserUpMitmProxyClient.Test/BrowserUpMitmProxyClient.Test.csproj} (55%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/ActionTests.cs (93%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/ErrorTests.cs (90%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/HarEntryCacheBeforeRequestOneOfTests.cs (93%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/HarEntryCacheBeforeRequestTests.cs (93%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/HarEntryCacheTests.cs (91%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/HarEntryRequestCookiesInnerTests.cs (94%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/HarEntryRequestPostDataParamsInnerTests.cs (93%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/HarEntryRequestPostDataTests.cs (91%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/HarEntryRequestQueryStringInnerTests.cs (91%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/HarEntryRequestTests.cs (94%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/HarEntryResponseContentTests.cs (57%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/HarEntryResponseTests.cs (94%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/HarEntryTests.cs (94%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/HarEntryTimingsTests.cs (94%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/HarLogCreatorTests.cs (91%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/HarLogTests.cs (93%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/HarTests.cs (88%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/HeaderTests.cs (91%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/LargestContentfulPaintTests.cs (92%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/MatchCriteriaRequestHeaderTests.cs (91%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/MatchCriteriaTests.cs (95%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test/Model/CounterTests.cs => BrowserUpMitmProxyClient.Test/Model/MetricTests.cs} (68%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/NameValuePairTests.cs (90%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/PageTests.cs (90%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/PageTimingTests.cs (95%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/PageTimingsTests.cs (95%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/VerifyResultTests.cs (91%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client.Test => BrowserUpMitmProxyClient.Test}/Model/WebSocketMessageTests.cs (92%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Api/BrowserUpProxyApi.cs (69%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client/BrowserUp.Mitmproxy.Client.csproj => BrowserUpMitmProxyClient/BrowserUpMitmProxyClient.csproj} (68%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Client/ApiClient.cs (79%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Client/ApiException.cs (96%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Client/ApiResponse.cs (98%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Client/ClientUtils.cs (95%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Client/Configuration.cs (94%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Client/ExceptionFactory.cs (88%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Client/GlobalConfiguration.cs (95%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Client/HttpMethod.cs (91%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Client/IApiAccessor.cs (92%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Client/IAsynchronousClient.cs (98%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Client/IReadableConfiguration.cs (84%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Client/ISynchronousClient.cs (98%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Client/Multimap.cs (99%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Client/OpenAPIDateConverter.cs (91%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Client/RequestOptions.cs (96%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Client/RetryConfiguration.cs (90%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/AbstractOpenAPISchema.cs (96%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/Action.cs (96%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/Error.cs (93%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/Har.cs (87%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/HarEntry.cs (97%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/HarEntryCache.cs (92%) create mode 100644 clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryCacheBeforeRequest.cs rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/HarEntryCacheBeforeRequestOneOf.cs (96%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/HarEntryRequest.cs (94%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/HarEntryRequestCookiesInner.cs (96%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/HarEntryRequestPostData.cs (84%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/HarEntryRequestPostDataParamsInner.cs (95%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/HarEntryRequestQueryStringInner.cs (95%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/HarEntryResponse.cs (94%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/HarEntryResponseContent.cs (98%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/HarEntryTimings.cs (97%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/HarLog.cs (85%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/HarLogCreator.cs (81%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/Header.cs (94%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/LargestContentfulPaint.cs (89%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/MatchCriteria.cs (92%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/MatchCriteriaRequestHeader.cs (93%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client/Model/Counter.cs => BrowserUpMitmProxyClient/Model/Metric.cs} (73%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/NameValuePair.cs (93%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/Page.cs (87%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/PageTiming.cs (97%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/PageTimings.cs (93%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/VerifyResult.cs (94%) rename clients/csharp/src/{BrowserUp.Mitmproxy.Client => BrowserUpMitmProxyClient}/Model/WebSocketMessage.cs (95%) delete mode 100644 clients/java/docs/Counter.md create mode 100644 clients/java/docs/Metric.md rename clients/java/src/main/java/com/browserup/proxy_client/{Counter.java => Metric.java} (67%) rename clients/java/src/test/java/com/browserup/proxy_client/{CounterTest.java => MetricTest.java} (81%) create mode 100644 clients/javascript/docs/Action.md delete mode 100644 clients/javascript/docs/Counter.md create mode 100644 clients/javascript/docs/Metric.md create mode 100644 clients/javascript/src/BrowserUpMitmProxyClient/model/Action.js rename clients/javascript/src/BrowserUpMitmProxyClient/model/{Counter.js => Metric.js} (68%) create mode 100644 clients/javascript/test/BrowserUpMitmProxyClient/model/Action.spec.js rename clients/javascript/test/BrowserUpMitmProxyClient/model/{Counter.spec.js => Metric.spec.js} (79%) rename clients/markdown/Models/{Counter.md => Metric.md} (57%) delete mode 100644 clients/python/.github/workflows/python.yml delete mode 100644 clients/python/.gitignore delete mode 100644 clients/python/.gitlab-ci.yml delete mode 100644 clients/python/.openapi-generator-ignore delete mode 100644 clients/python/.openapi-generator/FILES delete mode 100644 clients/python/.openapi-generator/VERSION delete mode 100644 clients/python/.travis.yml delete mode 100644 clients/python/BrowserUpMitmProxyClient/__init__.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/api/__init__.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/api/browser_up_proxy_api.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/api_client.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/api_response.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/configuration.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/exceptions.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/__init__.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/action.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/counter.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/error.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/har.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/har_entry.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/har_entry_cache.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/har_entry_cache_before_request.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/har_entry_request.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/har_entry_request_cookies_inner.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/har_entry_request_post_data.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/har_entry_request_post_data_params_inner.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/har_entry_request_query_string_inner.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/har_entry_response.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/har_entry_response_content.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/har_entry_timings.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/har_log.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/har_log_creator.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/header.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/largest_contentful_paint.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/match_criteria.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/name_value_pair.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/page.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/page_timing.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/page_timings.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/verify_result.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/models/web_socket_message.py delete mode 100644 clients/python/BrowserUpMitmProxyClient/py.typed delete mode 100644 clients/python/BrowserUpMitmProxyClient/rest.py delete mode 100644 clients/python/LICENSE delete mode 100644 clients/python/README.md delete mode 100644 clients/python/docs/Action.md delete mode 100644 clients/python/docs/BrowserUpProxyApi.md delete mode 100644 clients/python/docs/Counter.md delete mode 100644 clients/python/docs/Error.md delete mode 100644 clients/python/docs/Har.md delete mode 100644 clients/python/docs/HarEntry.md delete mode 100644 clients/python/docs/HarEntryCache.md delete mode 100644 clients/python/docs/HarEntryCacheBeforeRequest.md delete mode 100644 clients/python/docs/HarEntryRequest.md delete mode 100644 clients/python/docs/HarEntryRequestCookiesInner.md delete mode 100644 clients/python/docs/HarEntryRequestPostData.md delete mode 100644 clients/python/docs/HarEntryRequestPostDataParamsInner.md delete mode 100644 clients/python/docs/HarEntryRequestQueryStringInner.md delete mode 100644 clients/python/docs/HarEntryResponse.md delete mode 100644 clients/python/docs/HarEntryResponseContent.md delete mode 100644 clients/python/docs/HarEntryTimings.md delete mode 100644 clients/python/docs/HarLog.md delete mode 100644 clients/python/docs/HarLogCreator.md delete mode 100644 clients/python/docs/Header.md delete mode 100644 clients/python/docs/LargestContentfulPaint.md delete mode 100644 clients/python/docs/MatchCriteria.md delete mode 100644 clients/python/docs/NameValuePair.md delete mode 100644 clients/python/docs/Page.md delete mode 100644 clients/python/docs/PageTiming.md delete mode 100644 clients/python/docs/PageTimings.md delete mode 100644 clients/python/docs/VerifyResult.md delete mode 100644 clients/python/docs/WebSocketMessage.md delete mode 100644 clients/python/git_push.sh delete mode 100644 clients/python/pyproject.toml delete mode 100644 clients/python/requirements.txt delete mode 100644 clients/python/setup.cfg delete mode 100644 clients/python/setup.py delete mode 100644 clients/python/test-requirements.txt delete mode 100644 clients/python/test/__init__.py delete mode 100644 clients/python/test/test_action.py delete mode 100644 clients/python/test/test_browser_up_proxy_api.py delete mode 100644 clients/python/test/test_counter.py delete mode 100644 clients/python/test/test_error.py delete mode 100644 clients/python/test/test_har.py delete mode 100644 clients/python/test/test_har_entry.py delete mode 100644 clients/python/test/test_har_entry_cache.py delete mode 100644 clients/python/test/test_har_entry_cache_before_request.py delete mode 100644 clients/python/test/test_har_entry_request.py delete mode 100644 clients/python/test/test_har_entry_request_cookies_inner.py delete mode 100644 clients/python/test/test_har_entry_request_post_data.py delete mode 100644 clients/python/test/test_har_entry_request_post_data_params_inner.py delete mode 100644 clients/python/test/test_har_entry_request_query_string_inner.py delete mode 100644 clients/python/test/test_har_entry_response.py delete mode 100644 clients/python/test/test_har_entry_response_content.py delete mode 100644 clients/python/test/test_har_entry_timings.py delete mode 100644 clients/python/test/test_har_log.py delete mode 100644 clients/python/test/test_har_log_creator.py delete mode 100644 clients/python/test/test_header.py delete mode 100644 clients/python/test/test_largest_contentful_paint.py delete mode 100644 clients/python/test/test_match_criteria.py delete mode 100644 clients/python/test/test_name_value_pair.py delete mode 100644 clients/python/test/test_page.py delete mode 100644 clients/python/test/test_page_timing.py delete mode 100644 clients/python/test/test_page_timings.py delete mode 100644 clients/python/test/test_verify_result.py delete mode 100644 clients/python/test/test_web_socket_message.py delete mode 100644 clients/python/tox.ini delete mode 100644 clients/ruby/docs/Counter.md create mode 100644 clients/ruby/docs/Metric.md rename clients/ruby/lib/browserup_mitmproxy_client/models/{counter.rb => metric.rb} (82%) rename clients/ruby/spec/models/{counter_spec.rb => metric_spec.rb} (72%) diff --git a/clients/csharp/.openapi-generator/FILES b/clients/csharp/.openapi-generator/FILES index 20617a95f8..1b241c1408 100644 --- a/clients/csharp/.openapi-generator/FILES +++ b/clients/csharp/.openapi-generator/FILES @@ -1,16 +1,16 @@ .gitignore -BrowserUp.Mitmproxy.Client.sln +.openapi-generator-ignore +BrowserUpMitmProxyClient.sln README.md -api/openapi.yaml appveyor.yml docs/Action.md docs/BrowserUpProxyApi.md -docs/Counter.md docs/Error.md docs/Har.md docs/HarEntry.md docs/HarEntryCache.md docs/HarEntryCacheBeforeRequest.md +docs/HarEntryCacheBeforeRequestOneOf.md docs/HarEntryRequest.md docs/HarEntryRequestCookiesInner.md docs/HarEntryRequestPostData.md @@ -24,6 +24,8 @@ docs/HarLogCreator.md docs/Header.md docs/LargestContentfulPaint.md docs/MatchCriteria.md +docs/MatchCriteriaRequestHeader.md +docs/Metric.md docs/NameValuePair.md docs/Page.md docs/PageTiming.md @@ -31,49 +33,80 @@ docs/PageTimings.md docs/VerifyResult.md docs/WebSocketMessage.md git_push.sh -src/BrowserUp.Mitmproxy.Client.Test/BrowserUp.Mitmproxy.Client.Test.csproj -src/BrowserUp.Mitmproxy.Client/Api/BrowserUpProxyApi.cs -src/BrowserUp.Mitmproxy.Client/BrowserUp.Mitmproxy.Client.csproj -src/BrowserUp.Mitmproxy.Client/Client/ApiClient.cs -src/BrowserUp.Mitmproxy.Client/Client/ApiException.cs -src/BrowserUp.Mitmproxy.Client/Client/ApiResponse.cs -src/BrowserUp.Mitmproxy.Client/Client/ClientUtils.cs -src/BrowserUp.Mitmproxy.Client/Client/Configuration.cs -src/BrowserUp.Mitmproxy.Client/Client/ExceptionFactory.cs -src/BrowserUp.Mitmproxy.Client/Client/GlobalConfiguration.cs -src/BrowserUp.Mitmproxy.Client/Client/HttpMethod.cs -src/BrowserUp.Mitmproxy.Client/Client/IApiAccessor.cs -src/BrowserUp.Mitmproxy.Client/Client/IAsynchronousClient.cs -src/BrowserUp.Mitmproxy.Client/Client/IReadableConfiguration.cs -src/BrowserUp.Mitmproxy.Client/Client/ISynchronousClient.cs -src/BrowserUp.Mitmproxy.Client/Client/Multimap.cs -src/BrowserUp.Mitmproxy.Client/Client/OpenAPIDateConverter.cs -src/BrowserUp.Mitmproxy.Client/Client/RequestOptions.cs -src/BrowserUp.Mitmproxy.Client/Client/RetryConfiguration.cs -src/BrowserUp.Mitmproxy.Client/Model/AbstractOpenAPISchema.cs -src/BrowserUp.Mitmproxy.Client/Model/Action.cs -src/BrowserUp.Mitmproxy.Client/Model/Counter.cs -src/BrowserUp.Mitmproxy.Client/Model/Error.cs -src/BrowserUp.Mitmproxy.Client/Model/Har.cs -src/BrowserUp.Mitmproxy.Client/Model/HarEntry.cs -src/BrowserUp.Mitmproxy.Client/Model/HarEntryCache.cs -src/BrowserUp.Mitmproxy.Client/Model/HarEntryCacheBeforeRequest.cs -src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequest.cs -src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequestCookiesInner.cs -src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequestPostData.cs -src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequestPostDataParamsInner.cs -src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequestQueryStringInner.cs -src/BrowserUp.Mitmproxy.Client/Model/HarEntryResponse.cs -src/BrowserUp.Mitmproxy.Client/Model/HarEntryResponseContent.cs -src/BrowserUp.Mitmproxy.Client/Model/HarEntryTimings.cs -src/BrowserUp.Mitmproxy.Client/Model/HarLog.cs -src/BrowserUp.Mitmproxy.Client/Model/HarLogCreator.cs -src/BrowserUp.Mitmproxy.Client/Model/Header.cs -src/BrowserUp.Mitmproxy.Client/Model/LargestContentfulPaint.cs -src/BrowserUp.Mitmproxy.Client/Model/MatchCriteria.cs -src/BrowserUp.Mitmproxy.Client/Model/NameValuePair.cs -src/BrowserUp.Mitmproxy.Client/Model/Page.cs -src/BrowserUp.Mitmproxy.Client/Model/PageTiming.cs -src/BrowserUp.Mitmproxy.Client/Model/PageTimings.cs -src/BrowserUp.Mitmproxy.Client/Model/VerifyResult.cs -src/BrowserUp.Mitmproxy.Client/Model/WebSocketMessage.cs +src/BrowserUpMitmProxyClient.Test/Api/BrowserUpProxyApiTests.cs +src/BrowserUpMitmProxyClient.Test/BrowserUpMitmProxyClient.Test.csproj +src/BrowserUpMitmProxyClient.Test/Model/ActionTests.cs +src/BrowserUpMitmProxyClient.Test/Model/ErrorTests.cs +src/BrowserUpMitmProxyClient.Test/Model/HarEntryCacheBeforeRequestOneOfTests.cs +src/BrowserUpMitmProxyClient.Test/Model/HarEntryCacheBeforeRequestTests.cs +src/BrowserUpMitmProxyClient.Test/Model/HarEntryCacheTests.cs +src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestCookiesInnerTests.cs +src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestPostDataParamsInnerTests.cs +src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestPostDataTests.cs +src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestQueryStringInnerTests.cs +src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestTests.cs +src/BrowserUpMitmProxyClient.Test/Model/HarEntryResponseContentTests.cs +src/BrowserUpMitmProxyClient.Test/Model/HarEntryResponseTests.cs +src/BrowserUpMitmProxyClient.Test/Model/HarEntryTests.cs +src/BrowserUpMitmProxyClient.Test/Model/HarEntryTimingsTests.cs +src/BrowserUpMitmProxyClient.Test/Model/HarLogCreatorTests.cs +src/BrowserUpMitmProxyClient.Test/Model/HarLogTests.cs +src/BrowserUpMitmProxyClient.Test/Model/HarTests.cs +src/BrowserUpMitmProxyClient.Test/Model/HeaderTests.cs +src/BrowserUpMitmProxyClient.Test/Model/LargestContentfulPaintTests.cs +src/BrowserUpMitmProxyClient.Test/Model/MatchCriteriaRequestHeaderTests.cs +src/BrowserUpMitmProxyClient.Test/Model/MatchCriteriaTests.cs +src/BrowserUpMitmProxyClient.Test/Model/MetricTests.cs +src/BrowserUpMitmProxyClient.Test/Model/NameValuePairTests.cs +src/BrowserUpMitmProxyClient.Test/Model/PageTests.cs +src/BrowserUpMitmProxyClient.Test/Model/PageTimingTests.cs +src/BrowserUpMitmProxyClient.Test/Model/PageTimingsTests.cs +src/BrowserUpMitmProxyClient.Test/Model/VerifyResultTests.cs +src/BrowserUpMitmProxyClient.Test/Model/WebSocketMessageTests.cs +src/BrowserUpMitmProxyClient/Api/BrowserUpProxyApi.cs +src/BrowserUpMitmProxyClient/BrowserUpMitmProxyClient.csproj +src/BrowserUpMitmProxyClient/Client/ApiClient.cs +src/BrowserUpMitmProxyClient/Client/ApiException.cs +src/BrowserUpMitmProxyClient/Client/ApiResponse.cs +src/BrowserUpMitmProxyClient/Client/ClientUtils.cs +src/BrowserUpMitmProxyClient/Client/Configuration.cs +src/BrowserUpMitmProxyClient/Client/ExceptionFactory.cs +src/BrowserUpMitmProxyClient/Client/GlobalConfiguration.cs +src/BrowserUpMitmProxyClient/Client/HttpMethod.cs +src/BrowserUpMitmProxyClient/Client/IApiAccessor.cs +src/BrowserUpMitmProxyClient/Client/IAsynchronousClient.cs +src/BrowserUpMitmProxyClient/Client/IReadableConfiguration.cs +src/BrowserUpMitmProxyClient/Client/ISynchronousClient.cs +src/BrowserUpMitmProxyClient/Client/Multimap.cs +src/BrowserUpMitmProxyClient/Client/OpenAPIDateConverter.cs +src/BrowserUpMitmProxyClient/Client/RequestOptions.cs +src/BrowserUpMitmProxyClient/Client/RetryConfiguration.cs +src/BrowserUpMitmProxyClient/Model/AbstractOpenAPISchema.cs +src/BrowserUpMitmProxyClient/Model/Action.cs +src/BrowserUpMitmProxyClient/Model/Error.cs +src/BrowserUpMitmProxyClient/Model/Har.cs +src/BrowserUpMitmProxyClient/Model/HarEntry.cs +src/BrowserUpMitmProxyClient/Model/HarEntryCache.cs +src/BrowserUpMitmProxyClient/Model/HarEntryCacheBeforeRequest.cs +src/BrowserUpMitmProxyClient/Model/HarEntryCacheBeforeRequestOneOf.cs +src/BrowserUpMitmProxyClient/Model/HarEntryRequest.cs +src/BrowserUpMitmProxyClient/Model/HarEntryRequestCookiesInner.cs +src/BrowserUpMitmProxyClient/Model/HarEntryRequestPostData.cs +src/BrowserUpMitmProxyClient/Model/HarEntryRequestPostDataParamsInner.cs +src/BrowserUpMitmProxyClient/Model/HarEntryRequestQueryStringInner.cs +src/BrowserUpMitmProxyClient/Model/HarEntryResponse.cs +src/BrowserUpMitmProxyClient/Model/HarEntryResponseContent.cs +src/BrowserUpMitmProxyClient/Model/HarEntryTimings.cs +src/BrowserUpMitmProxyClient/Model/HarLog.cs +src/BrowserUpMitmProxyClient/Model/HarLogCreator.cs +src/BrowserUpMitmProxyClient/Model/Header.cs +src/BrowserUpMitmProxyClient/Model/LargestContentfulPaint.cs +src/BrowserUpMitmProxyClient/Model/MatchCriteria.cs +src/BrowserUpMitmProxyClient/Model/MatchCriteriaRequestHeader.cs +src/BrowserUpMitmProxyClient/Model/Metric.cs +src/BrowserUpMitmProxyClient/Model/NameValuePair.cs +src/BrowserUpMitmProxyClient/Model/Page.cs +src/BrowserUpMitmProxyClient/Model/PageTiming.cs +src/BrowserUpMitmProxyClient/Model/PageTimings.cs +src/BrowserUpMitmProxyClient/Model/VerifyResult.cs +src/BrowserUpMitmProxyClient/Model/WebSocketMessage.cs diff --git a/clients/csharp/.openapi-generator/VERSION b/clients/csharp/.openapi-generator/VERSION index 4122521804..c0be8a7992 100644 --- a/clients/csharp/.openapi-generator/VERSION +++ b/clients/csharp/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.0 \ No newline at end of file +6.4.0 \ No newline at end of file diff --git a/clients/csharp/BrowserUp.Mitmproxy.Client.sln b/clients/csharp/BrowserUpMitmProxyClient.sln similarity index 58% rename from clients/csharp/BrowserUp.Mitmproxy.Client.sln rename to clients/csharp/BrowserUpMitmProxyClient.sln index 4b3a230e70..a3e7e37975 100644 --- a/clients/csharp/BrowserUp.Mitmproxy.Client.sln +++ b/clients/csharp/BrowserUpMitmProxyClient.sln @@ -2,9 +2,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.0.0 MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BrowserUp.Mitmproxy.Client", "src\BrowserUp.Mitmproxy.Client\BrowserUp.Mitmproxy.Client.csproj", "{D80564AC-BD94-42DC-AF3F-33CCE2228473}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BrowserUpMitmProxyClient", "src\BrowserUpMitmProxyClient\BrowserUpMitmProxyClient.csproj", "{979682E2-30D9-4EB9-A593-E1494EA7C849}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BrowserUp.Mitmproxy.Client.Test", "src\BrowserUp.Mitmproxy.Client.Test\BrowserUp.Mitmproxy.Client.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BrowserUpMitmProxyClient.Test", "src\BrowserUpMitmProxyClient.Test\BrowserUpMitmProxyClient.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -12,10 +12,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D80564AC-BD94-42DC-AF3F-33CCE2228473}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D80564AC-BD94-42DC-AF3F-33CCE2228473}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D80564AC-BD94-42DC-AF3F-33CCE2228473}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D80564AC-BD94-42DC-AF3F-33CCE2228473}.Release|Any CPU.Build.0 = Release|Any CPU + {979682E2-30D9-4EB9-A593-E1494EA7C849}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {979682E2-30D9-4EB9-A593-E1494EA7C849}.Debug|Any CPU.Build.0 = Debug|Any CPU + {979682E2-30D9-4EB9-A593-E1494EA7C849}.Release|Any CPU.ActiveCfg = Release|Any CPU + {979682E2-30D9-4EB9-A593-E1494EA7C849}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/clients/csharp/README.md b/clients/csharp/README.md index d3bd861dbe..ec1a1b7c1d 100644 --- a/clients/csharp/README.md +++ b/clients/csharp/README.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client - the C# library for the BrowserUp MitmProxy +# BrowserUpMitmProxyClient - the C# library for the BrowserUp MitmProxy ___ This is the REST API for controlling the BrowserUp MitmProxy. @@ -9,14 +9,14 @@ ___ This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 1.0.0 +- API version: 1.24 - SDK version: 1.0.0 -- Build package: org.openapitools.codegen.languages.CSharpClientCodegen +- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen - + ## Frameworks supported - + ## Dependencies - [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.13.0 or later @@ -35,7 +35,7 @@ Install-Package System.ComponentModel.Annotations NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742). NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See [RestSharp#1406](https://github.com/restsharp/RestSharp/issues/1406). - + ## Installation Run the following command to generate the DLL - [Mac/Linux] `/bin/sh build.sh` @@ -43,11 +43,11 @@ Run the following command to generate the DLL Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: ```csharp -using BrowserUp.Mitmproxy.Client.Api; -using BrowserUp.Mitmproxy.Client.Client; -using BrowserUp.Mitmproxy.Client.Model; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Client; +using BrowserUpMitmProxyClient.Model; ``` - + ## Packaging A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages. @@ -55,12 +55,12 @@ A `.nuspec` is included with the project. You can follow the Nuget quickstart to This `.nuspec` uses placeholders from the `.csproj`, so build the `.csproj` directly: ``` -nuget pack -Build -OutputDirectory out BrowserUp.Mitmproxy.Client.csproj +nuget pack -Build -OutputDirectory out BrowserUpMitmProxyClient.csproj ``` Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual. - + ## Usage To use the API client with a HTTP proxy, setup a `System.Net.WebProxy` @@ -71,15 +71,15 @@ webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials; c.Proxy = webProxy; ``` - + ## Getting Started ```csharp using System.Collections.Generic; using System.Diagnostics; -using BrowserUp.Mitmproxy.Client.Api; -using BrowserUp.Mitmproxy.Client.Client; -using BrowserUp.Mitmproxy.Client.Model; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Client; +using BrowserUpMitmProxyClient.Model; namespace Example { @@ -91,15 +91,15 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost:48088"; var apiInstance = new BrowserUpProxyApi(config); - var counter = new Counter(); // Counter | Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key + var error = new Error(); // Error | Receives an error to track. Internally, the error is stored in an array in the har under the _errors key try { - apiInstance.AddCounter(counter); + apiInstance.AddError(error); } catch (ApiException e) { - Debug.Print("Exception when calling BrowserUpProxyApi.AddCounter: " + e.Message ); + Debug.Print("Exception when calling BrowserUpProxyApi.AddError: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -109,15 +109,15 @@ namespace Example } ``` - + ## Documentation for API Endpoints All URIs are relative to *http://localhost:48088* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*BrowserUpProxyApi* | [**AddCounter**](docs/BrowserUpProxyApi.md#addcounter) | **POST** /har/counters | *BrowserUpProxyApi* | [**AddError**](docs/BrowserUpProxyApi.md#adderror) | **POST** /har/errors | +*BrowserUpProxyApi* | [**AddMetric**](docs/BrowserUpProxyApi.md#addmetric) | **POST** /har/metrics | *BrowserUpProxyApi* | [**GetHarLog**](docs/BrowserUpProxyApi.md#getharlog) | **GET** /har | *BrowserUpProxyApi* | [**Healthcheck**](docs/BrowserUpProxyApi.md#healthcheck) | **GET** /healthcheck | *BrowserUpProxyApi* | [**NewPage**](docs/BrowserUpProxyApi.md#newpage) | **POST** /har/page | @@ -128,16 +128,16 @@ Class | Method | HTTP request | Description *BrowserUpProxyApi* | [**VerifySize**](docs/BrowserUpProxyApi.md#verifysize) | **POST** /verify/size/{size}/{name} | - + ## Documentation for Models - [Model.Action](docs/Action.md) - - [Model.Counter](docs/Counter.md) - [Model.Error](docs/Error.md) - [Model.Har](docs/Har.md) - [Model.HarEntry](docs/HarEntry.md) - [Model.HarEntryCache](docs/HarEntryCache.md) - [Model.HarEntryCacheBeforeRequest](docs/HarEntryCacheBeforeRequest.md) + - [Model.HarEntryCacheBeforeRequestOneOf](docs/HarEntryCacheBeforeRequestOneOf.md) - [Model.HarEntryRequest](docs/HarEntryRequest.md) - [Model.HarEntryRequestCookiesInner](docs/HarEntryRequestCookiesInner.md) - [Model.HarEntryRequestPostData](docs/HarEntryRequestPostData.md) @@ -151,6 +151,8 @@ Class | Method | HTTP request | Description - [Model.Header](docs/Header.md) - [Model.LargestContentfulPaint](docs/LargestContentfulPaint.md) - [Model.MatchCriteria](docs/MatchCriteria.md) + - [Model.MatchCriteriaRequestHeader](docs/MatchCriteriaRequestHeader.md) + - [Model.Metric](docs/Metric.md) - [Model.NameValuePair](docs/NameValuePair.md) - [Model.Page](docs/Page.md) - [Model.PageTiming](docs/PageTiming.md) @@ -159,8 +161,7 @@ Class | Method | HTTP request | Description - [Model.WebSocketMessage](docs/WebSocketMessage.md) - + ## Documentation for Authorization -Endpoints do not require authorization. - +All endpoints do not require authorization. diff --git a/clients/csharp/api/openapi.yaml b/clients/csharp/api/openapi.yaml deleted file mode 100644 index d282ddf81e..0000000000 --- a/clients/csharp/api/openapi.yaml +++ /dev/null @@ -1,2098 +0,0 @@ -openapi: 3.0.3 -info: - description: | - ___ - This is the REST API for controlling the BrowserUp MitmProxy. - The BrowserUp MitmProxy is a swiss army knife for automated testing that - captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. - ___ - title: BrowserUp MitmProxy - version: 1.0.0 - x-logo: - url: logo.png -servers: -- description: The development API server - url: "http://localhost:{port}/" - variables: - port: - default: "48088" - enum: - - "48088" -tags: -- description: BrowserUp MitmProxy REST API - name: The BrowserUp MitmProxy API -paths: - /har: - get: - description: Get the current HAR. - operationId: getHarLog - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Har' - description: The current Har file. - tags: - - BrowserUpProxy - put: - description: Starts a fresh HAR capture session. - operationId: resetHarLog - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Har' - description: The current Har file. - tags: - - BrowserUpProxy - /har/page: - post: - description: Starts a fresh HAR Page (Step) in the current active HAR to group - requests. - operationId: newPage - parameters: - - description: The unique title for this har page/step. - explode: false - in: path - name: title - required: true - schema: - pattern: "/[a-zA-Z-_]{4,25}/" - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Har' - description: The current Har file. - tags: - - BrowserUpProxy - /verify/present/{name}: - post: - description: Verify at least one matching item is present in the captured traffic - operationId: verifyPresent - parameters: - - description: The unique name for this verification operation - explode: false - in: path - name: name - required: true - schema: - pattern: "/[a-zA-Z-_]{4,25}/" - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/MatchCriteria' - description: Match criteria to select requests - response pairs for size tests - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VerifyResult' - description: The traffic conformed to the time criteria. - "422": - description: The MatchCriteria are invalid. - tags: - - BrowserUpProxy - /verify/not_present/{name}: - post: - description: Verify no matching items are present in the captured traffic - operationId: verifyNotPresent - parameters: - - description: The unique name for this verification operation - explode: false - in: path - name: name - required: true - schema: - pattern: "/[a-zA-Z-_]{4,25}/" - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/MatchCriteria' - description: Match criteria to select requests - response pairs for size tests - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VerifyResult' - description: The traffic had no matching items - "422": - description: The MatchCriteria are invalid. - tags: - - BrowserUpProxy - /verify/size/{size}/{name}: - post: - description: Verify matching items in the captured traffic meet the size criteria - operationId: verifySize - parameters: - - description: "The size used for comparison, in kilobytes" - explode: false - in: path - name: size - required: true - schema: - minimum: 0 - type: integer - style: simple - - description: The unique name for this verification operation - explode: false - in: path - name: name - required: true - schema: - pattern: "/[a-zA-Z-_]{4,25}/" - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/MatchCriteria' - description: Match criteria to select requests - response pairs for size tests - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VerifyResult' - description: The traffic conformed to the size criteria. - "422": - description: The MatchCriteria are invalid. - tags: - - BrowserUpProxy - /verify/sla/{time}/{name}: - post: - description: Verify each traffic item matching the criteria meets is below SLA - time - operationId: verifySLA - parameters: - - description: The time used for comparison - explode: false - in: path - name: time - required: true - schema: - minimum: 0 - type: integer - style: simple - - description: The unique name for this verification operation - explode: false - in: path - name: name - required: true - schema: - pattern: "/[a-zA-Z-_]{4,25}/" - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/MatchCriteria' - description: Match criteria to select requests - response pairs for size tests - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/VerifyResult' - description: The traffic conformed to the time criteria. - "422": - description: The MatchCriteria are invalid. - tags: - - BrowserUpProxy - /har/errors: - post: - description: Add Custom Error to the captured traffic har - operationId: addError - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: "Receives an error to track. Internally, the error is stored\ - \ in an array in the har under the _errors key" - required: true - responses: - "204": - description: The Error was added. - "422": - description: The Error was invalid. - tags: - - BrowserUpProxy - /har/counters: - post: - description: Add Custom Counter to the captured traffic har - operationId: addCounter - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Counter' - description: "Receives a new counter to add. The counter is stored, under\ - \ the hood, in an array in the har under the _counters key" - required: true - responses: - "204": - description: The counter was added. - "422": - description: The counter was invalid. - tags: - - BrowserUpProxy - /healthcheck: - get: - description: Get the healthcheck - operationId: healthcheck - responses: - "200": - description: OK means all is well. - tags: - - BrowserUpProxy -components: - schemas: - PageTiming: - properties: - onContentLoad: - description: onContentLoad per the browser - type: number - onLoad: - description: onLoad per the browser - type: number - _firstInputDelay: - description: firstInputDelay from the browser - type: number - _firstPaint: - description: firstPaint from the browser - type: number - _cumulativeLayoutShift: - description: cumulativeLayoutShift metric from the browser - type: number - _largestContentfulPaint: - description: largestContentfulPaint from the browser - type: number - _domInteractive: - description: domInteractive from the browser - type: number - _firstContentfulPaint: - description: firstContentfulPaint from the browser - type: number - _dns: - description: dns lookup time from the browser - type: number - _ssl: - description: Ssl connect time from the browser - type: number - _timeToFirstByte: - description: Time to first byte of the page's first request per the browser - type: number - _href: - description: "Top level href, including hashtag, etc per the browser" - type: string - type: object - NameValuePair: - properties: - name: - description: Name to match - type: string - value: - description: Value to match - type: string - type: object - MatchCriteria: - description: |- - A set of criteria for filtering HTTP Requests and Responses. - Criteria are AND based, and use python regular expressions for string comparison - example: - request_cookie: "" - response_cookie: "" - json_path: json_path - error_if_no_traffic: true - url: url - content: content - response_header: "" - content_type: content_type - request_header: "" - json_schema: json_schema - json_valid: true - page: page - websocket_message: websocket_message - status: status - properties: - url: - description: Request URL regexp to match - externalDocs: - description: Python Regex - url: https://docs.python.org/3/howto/regex.html - type: string - page: - description: current|all - externalDocs: - description: Python Regex - url: https://docs.python.org/3/howto/regex.html - type: string - status: - description: HTTP Status code to match. - externalDocs: - description: Python Regex - url: https://docs.python.org/3/howto/regex.html - type: string - content: - description: Body content regexp content to match - externalDocs: - description: Python Regex - url: https://docs.python.org/3/howto/regex.html - type: string - content_type: - description: Content type - externalDocs: - description: Python Regex - url: https://docs.python.org/3/howto/regex.html - type: string - websocket_message: - description: Websocket message text to match - externalDocs: - description: Python Regex - url: https://docs.python.org/3/howto/regex.html - type: string - request_header: - allOf: - - $ref: '#/components/schemas/NameValuePair' - externalDocs: - description: Python Regex - url: https://docs.python.org/3/howto/regex.html - request_cookie: - allOf: - - $ref: '#/components/schemas/NameValuePair' - externalDocs: - description: Python Regex - url: https://docs.python.org/3/howto/regex.html - response_header: - allOf: - - $ref: '#/components/schemas/NameValuePair' - externalDocs: - description: Python Regex - url: https://docs.python.org/3/howto/regex.html - response_cookie: - allOf: - - $ref: '#/components/schemas/NameValuePair' - externalDocs: - description: Python Regex - url: https://docs.python.org/3/howto/regex.html - json_valid: - description: Is valid JSON - type: boolean - json_path: - description: Has JSON path - type: string - json_schema: - description: Validates against passed JSON schema - type: string - error_if_no_traffic: - default: true - description: "If the proxy has NO traffic at all, return error" - type: boolean - type: object - VerifyResult: - example: - result: true - name: name - type: type - properties: - result: - description: Result True / False - type: boolean - name: - description: Name - type: string - type: - description: Type - type: string - type: object - Error: - example: - name: name - details: details - properties: - name: - description: Name of the Error to add. Stored in har under _errors - type: string - details: - description: Short details of the error - type: string - type: object - Counter: - example: - name: name - value: 0.8008281904610115 - properties: - name: - description: Name of Custom Counter to add to the page under _counters - type: string - value: - description: Value for the counter - format: double - type: number - type: object - LargestContentfulPaint: - additionalProperties: true - example: - size: 0 - domPath: domPath - startTime: 0 - tag: tag - properties: - startTime: - default: -1 - format: int64 - minimum: -1 - type: integer - size: - default: -1 - format: int64 - minimum: -1 - type: integer - domPath: - default: "" - type: string - tag: - default: "" - type: string - type: object - WebSocketMessage: - example: - data: data - time: 7.058770351582356 - type: type - opcode: 0.8851374739011653 - properties: - type: - type: string - opcode: - type: number - data: - type: string - time: - type: number - required: - - data - - opcode - - time - - type - type: object - Header: - example: - name: name - comment: comment - value: value - properties: - name: - type: string - value: - type: string - comment: - type: string - required: - - name - - value - type: object - Action: - additionalProperties: false - properties: - name: - type: string - id: - type: string - className: - type: string - tagName: - type: string - xpath: - type: string - dataAttributes: - type: string - formName: - type: string - content: - type: string - type: object - PageTimings: - additionalProperties: true - example: - _href: _href - _ssl: 0 - _firstPaint: 0 - _cumulativeLayoutShift: -0.29385987 - _dns: 0 - _largestContentfulPaint: - size: 0 - domPath: domPath - startTime: 0 - tag: tag - _firstInputDelay: -0.5854392 - _domInteractive: 0 - _timeToFirstByte: 0 - _firstContentfulPaint: 0 - onContentLoad: 0 - onLoad: 0 - comment: comment - properties: - onContentLoad: - default: -1 - format: int64 - minimum: -1 - type: integer - onLoad: - default: -1 - format: int64 - minimum: -1 - type: integer - _href: - default: "" - type: string - _dns: - default: -1 - format: int64 - minimum: -1 - type: integer - _ssl: - default: -1 - format: int64 - minimum: -1 - type: integer - _timeToFirstByte: - default: -1 - format: int64 - minimum: -1 - type: integer - _cumulativeLayoutShift: - default: -1 - format: float - minimum: -1 - type: number - _largestContentfulPaint: - $ref: '#/components/schemas/LargestContentfulPaint' - _firstPaint: - default: -1 - format: int64 - minimum: -1 - type: integer - _firstInputDelay: - default: -1 - format: float - minimum: -1 - type: number - _domInteractive: - default: -1 - format: int64 - minimum: -1 - type: integer - _firstContentfulPaint: - default: -1 - format: int64 - minimum: -1 - type: integer - comment: - type: string - required: - - onContentLoad - - onLoad - type: object - Har: - additionalProperties: true - example: - log: - creator: - name: name - comment: comment - version: version - entries: - - startedDateTime: 2000-01-23T04:56:07.000+00:00 - request: - headers: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - httpVersion: httpVersion - method: method - headersSize: 1 - bodySize: 6 - comment: comment - queryString: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - postData: - mimeType: mimeType - text: text - params: - - fileName: fileName - name: name - comment: comment - value: value - contentType: contentType - - fileName: fileName - name: name - comment: comment - value: value - contentType: contentType - url: https://openapi-generator.tech - cookies: - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - cache: - afterRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment - comment: comment - beforeRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment - _webSocketMessages: - - data: data - time: 7.058770351582356 - type: type - opcode: 0.8851374739011653 - - data: data - time: 7.058770351582356 - type: type - opcode: 0.8851374739011653 - response: - headers: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - httpVersion: httpVersion - redirectURL: redirectURL - statusText: statusText - headersSize: 6 - bodySize: 1 - comment: comment - cookies: - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - content: - _videoBufferedPercent: 0 - _videoDroppedFrames: 0 - mimeType: mimeType - encoding: encoding - _videoDecodedByteCount: 0 - _videoTotalFrames: 0 - size: 1 - _videoStallCount: 0 - _videoErrorCount: 0 - comment: comment - text: text - _videoAudioBytesDecoded: 0 - compression: 4 - _videoWaitingCount: 0 - status: 7 - serverIPAddress: serverIPAddress - timings: - receive: 0 - wait: 0 - blocked: 0 - dns: 0 - comment: comment - send: 0 - ssl: 0 - connect: 0 - connection: connection - comment: comment - time: 0 - pageref: pageref - - startedDateTime: 2000-01-23T04:56:07.000+00:00 - request: - headers: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - httpVersion: httpVersion - method: method - headersSize: 1 - bodySize: 6 - comment: comment - queryString: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - postData: - mimeType: mimeType - text: text - params: - - fileName: fileName - name: name - comment: comment - value: value - contentType: contentType - - fileName: fileName - name: name - comment: comment - value: value - contentType: contentType - url: https://openapi-generator.tech - cookies: - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - cache: - afterRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment - comment: comment - beforeRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment - _webSocketMessages: - - data: data - time: 7.058770351582356 - type: type - opcode: 0.8851374739011653 - - data: data - time: 7.058770351582356 - type: type - opcode: 0.8851374739011653 - response: - headers: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - httpVersion: httpVersion - redirectURL: redirectURL - statusText: statusText - headersSize: 6 - bodySize: 1 - comment: comment - cookies: - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - content: - _videoBufferedPercent: 0 - _videoDroppedFrames: 0 - mimeType: mimeType - encoding: encoding - _videoDecodedByteCount: 0 - _videoTotalFrames: 0 - size: 1 - _videoStallCount: 0 - _videoErrorCount: 0 - comment: comment - text: text - _videoAudioBytesDecoded: 0 - compression: 4 - _videoWaitingCount: 0 - status: 7 - serverIPAddress: serverIPAddress - timings: - receive: 0 - wait: 0 - blocked: 0 - dns: 0 - comment: comment - send: 0 - ssl: 0 - connect: 0 - connection: connection - comment: comment - time: 0 - pageref: pageref - pages: - - startedDateTime: 2000-01-23T04:56:07.000+00:00 - pageTimings: - _href: _href - _ssl: 0 - _firstPaint: 0 - _cumulativeLayoutShift: -0.29385987 - _dns: 0 - _largestContentfulPaint: - size: 0 - domPath: domPath - startTime: 0 - tag: tag - _firstInputDelay: -0.5854392 - _domInteractive: 0 - _timeToFirstByte: 0 - _firstContentfulPaint: 0 - onContentLoad: 0 - onLoad: 0 - comment: comment - comment: comment - id: id - _verifications: - - result: true - name: name - type: type - - result: true - name: name - type: type - title: title - _counters: - - name: name - value: 0.8008281904610115 - - name: name - value: 0.8008281904610115 - _errors: - - name: name - details: details - - name: name - details: details - - startedDateTime: 2000-01-23T04:56:07.000+00:00 - pageTimings: - _href: _href - _ssl: 0 - _firstPaint: 0 - _cumulativeLayoutShift: -0.29385987 - _dns: 0 - _largestContentfulPaint: - size: 0 - domPath: domPath - startTime: 0 - tag: tag - _firstInputDelay: -0.5854392 - _domInteractive: 0 - _timeToFirstByte: 0 - _firstContentfulPaint: 0 - onContentLoad: 0 - onLoad: 0 - comment: comment - comment: comment - id: id - _verifications: - - result: true - name: name - type: type - - result: true - name: name - type: type - title: title - _counters: - - name: name - value: 0.8008281904610115 - - name: name - value: 0.8008281904610115 - _errors: - - name: name - details: details - - name: name - details: details - browser: - name: name - comment: comment - version: version - comment: comment - version: version - properties: - log: - $ref: '#/components/schemas/Har_log' - required: - - log - type: object - HarEntry: - example: - startedDateTime: 2000-01-23T04:56:07.000+00:00 - request: - headers: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - httpVersion: httpVersion - method: method - headersSize: 1 - bodySize: 6 - comment: comment - queryString: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - postData: - mimeType: mimeType - text: text - params: - - fileName: fileName - name: name - comment: comment - value: value - contentType: contentType - - fileName: fileName - name: name - comment: comment - value: value - contentType: contentType - url: https://openapi-generator.tech - cookies: - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - cache: - afterRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment - comment: comment - beforeRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment - _webSocketMessages: - - data: data - time: 7.058770351582356 - type: type - opcode: 0.8851374739011653 - - data: data - time: 7.058770351582356 - type: type - opcode: 0.8851374739011653 - response: - headers: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - httpVersion: httpVersion - redirectURL: redirectURL - statusText: statusText - headersSize: 6 - bodySize: 1 - comment: comment - cookies: - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - content: - _videoBufferedPercent: 0 - _videoDroppedFrames: 0 - mimeType: mimeType - encoding: encoding - _videoDecodedByteCount: 0 - _videoTotalFrames: 0 - size: 1 - _videoStallCount: 0 - _videoErrorCount: 0 - comment: comment - text: text - _videoAudioBytesDecoded: 0 - compression: 4 - _videoWaitingCount: 0 - status: 7 - serverIPAddress: serverIPAddress - timings: - receive: 0 - wait: 0 - blocked: 0 - dns: 0 - comment: comment - send: 0 - ssl: 0 - connect: 0 - connection: connection - comment: comment - time: 0 - pageref: pageref - properties: - pageref: - type: string - startedDateTime: - format: date-time - type: string - time: - format: int64 - minimum: 0 - type: integer - request: - $ref: '#/components/schemas/HarEntry_request' - response: - $ref: '#/components/schemas/HarEntry_response' - cache: - $ref: '#/components/schemas/HarEntry_cache' - timings: - $ref: '#/components/schemas/HarEntry_timings' - serverIPAddress: - type: string - _webSocketMessages: - items: - $ref: '#/components/schemas/WebSocketMessage' - type: array - connection: - type: string - comment: - type: string - required: - - cache - - request - - response - - startedDateTime - - time - - timings - type: object - CustomHarData: - minProperties: 1 - type: object - Page: - additionalProperties: true - example: - startedDateTime: 2000-01-23T04:56:07.000+00:00 - pageTimings: - _href: _href - _ssl: 0 - _firstPaint: 0 - _cumulativeLayoutShift: -0.29385987 - _dns: 0 - _largestContentfulPaint: - size: 0 - domPath: domPath - startTime: 0 - tag: tag - _firstInputDelay: -0.5854392 - _domInteractive: 0 - _timeToFirstByte: 0 - _firstContentfulPaint: 0 - onContentLoad: 0 - onLoad: 0 - comment: comment - comment: comment - id: id - _verifications: - - result: true - name: name - type: type - - result: true - name: name - type: type - title: title - _counters: - - name: name - value: 0.8008281904610115 - - name: name - value: 0.8008281904610115 - _errors: - - name: name - details: details - - name: name - details: details - properties: - startedDateTime: - format: date-time - type: string - id: - type: string - title: - type: string - _verifications: - default: [] - items: - $ref: '#/components/schemas/VerifyResult' - type: array - _counters: - default: [] - items: - $ref: '#/components/schemas/Counter' - type: array - _errors: - default: [] - items: - $ref: '#/components/schemas/Error' - type: array - pageTimings: - $ref: '#/components/schemas/PageTimings' - comment: - type: string - required: - - id - - pageTimings - - startedDateTime - - title - type: object - Har_log_creator: - example: - name: name - comment: comment - version: version - properties: - name: - type: string - version: - type: string - comment: - type: string - required: - - name - - version - type: object - Har_log: - example: - creator: - name: name - comment: comment - version: version - entries: - - startedDateTime: 2000-01-23T04:56:07.000+00:00 - request: - headers: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - httpVersion: httpVersion - method: method - headersSize: 1 - bodySize: 6 - comment: comment - queryString: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - postData: - mimeType: mimeType - text: text - params: - - fileName: fileName - name: name - comment: comment - value: value - contentType: contentType - - fileName: fileName - name: name - comment: comment - value: value - contentType: contentType - url: https://openapi-generator.tech - cookies: - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - cache: - afterRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment - comment: comment - beforeRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment - _webSocketMessages: - - data: data - time: 7.058770351582356 - type: type - opcode: 0.8851374739011653 - - data: data - time: 7.058770351582356 - type: type - opcode: 0.8851374739011653 - response: - headers: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - httpVersion: httpVersion - redirectURL: redirectURL - statusText: statusText - headersSize: 6 - bodySize: 1 - comment: comment - cookies: - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - content: - _videoBufferedPercent: 0 - _videoDroppedFrames: 0 - mimeType: mimeType - encoding: encoding - _videoDecodedByteCount: 0 - _videoTotalFrames: 0 - size: 1 - _videoStallCount: 0 - _videoErrorCount: 0 - comment: comment - text: text - _videoAudioBytesDecoded: 0 - compression: 4 - _videoWaitingCount: 0 - status: 7 - serverIPAddress: serverIPAddress - timings: - receive: 0 - wait: 0 - blocked: 0 - dns: 0 - comment: comment - send: 0 - ssl: 0 - connect: 0 - connection: connection - comment: comment - time: 0 - pageref: pageref - - startedDateTime: 2000-01-23T04:56:07.000+00:00 - request: - headers: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - httpVersion: httpVersion - method: method - headersSize: 1 - bodySize: 6 - comment: comment - queryString: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - postData: - mimeType: mimeType - text: text - params: - - fileName: fileName - name: name - comment: comment - value: value - contentType: contentType - - fileName: fileName - name: name - comment: comment - value: value - contentType: contentType - url: https://openapi-generator.tech - cookies: - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - cache: - afterRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment - comment: comment - beforeRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment - _webSocketMessages: - - data: data - time: 7.058770351582356 - type: type - opcode: 0.8851374739011653 - - data: data - time: 7.058770351582356 - type: type - opcode: 0.8851374739011653 - response: - headers: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - httpVersion: httpVersion - redirectURL: redirectURL - statusText: statusText - headersSize: 6 - bodySize: 1 - comment: comment - cookies: - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - content: - _videoBufferedPercent: 0 - _videoDroppedFrames: 0 - mimeType: mimeType - encoding: encoding - _videoDecodedByteCount: 0 - _videoTotalFrames: 0 - size: 1 - _videoStallCount: 0 - _videoErrorCount: 0 - comment: comment - text: text - _videoAudioBytesDecoded: 0 - compression: 4 - _videoWaitingCount: 0 - status: 7 - serverIPAddress: serverIPAddress - timings: - receive: 0 - wait: 0 - blocked: 0 - dns: 0 - comment: comment - send: 0 - ssl: 0 - connect: 0 - connection: connection - comment: comment - time: 0 - pageref: pageref - pages: - - startedDateTime: 2000-01-23T04:56:07.000+00:00 - pageTimings: - _href: _href - _ssl: 0 - _firstPaint: 0 - _cumulativeLayoutShift: -0.29385987 - _dns: 0 - _largestContentfulPaint: - size: 0 - domPath: domPath - startTime: 0 - tag: tag - _firstInputDelay: -0.5854392 - _domInteractive: 0 - _timeToFirstByte: 0 - _firstContentfulPaint: 0 - onContentLoad: 0 - onLoad: 0 - comment: comment - comment: comment - id: id - _verifications: - - result: true - name: name - type: type - - result: true - name: name - type: type - title: title - _counters: - - name: name - value: 0.8008281904610115 - - name: name - value: 0.8008281904610115 - _errors: - - name: name - details: details - - name: name - details: details - - startedDateTime: 2000-01-23T04:56:07.000+00:00 - pageTimings: - _href: _href - _ssl: 0 - _firstPaint: 0 - _cumulativeLayoutShift: -0.29385987 - _dns: 0 - _largestContentfulPaint: - size: 0 - domPath: domPath - startTime: 0 - tag: tag - _firstInputDelay: -0.5854392 - _domInteractive: 0 - _timeToFirstByte: 0 - _firstContentfulPaint: 0 - onContentLoad: 0 - onLoad: 0 - comment: comment - comment: comment - id: id - _verifications: - - result: true - name: name - type: type - - result: true - name: name - type: type - title: title - _counters: - - name: name - value: 0.8008281904610115 - - name: name - value: 0.8008281904610115 - _errors: - - name: name - details: details - - name: name - details: details - browser: - name: name - comment: comment - version: version - comment: comment - version: version - externalDocs: - description: HAR (HTTP Archive) Log Format - url: http://www.softwareishard.com/blog/har-12-spec/ - properties: - version: - type: string - creator: - $ref: '#/components/schemas/Har_log_creator' - browser: - $ref: '#/components/schemas/Har_log_creator' - pages: - items: - $ref: '#/components/schemas/Page' - type: array - entries: - items: - $ref: '#/components/schemas/HarEntry' - type: array - comment: - type: string - required: - - creator - - entries - - pages - - version - type: object - HarEntry_request_cookies_inner: - example: - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - properties: - name: - type: string - value: - type: string - path: - type: string - domain: - type: string - expires: - type: string - httpOnly: - type: boolean - secure: - type: boolean - comment: - type: string - required: - - name - - value - type: object - HarEntry_request_queryString_inner: - example: - name: name - comment: comment - value: value - properties: - name: - type: string - value: - type: string - comment: - type: string - required: - - name - - value - type: object - HarEntry_request_postData_params_inner: - example: - fileName: fileName - name: name - comment: comment - value: value - contentType: contentType - properties: - name: - type: string - value: - type: string - fileName: - type: string - contentType: - type: string - comment: - type: string - type: object - HarEntry_request_postData: - description: Posted data info. - example: - mimeType: mimeType - text: text - params: - - fileName: fileName - name: name - comment: comment - value: value - contentType: contentType - - fileName: fileName - name: name - comment: comment - value: value - contentType: contentType - properties: - mimeType: - type: string - text: - type: string - params: - items: - $ref: '#/components/schemas/HarEntry_request_postData_params_inner' - type: array - required: - - mimeType - HarEntry_request: - additionalProperties: true - example: - headers: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - httpVersion: httpVersion - method: method - headersSize: 1 - bodySize: 6 - comment: comment - queryString: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - postData: - mimeType: mimeType - text: text - params: - - fileName: fileName - name: name - comment: comment - value: value - contentType: contentType - - fileName: fileName - name: name - comment: comment - value: value - contentType: contentType - url: https://openapi-generator.tech - cookies: - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - properties: - method: - type: string - url: - format: uri - type: string - httpVersion: - type: string - cookies: - items: - $ref: '#/components/schemas/HarEntry_request_cookies_inner' - type: array - headers: - items: - $ref: '#/components/schemas/Header' - type: array - queryString: - items: - $ref: '#/components/schemas/HarEntry_request_queryString_inner' - type: array - postData: - $ref: '#/components/schemas/HarEntry_request_postData' - headersSize: - type: integer - bodySize: - type: integer - comment: - type: string - required: - - bodySize - - cookies - - headers - - headersSize - - httpVersion - - method - - queryString - - url - type: object - HarEntry_response_content: - example: - _videoBufferedPercent: 0 - _videoDroppedFrames: 0 - mimeType: mimeType - encoding: encoding - _videoDecodedByteCount: 0 - _videoTotalFrames: 0 - size: 1 - _videoStallCount: 0 - _videoErrorCount: 0 - comment: comment - text: text - _videoAudioBytesDecoded: 0 - compression: 4 - _videoWaitingCount: 0 - properties: - size: - type: integer - compression: - type: integer - mimeType: - type: string - text: - type: string - encoding: - type: string - _videoBufferedPercent: - default: -1 - format: int64 - minimum: -1 - type: integer - _videoStallCount: - default: -1 - format: int64 - minimum: -1 - type: integer - _videoDecodedByteCount: - default: -1 - format: int64 - minimum: -1 - type: integer - _videoWaitingCount: - default: -1 - format: int64 - minimum: -1 - type: integer - _videoErrorCount: - default: -1 - format: int64 - minimum: -1 - type: integer - _videoDroppedFrames: - default: -1 - format: int64 - minimum: -1 - type: integer - _videoTotalFrames: - default: -1 - format: int64 - minimum: -1 - type: integer - _videoAudioBytesDecoded: - default: -1 - format: int64 - minimum: -1 - type: integer - comment: - type: string - required: - - mimeType - - size - type: object - HarEntry_response: - additionalProperties: true - example: - headers: - - name: name - comment: comment - value: value - - name: name - comment: comment - value: value - httpVersion: httpVersion - redirectURL: redirectURL - statusText: statusText - headersSize: 6 - bodySize: 1 - comment: comment - cookies: - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - - path: path - expires: expires - domain: domain - name: name - comment: comment - httpOnly: true - secure: true - value: value - content: - _videoBufferedPercent: 0 - _videoDroppedFrames: 0 - mimeType: mimeType - encoding: encoding - _videoDecodedByteCount: 0 - _videoTotalFrames: 0 - size: 1 - _videoStallCount: 0 - _videoErrorCount: 0 - comment: comment - text: text - _videoAudioBytesDecoded: 0 - compression: 4 - _videoWaitingCount: 0 - status: 7 - properties: - status: - type: integer - statusText: - type: string - httpVersion: - type: string - cookies: - items: - $ref: '#/components/schemas/HarEntry_request_cookies_inner' - type: array - headers: - items: - $ref: '#/components/schemas/Header' - type: array - content: - $ref: '#/components/schemas/HarEntry_response_content' - redirectURL: - type: string - headersSize: - type: integer - bodySize: - type: integer - comment: - type: string - required: - - bodySize - - content - - cookies - - headers - - headersSize - - httpVersion - - redirectURL - - status - - statusText - type: object - HarEntry_cache_beforeRequest: - example: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment - nullable: true - properties: - expires: - type: string - lastAccess: - type: string - eTag: - type: string - hitCount: - type: integer - comment: - type: string - required: - - eTag - - hitCount - - lastAccess - type: object - HarEntry_cache: - example: - afterRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment - comment: comment - beforeRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment - properties: - beforeRequest: - $ref: '#/components/schemas/HarEntry_cache_beforeRequest' - afterRequest: - $ref: '#/components/schemas/HarEntry_cache_beforeRequest' - comment: - type: string - HarEntry_timings: - example: - receive: 0 - wait: 0 - blocked: 0 - dns: 0 - comment: comment - send: 0 - ssl: 0 - connect: 0 - properties: - dns: - default: -1 - format: int64 - minimum: -1 - type: integer - connect: - default: -1 - format: int64 - minimum: -1 - type: integer - blocked: - default: -1 - format: int64 - minimum: -1 - type: integer - send: - default: -1 - format: int64 - minimum: -1 - type: integer - wait: - default: -1 - format: int64 - minimum: -1 - type: integer - receive: - default: -1 - format: int64 - minimum: -1 - type: integer - ssl: - default: -1 - format: int64 - minimum: -1 - type: integer - comment: - type: string - required: - - blocked - - connect - - dns - - receive - - send - - ssl - - wait - type: object - diff --git a/clients/csharp/appveyor.yml b/clients/csharp/appveyor.yml index a791cd53e9..ac2886e0b4 100644 --- a/clients/csharp/appveyor.yml +++ b/clients/csharp/appveyor.yml @@ -6,4 +6,4 @@ build_script: - dotnet build -c Release - dotnet test -c Release after_build: -- dotnet pack .\src\BrowserUp.Mitmproxy.Client\BrowserUp.Mitmproxy.Client.csproj -o ../../output -c Release --no-build +- dotnet pack .\src\BrowserUpMitmProxyClient\BrowserUpMitmProxyClient.csproj -o ../../output -c Release --no-build diff --git a/clients/csharp/docs/Action.md b/clients/csharp/docs/Action.md index aca9839139..6a4918c10e 100644 --- a/clients/csharp/docs/Action.md +++ b/clients/csharp/docs/Action.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.Action +# BrowserUpMitmProxyClient.Model.Action ## Properties diff --git a/clients/csharp/docs/BrowserUpProxyApi.md b/clients/csharp/docs/BrowserUpProxyApi.md index f3fee4cf31..eb5a562c3f 100644 --- a/clients/csharp/docs/BrowserUpProxyApi.md +++ b/clients/csharp/docs/BrowserUpProxyApi.md @@ -1,11 +1,11 @@ -# BrowserUp.Mitmproxy.Client.Api.BrowserUpProxyApi +# BrowserUpMitmProxyClient.Api.BrowserUpProxyApi All URIs are relative to *http://localhost:48088* | Method | HTTP request | Description | |--------|--------------|-------------| -| [**AddCounter**](BrowserUpProxyApi.md#addcounter) | **POST** /har/counters | | | [**AddError**](BrowserUpProxyApi.md#adderror) | **POST** /har/errors | | +| [**AddMetric**](BrowserUpProxyApi.md#addmetric) | **POST** /har/metrics | | | [**GetHarLog**](BrowserUpProxyApi.md#getharlog) | **GET** /har | | | [**Healthcheck**](BrowserUpProxyApi.md#healthcheck) | **GET** /healthcheck | | | [**NewPage**](BrowserUpProxyApi.md#newpage) | **POST** /har/page | | @@ -15,40 +15,40 @@ All URIs are relative to *http://localhost:48088* | [**VerifySLA**](BrowserUpProxyApi.md#verifysla) | **POST** /verify/sla/{time}/{name} | | | [**VerifySize**](BrowserUpProxyApi.md#verifysize) | **POST** /verify/size/{size}/{name} | | - -# **AddCounter** -> void AddCounter (Counter counter) + +# **AddError** +> void AddError (Error error) -Add Custom Counter to the captured traffic har +Add Custom Error to the captured traffic har ### Example ```csharp using System.Collections.Generic; using System.Diagnostics; -using BrowserUp.Mitmproxy.Client.Api; -using BrowserUp.Mitmproxy.Client.Client; -using BrowserUp.Mitmproxy.Client.Model; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Client; +using BrowserUpMitmProxyClient.Model; namespace Example { - public class AddCounterExample + public class AddErrorExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "http://localhost:48088"; var apiInstance = new BrowserUpProxyApi(config); - var counter = new Counter(); // Counter | Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key + var error = new Error(); // Error | Receives an error to track. Internally, the error is stored in an array in the har under the _errors key try { - apiInstance.AddCounter(counter); + apiInstance.AddError(error); } catch (ApiException e) { - Debug.Print("Exception when calling BrowserUpProxyApi.AddCounter: " + e.Message); + Debug.Print("Exception when calling BrowserUpProxyApi.AddError: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -57,17 +57,17 @@ namespace Example } ``` -#### Using the AddCounterWithHttpInfo variant +#### Using the AddErrorWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - apiInstance.AddCounterWithHttpInfo(counter); + apiInstance.AddErrorWithHttpInfo(error); } catch (ApiException e) { - Debug.Print("Exception when calling BrowserUpProxyApi.AddCounterWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling BrowserUpProxyApi.AddErrorWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -77,7 +77,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **counter** | [**Counter**](Counter.md) | Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key | | +| **error** | [**Error**](Error.md) | Receives an error to track. Internally, the error is stored in an array in the har under the _errors key | | ### Return type @@ -96,45 +96,45 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | The counter was added. | - | -| **422** | The counter was invalid. | - | +| **204** | The Error was added. | - | +| **422** | The Error was invalid. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **AddError** -> void AddError (Error error) + +# **AddMetric** +> void AddMetric (Metric metric) -Add Custom Error to the captured traffic har +Add Custom Metric to the captured traffic har ### Example ```csharp using System.Collections.Generic; using System.Diagnostics; -using BrowserUp.Mitmproxy.Client.Api; -using BrowserUp.Mitmproxy.Client.Client; -using BrowserUp.Mitmproxy.Client.Model; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Client; +using BrowserUpMitmProxyClient.Model; namespace Example { - public class AddErrorExample + public class AddMetricExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "http://localhost:48088"; var apiInstance = new BrowserUpProxyApi(config); - var error = new Error(); // Error | Receives an error to track. Internally, the error is stored in an array in the har under the _errors key + var metric = new Metric(); // Metric | Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key try { - apiInstance.AddError(error); + apiInstance.AddMetric(metric); } catch (ApiException e) { - Debug.Print("Exception when calling BrowserUpProxyApi.AddError: " + e.Message); + Debug.Print("Exception when calling BrowserUpProxyApi.AddMetric: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -143,17 +143,17 @@ namespace Example } ``` -#### Using the AddErrorWithHttpInfo variant +#### Using the AddMetricWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - apiInstance.AddErrorWithHttpInfo(error); + apiInstance.AddMetricWithHttpInfo(metric); } catch (ApiException e) { - Debug.Print("Exception when calling BrowserUpProxyApi.AddErrorWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling BrowserUpProxyApi.AddMetricWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -163,7 +163,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **error** | [**Error**](Error.md) | Receives an error to track. Internally, the error is stored in an array in the har under the _errors key | | +| **metric** | [**Metric**](Metric.md) | Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key | | ### Return type @@ -182,12 +182,12 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | The Error was added. | - | -| **422** | The Error was invalid. | - | +| **204** | The metric was added. | - | +| **422** | The metric was invalid. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **GetHarLog** > Har GetHarLog () @@ -199,9 +199,9 @@ Get the current HAR. ```csharp using System.Collections.Generic; using System.Diagnostics; -using BrowserUp.Mitmproxy.Client.Api; -using BrowserUp.Mitmproxy.Client.Client; -using BrowserUp.Mitmproxy.Client.Model; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Client; +using BrowserUpMitmProxyClient.Model; namespace Example { @@ -271,7 +271,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **Healthcheck** > void Healthcheck () @@ -283,9 +283,9 @@ Get the healthcheck ```csharp using System.Collections.Generic; using System.Diagnostics; -using BrowserUp.Mitmproxy.Client.Api; -using BrowserUp.Mitmproxy.Client.Client; -using BrowserUp.Mitmproxy.Client.Model; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Client; +using BrowserUpMitmProxyClient.Model; namespace Example { @@ -351,7 +351,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **NewPage** > Har NewPage (string title) @@ -363,9 +363,9 @@ Starts a fresh HAR Page (Step) in the current active HAR to group requests. ```csharp using System.Collections.Generic; using System.Diagnostics; -using BrowserUp.Mitmproxy.Client.Api; -using BrowserUp.Mitmproxy.Client.Client; -using BrowserUp.Mitmproxy.Client.Model; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Client; +using BrowserUpMitmProxyClient.Model; namespace Example { @@ -440,7 +440,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **ResetHarLog** > Har ResetHarLog () @@ -452,9 +452,9 @@ Starts a fresh HAR capture session. ```csharp using System.Collections.Generic; using System.Diagnostics; -using BrowserUp.Mitmproxy.Client.Api; -using BrowserUp.Mitmproxy.Client.Client; -using BrowserUp.Mitmproxy.Client.Model; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Client; +using BrowserUpMitmProxyClient.Model; namespace Example { @@ -524,7 +524,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **VerifyNotPresent** > VerifyResult VerifyNotPresent (string name, MatchCriteria matchCriteria) @@ -536,9 +536,9 @@ Verify no matching items are present in the captured traffic ```csharp using System.Collections.Generic; using System.Diagnostics; -using BrowserUp.Mitmproxy.Client.Api; -using BrowserUp.Mitmproxy.Client.Client; -using BrowserUp.Mitmproxy.Client.Model; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Client; +using BrowserUpMitmProxyClient.Model; namespace Example { @@ -616,7 +616,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **VerifyPresent** > VerifyResult VerifyPresent (string name, MatchCriteria matchCriteria) @@ -628,9 +628,9 @@ Verify at least one matching item is present in the captured traffic ```csharp using System.Collections.Generic; using System.Diagnostics; -using BrowserUp.Mitmproxy.Client.Api; -using BrowserUp.Mitmproxy.Client.Client; -using BrowserUp.Mitmproxy.Client.Model; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Client; +using BrowserUpMitmProxyClient.Model; namespace Example { @@ -708,7 +708,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **VerifySLA** > VerifyResult VerifySLA (int time, string name, MatchCriteria matchCriteria) @@ -720,9 +720,9 @@ Verify each traffic item matching the criteria meets is below SLA time ```csharp using System.Collections.Generic; using System.Diagnostics; -using BrowserUp.Mitmproxy.Client.Api; -using BrowserUp.Mitmproxy.Client.Client; -using BrowserUp.Mitmproxy.Client.Model; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Client; +using BrowserUpMitmProxyClient.Model; namespace Example { @@ -802,7 +802,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - + # **VerifySize** > VerifyResult VerifySize (int size, string name, MatchCriteria matchCriteria) @@ -814,9 +814,9 @@ Verify matching items in the captured traffic meet the size criteria ```csharp using System.Collections.Generic; using System.Diagnostics; -using BrowserUp.Mitmproxy.Client.Api; -using BrowserUp.Mitmproxy.Client.Client; -using BrowserUp.Mitmproxy.Client.Model; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Client; +using BrowserUpMitmProxyClient.Model; namespace Example { diff --git a/clients/csharp/docs/Error.md b/clients/csharp/docs/Error.md index 3fe7acdc78..233292cb71 100644 --- a/clients/csharp/docs/Error.md +++ b/clients/csharp/docs/Error.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.Error +# BrowserUpMitmProxyClient.Model.Error ## Properties diff --git a/clients/csharp/docs/Har.md b/clients/csharp/docs/Har.md index 5288923e6e..937347ff03 100644 --- a/clients/csharp/docs/Har.md +++ b/clients/csharp/docs/Har.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.Har +# BrowserUpMitmProxyClient.Model.Har ## Properties diff --git a/clients/csharp/docs/HarEntry.md b/clients/csharp/docs/HarEntry.md index 8e52cfe25c..c82d4b3a11 100644 --- a/clients/csharp/docs/HarEntry.md +++ b/clients/csharp/docs/HarEntry.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.HarEntry +# BrowserUpMitmProxyClient.Model.HarEntry ## Properties diff --git a/clients/csharp/docs/HarEntryCache.md b/clients/csharp/docs/HarEntryCache.md index cd05520213..9c5f791723 100644 --- a/clients/csharp/docs/HarEntryCache.md +++ b/clients/csharp/docs/HarEntryCache.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.HarEntryCache +# BrowserUpMitmProxyClient.Model.HarEntryCache ## Properties diff --git a/clients/csharp/docs/HarEntryCacheBeforeRequest.md b/clients/csharp/docs/HarEntryCacheBeforeRequest.md index 40460c7093..e82a792085 100644 --- a/clients/csharp/docs/HarEntryCacheBeforeRequest.md +++ b/clients/csharp/docs/HarEntryCacheBeforeRequest.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.HarEntryCacheBeforeRequest +# BrowserUpMitmProxyClient.Model.HarEntryCacheBeforeRequest ## Properties diff --git a/clients/csharp/docs/HarEntryCacheBeforeRequestOneOf.md b/clients/csharp/docs/HarEntryCacheBeforeRequestOneOf.md index ae8bab15a5..327c082ec9 100644 --- a/clients/csharp/docs/HarEntryCacheBeforeRequestOneOf.md +++ b/clients/csharp/docs/HarEntryCacheBeforeRequestOneOf.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.HarEntryCacheBeforeRequestOneOf +# BrowserUpMitmProxyClient.Model.HarEntryCacheBeforeRequestOneOf ## Properties diff --git a/clients/csharp/docs/HarEntryRequest.md b/clients/csharp/docs/HarEntryRequest.md index b3c4e4c07e..c8652581ea 100644 --- a/clients/csharp/docs/HarEntryRequest.md +++ b/clients/csharp/docs/HarEntryRequest.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.HarEntryRequest +# BrowserUpMitmProxyClient.Model.HarEntryRequest ## Properties diff --git a/clients/csharp/docs/HarEntryRequestCookiesInner.md b/clients/csharp/docs/HarEntryRequestCookiesInner.md index 7f83f86569..dad007ba56 100644 --- a/clients/csharp/docs/HarEntryRequestCookiesInner.md +++ b/clients/csharp/docs/HarEntryRequestCookiesInner.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.HarEntryRequestCookiesInner +# BrowserUpMitmProxyClient.Model.HarEntryRequestCookiesInner ## Properties diff --git a/clients/csharp/docs/HarEntryRequestPostData.md b/clients/csharp/docs/HarEntryRequestPostData.md index 53d3e4fa74..01c50e07ec 100644 --- a/clients/csharp/docs/HarEntryRequestPostData.md +++ b/clients/csharp/docs/HarEntryRequestPostData.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.HarEntryRequestPostData +# BrowserUpMitmProxyClient.Model.HarEntryRequestPostData Posted data info. ## Properties @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MimeType** | **string** | | **Text** | **string** | | [optional] -**VarParams** | [**List<HarEntryRequestPostDataParamsInner>**](HarEntryRequestPostDataParamsInner.md) | | [optional] +**Params** | [**List<HarEntryRequestPostDataParamsInner>**](HarEntryRequestPostDataParamsInner.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/csharp/docs/HarEntryRequestPostDataParamsInner.md b/clients/csharp/docs/HarEntryRequestPostDataParamsInner.md index a35fb93d68..c8af0de1ad 100644 --- a/clients/csharp/docs/HarEntryRequestPostDataParamsInner.md +++ b/clients/csharp/docs/HarEntryRequestPostDataParamsInner.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.HarEntryRequestPostDataParamsInner +# BrowserUpMitmProxyClient.Model.HarEntryRequestPostDataParamsInner ## Properties diff --git a/clients/csharp/docs/HarEntryRequestQueryStringInner.md b/clients/csharp/docs/HarEntryRequestQueryStringInner.md index 25b112e861..19c1ceecdb 100644 --- a/clients/csharp/docs/HarEntryRequestQueryStringInner.md +++ b/clients/csharp/docs/HarEntryRequestQueryStringInner.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.HarEntryRequestQueryStringInner +# BrowserUpMitmProxyClient.Model.HarEntryRequestQueryStringInner ## Properties diff --git a/clients/csharp/docs/HarEntryResponse.md b/clients/csharp/docs/HarEntryResponse.md index 64d79c8bc3..620119003a 100644 --- a/clients/csharp/docs/HarEntryResponse.md +++ b/clients/csharp/docs/HarEntryResponse.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.HarEntryResponse +# BrowserUpMitmProxyClient.Model.HarEntryResponse ## Properties diff --git a/clients/csharp/docs/HarEntryResponseContent.md b/clients/csharp/docs/HarEntryResponseContent.md index 59df2fbfd4..06ecc72427 100644 --- a/clients/csharp/docs/HarEntryResponseContent.md +++ b/clients/csharp/docs/HarEntryResponseContent.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.HarEntryResponseContent +# BrowserUpMitmProxyClient.Model.HarEntryResponseContent ## Properties diff --git a/clients/csharp/docs/HarEntryTimings.md b/clients/csharp/docs/HarEntryTimings.md index 6a08f174e8..6e7e376f9e 100644 --- a/clients/csharp/docs/HarEntryTimings.md +++ b/clients/csharp/docs/HarEntryTimings.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.HarEntryTimings +# BrowserUpMitmProxyClient.Model.HarEntryTimings ## Properties diff --git a/clients/csharp/docs/HarLog.md b/clients/csharp/docs/HarLog.md index 75c68d1169..99698d97f2 100644 --- a/clients/csharp/docs/HarLog.md +++ b/clients/csharp/docs/HarLog.md @@ -1,10 +1,10 @@ -# BrowserUp.Mitmproxy.Client.Model.HarLog +# BrowserUpMitmProxyClient.Model.HarLog ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**VarVersion** | **string** | | +**_Version** | **string** | | **Creator** | [**HarLogCreator**](HarLogCreator.md) | | **Browser** | [**HarLogCreator**](HarLogCreator.md) | | [optional] **Pages** | [**List<Page>**](Page.md) | | diff --git a/clients/csharp/docs/HarLogCreator.md b/clients/csharp/docs/HarLogCreator.md index 3777ff8f15..f543a199dc 100644 --- a/clients/csharp/docs/HarLogCreator.md +++ b/clients/csharp/docs/HarLogCreator.md @@ -1,11 +1,11 @@ -# BrowserUp.Mitmproxy.Client.Model.HarLogCreator +# BrowserUpMitmProxyClient.Model.HarLogCreator ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | | -**VarVersion** | **string** | | +**_Version** | **string** | | **Comment** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/csharp/docs/Header.md b/clients/csharp/docs/Header.md index 7bfe778b7b..28f7024168 100644 --- a/clients/csharp/docs/Header.md +++ b/clients/csharp/docs/Header.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.Header +# BrowserUpMitmProxyClient.Model.Header ## Properties diff --git a/clients/csharp/docs/LargestContentfulPaint.md b/clients/csharp/docs/LargestContentfulPaint.md index a15c7d73b9..f79c97251e 100644 --- a/clients/csharp/docs/LargestContentfulPaint.md +++ b/clients/csharp/docs/LargestContentfulPaint.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.LargestContentfulPaint +# BrowserUpMitmProxyClient.Model.LargestContentfulPaint ## Properties diff --git a/clients/csharp/docs/MatchCriteria.md b/clients/csharp/docs/MatchCriteria.md index b5fdc7e970..baa7157432 100644 --- a/clients/csharp/docs/MatchCriteria.md +++ b/clients/csharp/docs/MatchCriteria.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.MatchCriteria +# BrowserUpMitmProxyClient.Model.MatchCriteria A set of criteria for filtering HTTP Requests and Responses. Criteria are AND based, and use python regular expressions for string comparison ## Properties @@ -11,10 +11,10 @@ Name | Type | Description | Notes **Content** | **string** | Body content regexp content to match | [optional] **ContentType** | **string** | Content type | [optional] **WebsocketMessage** | **string** | Websocket message text to match | [optional] -**RequestHeader** | [**NameValuePair**](NameValuePair.md) | | [optional] -**RequestCookie** | [**NameValuePair**](NameValuePair.md) | | [optional] -**ResponseHeader** | [**NameValuePair**](NameValuePair.md) | | [optional] -**ResponseCookie** | [**NameValuePair**](NameValuePair.md) | | [optional] +**RequestHeader** | [**MatchCriteriaRequestHeader**](MatchCriteriaRequestHeader.md) | | [optional] +**RequestCookie** | [**MatchCriteriaRequestHeader**](MatchCriteriaRequestHeader.md) | | [optional] +**ResponseHeader** | [**MatchCriteriaRequestHeader**](MatchCriteriaRequestHeader.md) | | [optional] +**ResponseCookie** | [**MatchCriteriaRequestHeader**](MatchCriteriaRequestHeader.md) | | [optional] **JsonValid** | **bool** | Is valid JSON | [optional] **JsonPath** | **string** | Has JSON path | [optional] **JsonSchema** | **string** | Validates against passed JSON schema | [optional] diff --git a/clients/csharp/docs/MatchCriteriaRequestHeader.md b/clients/csharp/docs/MatchCriteriaRequestHeader.md index 30839ed5b1..8b26bc9191 100644 --- a/clients/csharp/docs/MatchCriteriaRequestHeader.md +++ b/clients/csharp/docs/MatchCriteriaRequestHeader.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.MatchCriteriaRequestHeader +# BrowserUpMitmProxyClient.Model.MatchCriteriaRequestHeader ## Properties diff --git a/clients/csharp/docs/Counter.md b/clients/csharp/docs/Metric.md similarity index 57% rename from clients/csharp/docs/Counter.md rename to clients/csharp/docs/Metric.md index c70696d300..59f9266dff 100644 --- a/clients/csharp/docs/Counter.md +++ b/clients/csharp/docs/Metric.md @@ -1,11 +1,11 @@ -# BrowserUp.Mitmproxy.Client.Model.Counter +# BrowserUpMitmProxyClient.Model.Metric ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | Name of Custom Counter to add to the page under _counters | [optional] -**Value** | **double** | Value for the counter | [optional] +**Name** | **string** | Name of Custom Metric to add to the page under _metrics | [optional] +**Value** | **double** | Value for the metric | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/csharp/docs/NameValuePair.md b/clients/csharp/docs/NameValuePair.md index c45a152287..cfbe1b6fa3 100644 --- a/clients/csharp/docs/NameValuePair.md +++ b/clients/csharp/docs/NameValuePair.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.NameValuePair +# BrowserUpMitmProxyClient.Model.NameValuePair ## Properties diff --git a/clients/csharp/docs/Page.md b/clients/csharp/docs/Page.md index dab58bbeeb..e883302e97 100644 --- a/clients/csharp/docs/Page.md +++ b/clients/csharp/docs/Page.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.Page +# BrowserUpMitmProxyClient.Model.Page ## Properties @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Id** | **string** | | **Title** | **string** | | **Verifications** | [**List<VerifyResult>**](VerifyResult.md) | | [optional] -**Counters** | [**List<Counter>**](Counter.md) | | [optional] +**Metrics** | [**List<Metric>**](Metric.md) | | [optional] **Errors** | [**List<Error>**](Error.md) | | [optional] **PageTimings** | [**PageTimings**](PageTimings.md) | | **Comment** | **string** | | [optional] diff --git a/clients/csharp/docs/PageTiming.md b/clients/csharp/docs/PageTiming.md index 1859d4ed01..2b5a0b2d25 100644 --- a/clients/csharp/docs/PageTiming.md +++ b/clients/csharp/docs/PageTiming.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.PageTiming +# BrowserUpMitmProxyClient.Model.PageTiming ## Properties diff --git a/clients/csharp/docs/PageTimings.md b/clients/csharp/docs/PageTimings.md index ed9d16e773..f41b9119cf 100644 --- a/clients/csharp/docs/PageTimings.md +++ b/clients/csharp/docs/PageTimings.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.PageTimings +# BrowserUpMitmProxyClient.Model.PageTimings ## Properties diff --git a/clients/csharp/docs/VerifyResult.md b/clients/csharp/docs/VerifyResult.md index 8159839b27..95af4c4c6d 100644 --- a/clients/csharp/docs/VerifyResult.md +++ b/clients/csharp/docs/VerifyResult.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.VerifyResult +# BrowserUpMitmProxyClient.Model.VerifyResult ## Properties diff --git a/clients/csharp/docs/WebSocketMessage.md b/clients/csharp/docs/WebSocketMessage.md index 0ed2032f46..fe0fa5bbcc 100644 --- a/clients/csharp/docs/WebSocketMessage.md +++ b/clients/csharp/docs/WebSocketMessage.md @@ -1,4 +1,4 @@ -# BrowserUp.Mitmproxy.Client.Model.WebSocketMessage +# BrowserUpMitmProxyClient.Model.WebSocketMessage ## Properties diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryCacheBeforeRequest.cs b/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryCacheBeforeRequest.cs deleted file mode 100644 index 422d731e86..0000000000 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryCacheBeforeRequest.cs +++ /dev/null @@ -1,211 +0,0 @@ -/* - * BrowserUp MitmProxy - * - * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - * - * The version of the OpenAPI document: 1.0.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; - -namespace BrowserUp.Mitmproxy.Client.Model -{ - /// - /// HarEntryCacheBeforeRequest - /// - [DataContract(Name = "HarEntry_cache_beforeRequest")] - public partial class HarEntryCacheBeforeRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HarEntryCacheBeforeRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// expires. - /// lastAccess (required). - /// eTag (required). - /// hitCount (required). - /// comment. - public HarEntryCacheBeforeRequest(string expires = default(string), string lastAccess = default(string), string eTag = default(string), int hitCount = default(int), string comment = default(string)) - { - // to ensure "lastAccess" is required (not null) - if (lastAccess == null) - { - throw new ArgumentNullException("lastAccess is a required property for HarEntryCacheBeforeRequest and cannot be null"); - } - this.LastAccess = lastAccess; - // to ensure "eTag" is required (not null) - if (eTag == null) - { - throw new ArgumentNullException("eTag is a required property for HarEntryCacheBeforeRequest and cannot be null"); - } - this.ETag = eTag; - this.HitCount = hitCount; - this.Expires = expires; - this.Comment = comment; - } - - /// - /// Gets or Sets Expires - /// - [DataMember(Name = "expires", EmitDefaultValue = false)] - public string Expires { get; set; } - - /// - /// Gets or Sets LastAccess - /// - [DataMember(Name = "lastAccess", IsRequired = true, EmitDefaultValue = true)] - public string LastAccess { get; set; } - - /// - /// Gets or Sets ETag - /// - [DataMember(Name = "eTag", IsRequired = true, EmitDefaultValue = true)] - public string ETag { get; set; } - - /// - /// Gets or Sets HitCount - /// - [DataMember(Name = "hitCount", IsRequired = true, EmitDefaultValue = true)] - public int HitCount { get; set; } - - /// - /// Gets or Sets Comment - /// - [DataMember(Name = "comment", EmitDefaultValue = false)] - public string Comment { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class HarEntryCacheBeforeRequest {\n"); - sb.Append(" Expires: ").Append(Expires).Append("\n"); - sb.Append(" LastAccess: ").Append(LastAccess).Append("\n"); - sb.Append(" ETag: ").Append(ETag).Append("\n"); - sb.Append(" HitCount: ").Append(HitCount).Append("\n"); - sb.Append(" Comment: ").Append(Comment).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HarEntryCacheBeforeRequest); - } - - /// - /// Returns true if HarEntryCacheBeforeRequest instances are equal - /// - /// Instance of HarEntryCacheBeforeRequest to be compared - /// Boolean - public bool Equals(HarEntryCacheBeforeRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Expires == input.Expires || - (this.Expires != null && - this.Expires.Equals(input.Expires)) - ) && - ( - this.LastAccess == input.LastAccess || - (this.LastAccess != null && - this.LastAccess.Equals(input.LastAccess)) - ) && - ( - this.ETag == input.ETag || - (this.ETag != null && - this.ETag.Equals(input.ETag)) - ) && - ( - this.HitCount == input.HitCount || - this.HitCount.Equals(input.HitCount) - ) && - ( - this.Comment == input.Comment || - (this.Comment != null && - this.Comment.Equals(input.Comment)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Expires != null) - { - hashCode = (hashCode * 59) + this.Expires.GetHashCode(); - } - if (this.LastAccess != null) - { - hashCode = (hashCode * 59) + this.LastAccess.GetHashCode(); - } - if (this.ETag != null) - { - hashCode = (hashCode * 59) + this.ETag.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HitCount.GetHashCode(); - if (this.Comment != null) - { - hashCode = (hashCode * 59) + this.Comment.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Api/BrowserUpProxyApiTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Api/BrowserUpProxyApiTests.cs similarity index 93% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Api/BrowserUpProxyApiTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Api/BrowserUpProxyApiTests.cs index 477a080596..2a9e07eec7 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Api/BrowserUpProxyApiTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Api/BrowserUpProxyApiTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -16,12 +16,12 @@ using RestSharp; using Xunit; -using BrowserUp.Mitmproxy.Client.Client; -using BrowserUp.Mitmproxy.Client.Api; +using BrowserUpMitmProxyClient.Client; +using BrowserUpMitmProxyClient.Api; // uncomment below to import models -//using BrowserUp.Mitmproxy.Client.Model; +//using BrowserUpMitmProxyClient.Model; -namespace BrowserUp.Mitmproxy.Client.Test.Api +namespace BrowserUpMitmProxyClient.Test.Api { /// /// Class for testing BrowserUpProxyApi @@ -55,25 +55,25 @@ public void InstanceTest() } /// - /// Test AddCounter + /// Test AddError /// [Fact] - public void AddCounterTest() + public void AddErrorTest() { // TODO uncomment below to test the method and replace null with proper value - //Counter counter = null; - //instance.AddCounter(counter); + //Error error = null; + //instance.AddError(error); } /// - /// Test AddError + /// Test AddMetric /// [Fact] - public void AddErrorTest() + public void AddMetricTest() { // TODO uncomment below to test the method and replace null with proper value - //Error error = null; - //instance.AddError(error); + //Metric metric = null; + //instance.AddMetric(metric); } /// diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/BrowserUp.Mitmproxy.Client.Test.csproj b/clients/csharp/src/BrowserUpMitmProxyClient.Test/BrowserUpMitmProxyClient.Test.csproj similarity index 55% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/BrowserUp.Mitmproxy.Client.Test.csproj rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/BrowserUpMitmProxyClient.Test.csproj index 364afd3205..03c8dd80c4 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/BrowserUp.Mitmproxy.Client.Test.csproj +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/BrowserUpMitmProxyClient.Test.csproj @@ -1,20 +1,20 @@ - BrowserUp.Mitmproxy.Client.Test - BrowserUp.Mitmproxy.Client.Test + BrowserUpMitmProxyClient.Test + BrowserUpMitmProxyClient.Test net7.0 false annotations - - - + + + - + diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/ActionTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/ActionTests.cs similarity index 93% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/ActionTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/ActionTests.cs index 1ad7f9befd..403d0695ff 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/ActionTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/ActionTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing Action diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/ErrorTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/ErrorTests.cs similarity index 90% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/ErrorTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/ErrorTests.cs index e9cb32f51b..6c9f3fe91e 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/ErrorTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/ErrorTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing Error @@ -56,20 +57,20 @@ public void ErrorInstanceTest() /// - /// Test the property 'Details' + /// Test the property 'Name' /// [Fact] - public void DetailsTest() + public void NameTest() { - // TODO unit test for the property 'Details' + // TODO unit test for the property 'Name' } /// - /// Test the property 'Name' + /// Test the property 'Details' /// [Fact] - public void NameTest() + public void DetailsTest() { - // TODO unit test for the property 'Name' + // TODO unit test for the property 'Details' } } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryCacheBeforeRequestOneOfTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryCacheBeforeRequestOneOfTests.cs similarity index 93% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryCacheBeforeRequestOneOfTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryCacheBeforeRequestOneOfTests.cs index a674b30565..476578ad1e 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryCacheBeforeRequestOneOfTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryCacheBeforeRequestOneOfTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing HarEntryCacheBeforeRequestOneOf diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryCacheBeforeRequestTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryCacheBeforeRequestTests.cs similarity index 93% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryCacheBeforeRequestTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryCacheBeforeRequestTests.cs index 67adca511c..f60f6c0232 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryCacheBeforeRequestTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryCacheBeforeRequestTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing HarEntryCacheBeforeRequest diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryCacheTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryCacheTests.cs similarity index 91% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryCacheTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryCacheTests.cs index 44509d566e..6fd3b0f1c6 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryCacheTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryCacheTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing HarEntryCache diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryRequestCookiesInnerTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestCookiesInnerTests.cs similarity index 94% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryRequestCookiesInnerTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestCookiesInnerTests.cs index 470208df75..4e41276773 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryRequestCookiesInnerTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestCookiesInnerTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing HarEntryRequestCookiesInner diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryRequestPostDataParamsInnerTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestPostDataParamsInnerTests.cs similarity index 93% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryRequestPostDataParamsInnerTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestPostDataParamsInnerTests.cs index ed74684e32..e7dc363d08 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryRequestPostDataParamsInnerTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestPostDataParamsInnerTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing HarEntryRequestPostDataParamsInner diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryRequestPostDataTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestPostDataTests.cs similarity index 91% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryRequestPostDataTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestPostDataTests.cs index c5fd545ae3..fa51f67117 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryRequestPostDataTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestPostDataTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing HarEntryRequestPostData diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryRequestQueryStringInnerTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestQueryStringInnerTests.cs similarity index 91% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryRequestQueryStringInnerTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestQueryStringInnerTests.cs index 7e6f97b7de..eb8f515e86 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryRequestQueryStringInnerTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestQueryStringInnerTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing HarEntryRequestQueryStringInner diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryRequestTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestTests.cs similarity index 94% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryRequestTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestTests.cs index 1463f8d577..8bb0a0fef8 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryRequestTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryRequestTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing HarEntryRequest diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryResponseContentTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryResponseContentTests.cs similarity index 57% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryResponseContentTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryResponseContentTests.cs index 34c4ec4458..a1d810f183 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryResponseContentTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryResponseContentTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing HarEntryResponseContent @@ -96,6 +97,70 @@ public void EncodingTest() // TODO unit test for the property 'Encoding' } /// + /// Test the property 'VideoBufferedPercent' + /// + [Fact] + public void VideoBufferedPercentTest() + { + // TODO unit test for the property 'VideoBufferedPercent' + } + /// + /// Test the property 'VideoStallCount' + /// + [Fact] + public void VideoStallCountTest() + { + // TODO unit test for the property 'VideoStallCount' + } + /// + /// Test the property 'VideoDecodedByteCount' + /// + [Fact] + public void VideoDecodedByteCountTest() + { + // TODO unit test for the property 'VideoDecodedByteCount' + } + /// + /// Test the property 'VideoWaitingCount' + /// + [Fact] + public void VideoWaitingCountTest() + { + // TODO unit test for the property 'VideoWaitingCount' + } + /// + /// Test the property 'VideoErrorCount' + /// + [Fact] + public void VideoErrorCountTest() + { + // TODO unit test for the property 'VideoErrorCount' + } + /// + /// Test the property 'VideoDroppedFrames' + /// + [Fact] + public void VideoDroppedFramesTest() + { + // TODO unit test for the property 'VideoDroppedFrames' + } + /// + /// Test the property 'VideoTotalFrames' + /// + [Fact] + public void VideoTotalFramesTest() + { + // TODO unit test for the property 'VideoTotalFrames' + } + /// + /// Test the property 'VideoAudioBytesDecoded' + /// + [Fact] + public void VideoAudioBytesDecodedTest() + { + // TODO unit test for the property 'VideoAudioBytesDecoded' + } + /// /// Test the property 'Comment' /// [Fact] diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryResponseTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryResponseTests.cs similarity index 94% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryResponseTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryResponseTests.cs index aad2275745..bfda3da0b5 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryResponseTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryResponseTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing HarEntryResponse diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryTests.cs similarity index 94% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryTests.cs index 1ceed4678f..81f436c297 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing HarEntry diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryTimingsTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryTimingsTests.cs similarity index 94% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryTimingsTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryTimingsTests.cs index cbd9515ce3..7e5c826ec8 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarEntryTimingsTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarEntryTimingsTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing HarEntryTimings diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarLogCreatorTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarLogCreatorTests.cs similarity index 91% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarLogCreatorTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarLogCreatorTests.cs index 9ee7943055..52897d3b75 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarLogCreatorTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarLogCreatorTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing HarLogCreator diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarLogTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarLogTests.cs similarity index 93% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarLogTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarLogTests.cs index 7fb4c39177..953de64f39 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarLogTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarLogTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing HarLog diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarTests.cs similarity index 88% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarTests.cs index fd80d26047..e33682fee1 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HarTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HarTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing Har diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HeaderTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HeaderTests.cs similarity index 91% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HeaderTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HeaderTests.cs index b884759712..daf3a0d950 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/HeaderTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/HeaderTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing Header diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/LargestContentfulPaintTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/LargestContentfulPaintTests.cs similarity index 92% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/LargestContentfulPaintTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/LargestContentfulPaintTests.cs index 315fa2aa75..ac739d704b 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/LargestContentfulPaintTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/LargestContentfulPaintTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing LargestContentfulPaint diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/MatchCriteriaRequestHeaderTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/MatchCriteriaRequestHeaderTests.cs similarity index 91% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/MatchCriteriaRequestHeaderTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/MatchCriteriaRequestHeaderTests.cs index fda72413e2..b66d083018 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/MatchCriteriaRequestHeaderTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/MatchCriteriaRequestHeaderTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing MatchCriteriaRequestHeader @@ -56,20 +57,20 @@ public void MatchCriteriaRequestHeaderInstanceTest() /// - /// Test the property 'Value' + /// Test the property 'Name' /// [Fact] - public void ValueTest() + public void NameTest() { - // TODO unit test for the property 'Value' + // TODO unit test for the property 'Name' } /// - /// Test the property 'Name' + /// Test the property 'Value' /// [Fact] - public void NameTest() + public void ValueTest() { - // TODO unit test for the property 'Name' + // TODO unit test for the property 'Value' } } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/MatchCriteriaTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/MatchCriteriaTests.cs similarity index 95% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/MatchCriteriaTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/MatchCriteriaTests.cs index cd6162191e..7f7c7dc955 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/MatchCriteriaTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/MatchCriteriaTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing MatchCriteria diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/CounterTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/MetricTests.cs similarity index 68% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/CounterTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/MetricTests.cs index c6744a27e0..9dc722e0a4 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/CounterTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/MetricTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,29 +14,30 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// - /// Class for testing Counter + /// Class for testing Metric /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class CounterTests : IDisposable + public class MetricTests : IDisposable { - // TODO uncomment below to declare an instance variable for Counter - //private Counter instance; + // TODO uncomment below to declare an instance variable for Metric + //private Metric instance; - public CounterTests() + public MetricTests() { - // TODO uncomment below to create an instance of Counter - //instance = new Counter(); + // TODO uncomment below to create an instance of Metric + //instance = new Metric(); } public void Dispose() @@ -45,31 +46,31 @@ public void Dispose() } /// - /// Test an instance of Counter + /// Test an instance of Metric /// [Fact] - public void CounterInstanceTest() + public void MetricInstanceTest() { - // TODO uncomment below to test "IsType" Counter - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" Metric + //Assert.IsType(instance); } /// - /// Test the property 'Value' + /// Test the property 'Name' /// [Fact] - public void ValueTest() + public void NameTest() { - // TODO unit test for the property 'Value' + // TODO unit test for the property 'Name' } /// - /// Test the property 'Name' + /// Test the property 'Value' /// [Fact] - public void NameTest() + public void ValueTest() { - // TODO unit test for the property 'Name' + // TODO unit test for the property 'Value' } } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/NameValuePairTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/NameValuePairTests.cs similarity index 90% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/NameValuePairTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/NameValuePairTests.cs index b96f1b685c..0d2b16c5c9 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/NameValuePairTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/NameValuePairTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing NameValuePair @@ -56,20 +57,20 @@ public void NameValuePairInstanceTest() /// - /// Test the property 'Value' + /// Test the property 'Name' /// [Fact] - public void ValueTest() + public void NameTest() { - // TODO unit test for the property 'Value' + // TODO unit test for the property 'Name' } /// - /// Test the property 'Name' + /// Test the property 'Value' /// [Fact] - public void NameTest() + public void ValueTest() { - // TODO unit test for the property 'Name' + // TODO unit test for the property 'Value' } } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/PageTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/PageTests.cs similarity index 90% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/PageTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/PageTests.cs index c6047a68f8..b6a727a758 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/PageTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/PageTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing Page @@ -88,12 +89,12 @@ public void VerificationsTest() // TODO unit test for the property 'Verifications' } /// - /// Test the property 'Counters' + /// Test the property 'Metrics' /// [Fact] - public void CountersTest() + public void MetricsTest() { - // TODO unit test for the property 'Counters' + // TODO unit test for the property 'Metrics' } /// /// Test the property 'Errors' diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/PageTimingTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/PageTimingTests.cs similarity index 95% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/PageTimingTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/PageTimingTests.cs index 50a17f2fca..859b9157c2 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/PageTimingTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/PageTimingTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing PageTiming @@ -56,100 +57,100 @@ public void PageTimingInstanceTest() /// - /// Test the property 'FirstInputDelay' + /// Test the property 'OnContentLoad' /// [Fact] - public void FirstInputDelayTest() + public void OnContentLoadTest() { - // TODO unit test for the property 'FirstInputDelay' + // TODO unit test for the property 'OnContentLoad' } /// - /// Test the property 'DomInteractive' + /// Test the property 'OnLoad' /// [Fact] - public void DomInteractiveTest() + public void OnLoadTest() { - // TODO unit test for the property 'DomInteractive' + // TODO unit test for the property 'OnLoad' } /// - /// Test the property 'CumulativeLayoutShift' + /// Test the property 'FirstInputDelay' /// [Fact] - public void CumulativeLayoutShiftTest() + public void FirstInputDelayTest() { - // TODO unit test for the property 'CumulativeLayoutShift' + // TODO unit test for the property 'FirstInputDelay' } /// - /// Test the property 'Dns' + /// Test the property 'FirstPaint' /// [Fact] - public void DnsTest() + public void FirstPaintTest() { - // TODO unit test for the property 'Dns' + // TODO unit test for the property 'FirstPaint' } /// - /// Test the property 'Href' + /// Test the property 'CumulativeLayoutShift' /// [Fact] - public void HrefTest() + public void CumulativeLayoutShiftTest() { - // TODO unit test for the property 'Href' + // TODO unit test for the property 'CumulativeLayoutShift' } /// - /// Test the property 'FirstPaint' + /// Test the property 'LargestContentfulPaint' /// [Fact] - public void FirstPaintTest() + public void LargestContentfulPaintTest() { - // TODO unit test for the property 'FirstPaint' + // TODO unit test for the property 'LargestContentfulPaint' } /// - /// Test the property 'LargestContentfulPaint' + /// Test the property 'DomInteractive' /// [Fact] - public void LargestContentfulPaintTest() + public void DomInteractiveTest() { - // TODO unit test for the property 'LargestContentfulPaint' + // TODO unit test for the property 'DomInteractive' } /// - /// Test the property 'TimeToFirstByte' + /// Test the property 'FirstContentfulPaint' /// [Fact] - public void TimeToFirstByteTest() + public void FirstContentfulPaintTest() { - // TODO unit test for the property 'TimeToFirstByte' + // TODO unit test for the property 'FirstContentfulPaint' } /// - /// Test the property 'Ssl' + /// Test the property 'Dns' /// [Fact] - public void SslTest() + public void DnsTest() { - // TODO unit test for the property 'Ssl' + // TODO unit test for the property 'Dns' } /// - /// Test the property 'FirstContentfulPaint' + /// Test the property 'Ssl' /// [Fact] - public void FirstContentfulPaintTest() + public void SslTest() { - // TODO unit test for the property 'FirstContentfulPaint' + // TODO unit test for the property 'Ssl' } /// - /// Test the property 'OnLoad' + /// Test the property 'TimeToFirstByte' /// [Fact] - public void OnLoadTest() + public void TimeToFirstByteTest() { - // TODO unit test for the property 'OnLoad' + // TODO unit test for the property 'TimeToFirstByte' } /// - /// Test the property 'OnContentLoad' + /// Test the property 'Href' /// [Fact] - public void OnContentLoadTest() + public void HrefTest() { - // TODO unit test for the property 'OnContentLoad' + // TODO unit test for the property 'Href' } } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/PageTimingsTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/PageTimingsTests.cs similarity index 95% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/PageTimingsTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/PageTimingsTests.cs index 0dbb912e31..ee8f203c9d 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/PageTimingsTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/PageTimingsTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing PageTimings diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/VerifyResultTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/VerifyResultTests.cs similarity index 91% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/VerifyResultTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/VerifyResultTests.cs index b5be2bfbf7..2a72d308e4 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/VerifyResultTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/VerifyResultTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing VerifyResult @@ -56,12 +57,12 @@ public void VerifyResultInstanceTest() /// - /// Test the property 'Type' + /// Test the property 'Result' /// [Fact] - public void TypeTest() + public void ResultTest() { - // TODO unit test for the property 'Type' + // TODO unit test for the property 'Result' } /// /// Test the property 'Name' @@ -72,12 +73,12 @@ public void NameTest() // TODO unit test for the property 'Name' } /// - /// Test the property 'Result' + /// Test the property 'Type' /// [Fact] - public void ResultTest() + public void TypeTest() { - // TODO unit test for the property 'Result' + // TODO unit test for the property 'Type' } } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/WebSocketMessageTests.cs b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/WebSocketMessageTests.cs similarity index 92% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/WebSocketMessageTests.cs rename to clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/WebSocketMessageTests.cs index 9831c48a85..64f5a70329 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client.Test/Model/WebSocketMessageTests.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient.Test/Model/WebSocketMessageTests.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,12 +14,13 @@ using System.Linq; using System.IO; using System.Collections.Generic; -using BrowserUp.Mitmproxy.Client.Model; -using BrowserUp.Mitmproxy.Client.Client; +using BrowserUpMitmProxyClient.Api; +using BrowserUpMitmProxyClient.Model; +using BrowserUpMitmProxyClient.Client; using System.Reflection; using Newtonsoft.Json; -namespace BrowserUp.Mitmproxy.Client.Test.Model +namespace BrowserUpMitmProxyClient.Test.Model { /// /// Class for testing WebSocketMessage diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Api/BrowserUpProxyApi.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Api/BrowserUpProxyApi.cs similarity index 69% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Api/BrowserUpProxyApi.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Api/BrowserUpProxyApi.cs index 3dfaff8495..44aa4f2371 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Api/BrowserUpProxyApi.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Api/BrowserUpProxyApi.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -14,10 +14,10 @@ using System.Linq; using System.Net; using System.Net.Mime; -using BrowserUp.Mitmproxy.Client.Client; -using BrowserUp.Mitmproxy.Client.Model; +using BrowserUpMitmProxyClient.Client; +using BrowserUpMitmProxyClient.Model; -namespace BrowserUp.Mitmproxy.Client.Api +namespace BrowserUpMitmProxyClient.Api { /// @@ -30,55 +30,55 @@ public interface IBrowserUpProxyApiSync : IApiAccessor /// /// /// - /// Add Custom Counter to the captured traffic har + /// Add Custom Error to the captured traffic har /// - /// Thrown when fails to make API call - /// Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key + /// Thrown when fails to make API call + /// Receives an error to track. Internally, the error is stored in an array in the har under the _errors key /// Index associated with the operation. /// - void AddCounter(Counter counter, int operationIndex = 0); + void AddError(Error error, int operationIndex = 0); /// /// /// /// - /// Add Custom Counter to the captured traffic har + /// Add Custom Error to the captured traffic har /// - /// Thrown when fails to make API call - /// Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key + /// Thrown when fails to make API call + /// Receives an error to track. Internally, the error is stored in an array in the har under the _errors key /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse AddCounterWithHttpInfo(Counter counter, int operationIndex = 0); + ApiResponse AddErrorWithHttpInfo(Error error, int operationIndex = 0); /// /// /// /// - /// Add Custom Error to the captured traffic har + /// Add Custom Metric to the captured traffic har /// - /// Thrown when fails to make API call - /// Receives an error to track. Internally, the error is stored in an array in the har under the _errors key + /// Thrown when fails to make API call + /// Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key /// Index associated with the operation. /// - void AddError(Error error, int operationIndex = 0); + void AddMetric(Metric metric, int operationIndex = 0); /// /// /// /// - /// Add Custom Error to the captured traffic har + /// Add Custom Metric to the captured traffic har /// - /// Thrown when fails to make API call - /// Receives an error to track. Internally, the error is stored in an array in the har under the _errors key + /// Thrown when fails to make API call + /// Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse AddErrorWithHttpInfo(Error error, int operationIndex = 0); + ApiResponse AddMetricWithHttpInfo(Metric metric, int operationIndex = 0); /// /// /// /// /// Get the current HAR. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// Har Har GetHarLog(int operationIndex = 0); @@ -89,7 +89,7 @@ public interface IBrowserUpProxyApiSync : IApiAccessor /// /// Get the current HAR. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// ApiResponse of Har ApiResponse GetHarLogWithHttpInfo(int operationIndex = 0); @@ -99,7 +99,7 @@ public interface IBrowserUpProxyApiSync : IApiAccessor /// /// Get the healthcheck /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// void Healthcheck(int operationIndex = 0); @@ -110,7 +110,7 @@ public interface IBrowserUpProxyApiSync : IApiAccessor /// /// Get the healthcheck /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// ApiResponse of Object(void) ApiResponse HealthcheckWithHttpInfo(int operationIndex = 0); @@ -120,7 +120,7 @@ public interface IBrowserUpProxyApiSync : IApiAccessor /// /// Starts a fresh HAR Page (Step) in the current active HAR to group requests. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique title for this har page/step. /// Index associated with the operation. /// Har @@ -132,7 +132,7 @@ public interface IBrowserUpProxyApiSync : IApiAccessor /// /// Starts a fresh HAR Page (Step) in the current active HAR to group requests. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique title for this har page/step. /// Index associated with the operation. /// ApiResponse of Har @@ -143,7 +143,7 @@ public interface IBrowserUpProxyApiSync : IApiAccessor /// /// Starts a fresh HAR capture session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// Har Har ResetHarLog(int operationIndex = 0); @@ -154,7 +154,7 @@ public interface IBrowserUpProxyApiSync : IApiAccessor /// /// Starts a fresh HAR capture session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// ApiResponse of Har ApiResponse ResetHarLogWithHttpInfo(int operationIndex = 0); @@ -164,7 +164,7 @@ public interface IBrowserUpProxyApiSync : IApiAccessor /// /// Verify no matching items are present in the captured traffic /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. @@ -177,7 +177,7 @@ public interface IBrowserUpProxyApiSync : IApiAccessor /// /// Verify no matching items are present in the captured traffic /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. @@ -189,7 +189,7 @@ public interface IBrowserUpProxyApiSync : IApiAccessor /// /// Verify at least one matching item is present in the captured traffic /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. @@ -202,7 +202,7 @@ public interface IBrowserUpProxyApiSync : IApiAccessor /// /// Verify at least one matching item is present in the captured traffic /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. @@ -214,7 +214,7 @@ public interface IBrowserUpProxyApiSync : IApiAccessor /// /// Verify each traffic item matching the criteria meets is below SLA time /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The time used for comparison /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests @@ -228,7 +228,7 @@ public interface IBrowserUpProxyApiSync : IApiAccessor /// /// Verify each traffic item matching the criteria meets is below SLA time /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The time used for comparison /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests @@ -241,7 +241,7 @@ public interface IBrowserUpProxyApiSync : IApiAccessor /// /// Verify matching items in the captured traffic meet the size criteria /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The size used for comparison, in kilobytes /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests @@ -255,7 +255,7 @@ public interface IBrowserUpProxyApiSync : IApiAccessor /// /// Verify matching items in the captured traffic meet the size criteria /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The size used for comparison, in kilobytes /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests @@ -275,59 +275,59 @@ public interface IBrowserUpProxyApiAsync : IApiAccessor /// /// /// - /// Add Custom Counter to the captured traffic har + /// Add Custom Error to the captured traffic har /// - /// Thrown when fails to make API call - /// Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key + /// Thrown when fails to make API call + /// Receives an error to track. Internally, the error is stored in an array in the har under the _errors key /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task AddCounterAsync(Counter counter, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AddErrorAsync(Error error, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// /// - /// Add Custom Counter to the captured traffic har + /// Add Custom Error to the captured traffic har /// - /// Thrown when fails to make API call - /// Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key + /// Thrown when fails to make API call + /// Receives an error to track. Internally, the error is stored in an array in the har under the _errors key /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> AddCounterWithHttpInfoAsync(Counter counter, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AddErrorWithHttpInfoAsync(Error error, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// /// - /// Add Custom Error to the captured traffic har + /// Add Custom Metric to the captured traffic har /// - /// Thrown when fails to make API call - /// Receives an error to track. Internally, the error is stored in an array in the har under the _errors key + /// Thrown when fails to make API call + /// Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task AddErrorAsync(Error error, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task AddMetricAsync(Metric metric, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// /// - /// Add Custom Error to the captured traffic har + /// Add Custom Metric to the captured traffic har /// - /// Thrown when fails to make API call - /// Receives an error to track. Internally, the error is stored in an array in the har under the _errors key + /// Thrown when fails to make API call + /// Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> AddErrorWithHttpInfoAsync(Error error, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> AddMetricWithHttpInfoAsync(Metric metric, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// /// /// Get the current HAR. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Har @@ -339,7 +339,7 @@ public interface IBrowserUpProxyApiAsync : IApiAccessor /// /// Get the current HAR. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Har) @@ -350,7 +350,7 @@ public interface IBrowserUpProxyApiAsync : IApiAccessor /// /// Get the healthcheck /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void @@ -362,7 +362,7 @@ public interface IBrowserUpProxyApiAsync : IApiAccessor /// /// Get the healthcheck /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse @@ -373,7 +373,7 @@ public interface IBrowserUpProxyApiAsync : IApiAccessor /// /// Starts a fresh HAR Page (Step) in the current active HAR to group requests. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique title for this har page/step. /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -386,7 +386,7 @@ public interface IBrowserUpProxyApiAsync : IApiAccessor /// /// Starts a fresh HAR Page (Step) in the current active HAR to group requests. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique title for this har page/step. /// Index associated with the operation. /// Cancellation Token to cancel the request. @@ -398,7 +398,7 @@ public interface IBrowserUpProxyApiAsync : IApiAccessor /// /// Starts a fresh HAR capture session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Har @@ -410,7 +410,7 @@ public interface IBrowserUpProxyApiAsync : IApiAccessor /// /// Starts a fresh HAR capture session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Har) @@ -421,7 +421,7 @@ public interface IBrowserUpProxyApiAsync : IApiAccessor /// /// Verify no matching items are present in the captured traffic /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. @@ -435,7 +435,7 @@ public interface IBrowserUpProxyApiAsync : IApiAccessor /// /// Verify no matching items are present in the captured traffic /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. @@ -448,7 +448,7 @@ public interface IBrowserUpProxyApiAsync : IApiAccessor /// /// Verify at least one matching item is present in the captured traffic /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. @@ -462,7 +462,7 @@ public interface IBrowserUpProxyApiAsync : IApiAccessor /// /// Verify at least one matching item is present in the captured traffic /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. @@ -475,7 +475,7 @@ public interface IBrowserUpProxyApiAsync : IApiAccessor /// /// Verify each traffic item matching the criteria meets is below SLA time /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The time used for comparison /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests @@ -490,7 +490,7 @@ public interface IBrowserUpProxyApiAsync : IApiAccessor /// /// Verify each traffic item matching the criteria meets is below SLA time /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The time used for comparison /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests @@ -504,7 +504,7 @@ public interface IBrowserUpProxyApiAsync : IApiAccessor /// /// Verify matching items in the captured traffic meet the size criteria /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The size used for comparison, in kilobytes /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests @@ -519,7 +519,7 @@ public interface IBrowserUpProxyApiAsync : IApiAccessor /// /// Verify matching items in the captured traffic meet the size criteria /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The size used for comparison, in kilobytes /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests @@ -543,7 +543,7 @@ public interface IBrowserUpProxyApi : IBrowserUpProxyApiSync, IBrowserUpProxyApi /// public partial class BrowserUpProxyApi : IBrowserUpProxyApi { - private BrowserUp.Mitmproxy.Client.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + private BrowserUpMitmProxyClient.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. @@ -559,13 +559,13 @@ public BrowserUpProxyApi() : this((string)null) /// public BrowserUpProxyApi(string basePath) { - this.Configuration = BrowserUp.Mitmproxy.Client.Client.Configuration.MergeConfigurations( - BrowserUp.Mitmproxy.Client.Client.GlobalConfiguration.Instance, - new BrowserUp.Mitmproxy.Client.Client.Configuration { BasePath = basePath } + this.Configuration = BrowserUpMitmProxyClient.Client.Configuration.MergeConfigurations( + BrowserUpMitmProxyClient.Client.GlobalConfiguration.Instance, + new BrowserUpMitmProxyClient.Client.Configuration { BasePath = basePath } ); - this.Client = new BrowserUp.Mitmproxy.Client.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new BrowserUp.Mitmproxy.Client.Client.ApiClient(this.Configuration.BasePath); - this.ExceptionFactory = BrowserUp.Mitmproxy.Client.Client.Configuration.DefaultExceptionFactory; + this.Client = new BrowserUpMitmProxyClient.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new BrowserUpMitmProxyClient.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = BrowserUpMitmProxyClient.Client.Configuration.DefaultExceptionFactory; } /// @@ -574,17 +574,17 @@ public BrowserUpProxyApi(string basePath) /// /// An instance of Configuration /// - public BrowserUpProxyApi(BrowserUp.Mitmproxy.Client.Client.Configuration configuration) + public BrowserUpProxyApi(BrowserUpMitmProxyClient.Client.Configuration configuration) { if (configuration == null) throw new ArgumentNullException("configuration"); - this.Configuration = BrowserUp.Mitmproxy.Client.Client.Configuration.MergeConfigurations( - BrowserUp.Mitmproxy.Client.Client.GlobalConfiguration.Instance, + this.Configuration = BrowserUpMitmProxyClient.Client.Configuration.MergeConfigurations( + BrowserUpMitmProxyClient.Client.GlobalConfiguration.Instance, configuration ); - this.Client = new BrowserUp.Mitmproxy.Client.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new BrowserUp.Mitmproxy.Client.Client.ApiClient(this.Configuration.BasePath); - ExceptionFactory = BrowserUp.Mitmproxy.Client.Client.Configuration.DefaultExceptionFactory; + this.Client = new BrowserUpMitmProxyClient.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new BrowserUpMitmProxyClient.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = BrowserUpMitmProxyClient.Client.Configuration.DefaultExceptionFactory; } /// @@ -594,7 +594,7 @@ public BrowserUpProxyApi(BrowserUp.Mitmproxy.Client.Client.Configuration configu /// The client interface for synchronous API access. /// The client interface for asynchronous API access. /// The configuration object. - public BrowserUpProxyApi(BrowserUp.Mitmproxy.Client.Client.ISynchronousClient client, BrowserUp.Mitmproxy.Client.Client.IAsynchronousClient asyncClient, BrowserUp.Mitmproxy.Client.Client.IReadableConfiguration configuration) + public BrowserUpProxyApi(BrowserUpMitmProxyClient.Client.ISynchronousClient client, BrowserUpMitmProxyClient.Client.IAsynchronousClient asyncClient, BrowserUpMitmProxyClient.Client.IReadableConfiguration configuration) { if (client == null) throw new ArgumentNullException("client"); if (asyncClient == null) throw new ArgumentNullException("asyncClient"); @@ -603,18 +603,18 @@ public BrowserUpProxyApi(BrowserUp.Mitmproxy.Client.Client.ISynchronousClient cl this.Client = client; this.AsynchronousClient = asyncClient; this.Configuration = configuration; - this.ExceptionFactory = BrowserUp.Mitmproxy.Client.Client.Configuration.DefaultExceptionFactory; + this.ExceptionFactory = BrowserUpMitmProxyClient.Client.Configuration.DefaultExceptionFactory; } /// /// The client for accessing this underlying API asynchronously. /// - public BrowserUp.Mitmproxy.Client.Client.IAsynchronousClient AsynchronousClient { get; set; } + public BrowserUpMitmProxyClient.Client.IAsynchronousClient AsynchronousClient { get; set; } /// /// The client for accessing this underlying API synchronously. /// - public BrowserUp.Mitmproxy.Client.Client.ISynchronousClient Client { get; set; } + public BrowserUpMitmProxyClient.Client.ISynchronousClient Client { get; set; } /// /// Gets the base path of the API client. @@ -629,12 +629,12 @@ public string GetBasePath() /// Gets or sets the configuration object /// /// An instance of the Configuration - public BrowserUp.Mitmproxy.Client.Client.IReadableConfiguration Configuration { get; set; } + public BrowserUpMitmProxyClient.Client.IReadableConfiguration Configuration { get; set; } /// /// Provides a factory method hook for the creation of exceptions. /// - public BrowserUp.Mitmproxy.Client.Client.ExceptionFactory ExceptionFactory + public BrowserUpMitmProxyClient.Client.ExceptionFactory ExceptionFactory { get { @@ -648,33 +648,33 @@ public BrowserUp.Mitmproxy.Client.Client.ExceptionFactory ExceptionFactory } /// - /// Add Custom Counter to the captured traffic har + /// Add Custom Error to the captured traffic har /// - /// Thrown when fails to make API call - /// Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key + /// Thrown when fails to make API call + /// Receives an error to track. Internally, the error is stored in an array in the har under the _errors key /// Index associated with the operation. /// - public void AddCounter(Counter counter, int operationIndex = 0) + public void AddError(Error error, int operationIndex = 0) { - AddCounterWithHttpInfo(counter); + AddErrorWithHttpInfo(error); } /// - /// Add Custom Counter to the captured traffic har + /// Add Custom Error to the captured traffic har /// - /// Thrown when fails to make API call - /// Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key + /// Thrown when fails to make API call + /// Receives an error to track. Internally, the error is stored in an array in the har under the _errors key /// Index associated with the operation. /// ApiResponse of Object(void) - public BrowserUp.Mitmproxy.Client.Client.ApiResponse AddCounterWithHttpInfo(Counter counter, int operationIndex = 0) + public BrowserUpMitmProxyClient.Client.ApiResponse AddErrorWithHttpInfo(Error error, int operationIndex = 0) { - // verify the required parameter 'counter' is set - if (counter == null) + // verify the required parameter 'error' is set + if (error == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'counter' when calling BrowserUpProxyApi->AddCounter"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'error' when calling BrowserUpProxyApi->AddError"); } - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { "application/json" @@ -684,29 +684,29 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse AddCounterWithHttpI string[] _accepts = new string[] { }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = counter; + localVarRequestOptions.Data = error; - localVarRequestOptions.Operation = "BrowserUpProxyApi.AddCounter"; + localVarRequestOptions.Operation = "BrowserUpProxyApi.AddError"; localVarRequestOptions.OperationIndex = operationIndex; // make the HTTP request - var localVarResponse = this.Client.Post("/har/counters", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/har/errors", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("AddCounter", localVarResponse); + Exception _exception = this.ExceptionFactory("AddError", localVarResponse); if (_exception != null) { throw _exception; @@ -717,36 +717,36 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse AddCounterWithHttpI } /// - /// Add Custom Counter to the captured traffic har + /// Add Custom Error to the captured traffic har /// - /// Thrown when fails to make API call - /// Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key + /// Thrown when fails to make API call + /// Receives an error to track. Internally, the error is stored in an array in the har under the _errors key /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task AddCounterAsync(Counter counter, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AddErrorAsync(Error error, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await AddCounterWithHttpInfoAsync(counter, operationIndex, cancellationToken).ConfigureAwait(false); + await AddErrorWithHttpInfoAsync(error, operationIndex, cancellationToken).ConfigureAwait(false); } /// - /// Add Custom Counter to the captured traffic har + /// Add Custom Error to the captured traffic har /// - /// Thrown when fails to make API call - /// Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key + /// Thrown when fails to make API call + /// Receives an error to track. Internally, the error is stored in an array in the har under the _errors key /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> AddCounterWithHttpInfoAsync(Counter counter, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AddErrorWithHttpInfoAsync(Error error, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // verify the required parameter 'counter' is set - if (counter == null) + // verify the required parameter 'error' is set + if (error == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'counter' when calling BrowserUpProxyApi->AddCounter"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'error' when calling BrowserUpProxyApi->AddError"); } - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { "application/json" @@ -756,30 +756,30 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse AddCounterWithHttpI string[] _accepts = new string[] { }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = counter; + localVarRequestOptions.Data = error; - localVarRequestOptions.Operation = "BrowserUpProxyApi.AddCounter"; + localVarRequestOptions.Operation = "BrowserUpProxyApi.AddError"; localVarRequestOptions.OperationIndex = operationIndex; // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/har/counters", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/har/errors", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("AddCounter", localVarResponse); + Exception _exception = this.ExceptionFactory("AddError", localVarResponse); if (_exception != null) { throw _exception; @@ -790,33 +790,33 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse AddCounterWithHttpI } /// - /// Add Custom Error to the captured traffic har + /// Add Custom Metric to the captured traffic har /// - /// Thrown when fails to make API call - /// Receives an error to track. Internally, the error is stored in an array in the har under the _errors key + /// Thrown when fails to make API call + /// Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key /// Index associated with the operation. /// - public void AddError(Error error, int operationIndex = 0) + public void AddMetric(Metric metric, int operationIndex = 0) { - AddErrorWithHttpInfo(error); + AddMetricWithHttpInfo(metric); } /// - /// Add Custom Error to the captured traffic har + /// Add Custom Metric to the captured traffic har /// - /// Thrown when fails to make API call - /// Receives an error to track. Internally, the error is stored in an array in the har under the _errors key + /// Thrown when fails to make API call + /// Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key /// Index associated with the operation. /// ApiResponse of Object(void) - public BrowserUp.Mitmproxy.Client.Client.ApiResponse AddErrorWithHttpInfo(Error error, int operationIndex = 0) + public BrowserUpMitmProxyClient.Client.ApiResponse AddMetricWithHttpInfo(Metric metric, int operationIndex = 0) { - // verify the required parameter 'error' is set - if (error == null) + // verify the required parameter 'metric' is set + if (metric == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'error' when calling BrowserUpProxyApi->AddError"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'metric' when calling BrowserUpProxyApi->AddMetric"); } - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { "application/json" @@ -826,29 +826,29 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse AddErrorWithHttpInf string[] _accepts = new string[] { }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = error; + localVarRequestOptions.Data = metric; - localVarRequestOptions.Operation = "BrowserUpProxyApi.AddError"; + localVarRequestOptions.Operation = "BrowserUpProxyApi.AddMetric"; localVarRequestOptions.OperationIndex = operationIndex; // make the HTTP request - var localVarResponse = this.Client.Post("/har/errors", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/har/metrics", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("AddError", localVarResponse); + Exception _exception = this.ExceptionFactory("AddMetric", localVarResponse); if (_exception != null) { throw _exception; @@ -859,36 +859,36 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse AddErrorWithHttpInf } /// - /// Add Custom Error to the captured traffic har + /// Add Custom Metric to the captured traffic har /// - /// Thrown when fails to make API call - /// Receives an error to track. Internally, the error is stored in an array in the har under the _errors key + /// Thrown when fails to make API call + /// Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task AddErrorAsync(Error error, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task AddMetricAsync(Metric metric, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await AddErrorWithHttpInfoAsync(error, operationIndex, cancellationToken).ConfigureAwait(false); + await AddMetricWithHttpInfoAsync(metric, operationIndex, cancellationToken).ConfigureAwait(false); } /// - /// Add Custom Error to the captured traffic har + /// Add Custom Metric to the captured traffic har /// - /// Thrown when fails to make API call - /// Receives an error to track. Internally, the error is stored in an array in the har under the _errors key + /// Thrown when fails to make API call + /// Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> AddErrorWithHttpInfoAsync(Error error, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AddMetricWithHttpInfoAsync(Metric metric, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // verify the required parameter 'error' is set - if (error == null) + // verify the required parameter 'metric' is set + if (metric == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'error' when calling BrowserUpProxyApi->AddError"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'metric' when calling BrowserUpProxyApi->AddMetric"); } - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { "application/json" @@ -898,30 +898,30 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse AddErrorWithHttpInf string[] _accepts = new string[] { }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = error; + localVarRequestOptions.Data = metric; - localVarRequestOptions.Operation = "BrowserUpProxyApi.AddError"; + localVarRequestOptions.Operation = "BrowserUpProxyApi.AddMetric"; localVarRequestOptions.OperationIndex = operationIndex; // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/har/errors", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/har/metrics", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("AddError", localVarResponse); + Exception _exception = this.ExceptionFactory("AddMetric", localVarResponse); if (_exception != null) { throw _exception; @@ -934,24 +934,24 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse AddErrorWithHttpInf /// /// Get the current HAR. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// Har public Har GetHarLog(int operationIndex = 0) { - BrowserUp.Mitmproxy.Client.Client.ApiResponse localVarResponse = GetHarLogWithHttpInfo(); + BrowserUpMitmProxyClient.Client.ApiResponse localVarResponse = GetHarLogWithHttpInfo(); return localVarResponse.Data; } /// /// Get the current HAR. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// ApiResponse of Har - public BrowserUp.Mitmproxy.Client.Client.ApiResponse GetHarLogWithHttpInfo(int operationIndex = 0) + public BrowserUpMitmProxyClient.Client.ApiResponse GetHarLogWithHttpInfo(int operationIndex = 0) { - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { }; @@ -961,13 +961,13 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse GetHarLogWithHttpInfo( "application/json" }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); @@ -995,27 +995,27 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse GetHarLogWithHttpInfo( /// /// Get the current HAR. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Har public async System.Threading.Tasks.Task GetHarLogAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - BrowserUp.Mitmproxy.Client.Client.ApiResponse localVarResponse = await GetHarLogWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + BrowserUpMitmProxyClient.Client.ApiResponse localVarResponse = await GetHarLogWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// Get the current HAR. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Har) - public async System.Threading.Tasks.Task> GetHarLogWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetHarLogWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { }; @@ -1025,13 +1025,13 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse GetHarLogWithHttpInfo( "application/json" }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); @@ -1060,7 +1060,7 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse GetHarLogWithHttpInfo( /// /// Get the healthcheck /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// public void Healthcheck(int operationIndex = 0) @@ -1071,12 +1071,12 @@ public void Healthcheck(int operationIndex = 0) /// /// Get the healthcheck /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// ApiResponse of Object(void) - public BrowserUp.Mitmproxy.Client.Client.ApiResponse HealthcheckWithHttpInfo(int operationIndex = 0) + public BrowserUpMitmProxyClient.Client.ApiResponse HealthcheckWithHttpInfo(int operationIndex = 0) { - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { }; @@ -1085,13 +1085,13 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse HealthcheckWithHttp string[] _accepts = new string[] { }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); @@ -1119,7 +1119,7 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse HealthcheckWithHttp /// /// Get the healthcheck /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void @@ -1131,14 +1131,14 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse HealthcheckWithHttp /// /// Get the healthcheck /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> HealthcheckWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> HealthcheckWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { }; @@ -1147,13 +1147,13 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse HealthcheckWithHttp string[] _accepts = new string[] { }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); @@ -1182,32 +1182,32 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse HealthcheckWithHttp /// /// Starts a fresh HAR Page (Step) in the current active HAR to group requests. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique title for this har page/step. /// Index associated with the operation. /// Har public Har NewPage(string title, int operationIndex = 0) { - BrowserUp.Mitmproxy.Client.Client.ApiResponse localVarResponse = NewPageWithHttpInfo(title); + BrowserUpMitmProxyClient.Client.ApiResponse localVarResponse = NewPageWithHttpInfo(title); return localVarResponse.Data; } /// /// Starts a fresh HAR Page (Step) in the current active HAR to group requests. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique title for this har page/step. /// Index associated with the operation. /// ApiResponse of Har - public BrowserUp.Mitmproxy.Client.Client.ApiResponse NewPageWithHttpInfo(string title, int operationIndex = 0) + public BrowserUpMitmProxyClient.Client.ApiResponse NewPageWithHttpInfo(string title, int operationIndex = 0) { // verify the required parameter 'title' is set if (title == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'title' when calling BrowserUpProxyApi->NewPage"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'title' when calling BrowserUpProxyApi->NewPage"); } - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { }; @@ -1217,19 +1217,19 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse NewPageWithHttpInfo(st "application/json" }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("title", BrowserUp.Mitmproxy.Client.Client.ClientUtils.ParameterToString(title)); // path parameter + localVarRequestOptions.PathParameters.Add("title", BrowserUpMitmProxyClient.Client.ClientUtils.ParameterToString(title)); // path parameter localVarRequestOptions.Operation = "BrowserUpProxyApi.NewPage"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1252,35 +1252,35 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse NewPageWithHttpInfo(st /// /// Starts a fresh HAR Page (Step) in the current active HAR to group requests. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique title for this har page/step. /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Har public async System.Threading.Tasks.Task NewPageAsync(string title, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - BrowserUp.Mitmproxy.Client.Client.ApiResponse localVarResponse = await NewPageWithHttpInfoAsync(title, operationIndex, cancellationToken).ConfigureAwait(false); + BrowserUpMitmProxyClient.Client.ApiResponse localVarResponse = await NewPageWithHttpInfoAsync(title, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// Starts a fresh HAR Page (Step) in the current active HAR to group requests. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique title for this har page/step. /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Har) - public async System.Threading.Tasks.Task> NewPageWithHttpInfoAsync(string title, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> NewPageWithHttpInfoAsync(string title, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'title' is set if (title == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'title' when calling BrowserUpProxyApi->NewPage"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'title' when calling BrowserUpProxyApi->NewPage"); } - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { }; @@ -1290,19 +1290,19 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse NewPageWithHttpInfo(st "application/json" }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("title", BrowserUp.Mitmproxy.Client.Client.ClientUtils.ParameterToString(title)); // path parameter + localVarRequestOptions.PathParameters.Add("title", BrowserUpMitmProxyClient.Client.ClientUtils.ParameterToString(title)); // path parameter localVarRequestOptions.Operation = "BrowserUpProxyApi.NewPage"; localVarRequestOptions.OperationIndex = operationIndex; @@ -1326,24 +1326,24 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse NewPageWithHttpInfo(st /// /// Starts a fresh HAR capture session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// Har public Har ResetHarLog(int operationIndex = 0) { - BrowserUp.Mitmproxy.Client.Client.ApiResponse localVarResponse = ResetHarLogWithHttpInfo(); + BrowserUpMitmProxyClient.Client.ApiResponse localVarResponse = ResetHarLogWithHttpInfo(); return localVarResponse.Data; } /// /// Starts a fresh HAR capture session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// ApiResponse of Har - public BrowserUp.Mitmproxy.Client.Client.ApiResponse ResetHarLogWithHttpInfo(int operationIndex = 0) + public BrowserUpMitmProxyClient.Client.ApiResponse ResetHarLogWithHttpInfo(int operationIndex = 0) { - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { }; @@ -1353,13 +1353,13 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse ResetHarLogWithHttpInf "application/json" }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); @@ -1387,27 +1387,27 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse ResetHarLogWithHttpInf /// /// Starts a fresh HAR capture session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Har public async System.Threading.Tasks.Task ResetHarLogAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - BrowserUp.Mitmproxy.Client.Client.ApiResponse localVarResponse = await ResetHarLogWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + BrowserUpMitmProxyClient.Client.ApiResponse localVarResponse = await ResetHarLogWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// Starts a fresh HAR capture session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Har) - public async System.Threading.Tasks.Task> ResetHarLogWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ResetHarLogWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { }; @@ -1417,13 +1417,13 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse ResetHarLogWithHttpInf "application/json" }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); @@ -1452,40 +1452,40 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse ResetHarLogWithHttpInf /// /// Verify no matching items are present in the captured traffic /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. /// VerifyResult public VerifyResult VerifyNotPresent(string name, MatchCriteria matchCriteria, int operationIndex = 0) { - BrowserUp.Mitmproxy.Client.Client.ApiResponse localVarResponse = VerifyNotPresentWithHttpInfo(name, matchCriteria); + BrowserUpMitmProxyClient.Client.ApiResponse localVarResponse = VerifyNotPresentWithHttpInfo(name, matchCriteria); return localVarResponse.Data; } /// /// Verify no matching items are present in the captured traffic /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. /// ApiResponse of VerifyResult - public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifyNotPresentWithHttpInfo(string name, MatchCriteria matchCriteria, int operationIndex = 0) + public BrowserUpMitmProxyClient.Client.ApiResponse VerifyNotPresentWithHttpInfo(string name, MatchCriteria matchCriteria, int operationIndex = 0) { // verify the required parameter 'name' is set if (name == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'name' when calling BrowserUpProxyApi->VerifyNotPresent"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'name' when calling BrowserUpProxyApi->VerifyNotPresent"); } // verify the required parameter 'matchCriteria' is set if (matchCriteria == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'matchCriteria' when calling BrowserUpProxyApi->VerifyNotPresent"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'matchCriteria' when calling BrowserUpProxyApi->VerifyNotPresent"); } - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { "application/json" @@ -1496,19 +1496,19 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifyNotPres "application/json" }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("name", BrowserUp.Mitmproxy.Client.Client.ClientUtils.ParameterToString(name)); // path parameter + localVarRequestOptions.PathParameters.Add("name", BrowserUpMitmProxyClient.Client.ClientUtils.ParameterToString(name)); // path parameter localVarRequestOptions.Data = matchCriteria; localVarRequestOptions.Operation = "BrowserUpProxyApi.VerifyNotPresent"; @@ -1532,7 +1532,7 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifyNotPres /// /// Verify no matching items are present in the captured traffic /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. @@ -1540,35 +1540,35 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifyNotPres /// Task of VerifyResult public async System.Threading.Tasks.Task VerifyNotPresentAsync(string name, MatchCriteria matchCriteria, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - BrowserUp.Mitmproxy.Client.Client.ApiResponse localVarResponse = await VerifyNotPresentWithHttpInfoAsync(name, matchCriteria, operationIndex, cancellationToken).ConfigureAwait(false); + BrowserUpMitmProxyClient.Client.ApiResponse localVarResponse = await VerifyNotPresentWithHttpInfoAsync(name, matchCriteria, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// Verify no matching items are present in the captured traffic /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (VerifyResult) - public async System.Threading.Tasks.Task> VerifyNotPresentWithHttpInfoAsync(string name, MatchCriteria matchCriteria, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> VerifyNotPresentWithHttpInfoAsync(string name, MatchCriteria matchCriteria, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'name' is set if (name == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'name' when calling BrowserUpProxyApi->VerifyNotPresent"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'name' when calling BrowserUpProxyApi->VerifyNotPresent"); } // verify the required parameter 'matchCriteria' is set if (matchCriteria == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'matchCriteria' when calling BrowserUpProxyApi->VerifyNotPresent"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'matchCriteria' when calling BrowserUpProxyApi->VerifyNotPresent"); } - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { "application/json" @@ -1579,19 +1579,19 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifyNotPres "application/json" }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("name", BrowserUp.Mitmproxy.Client.Client.ClientUtils.ParameterToString(name)); // path parameter + localVarRequestOptions.PathParameters.Add("name", BrowserUpMitmProxyClient.Client.ClientUtils.ParameterToString(name)); // path parameter localVarRequestOptions.Data = matchCriteria; localVarRequestOptions.Operation = "BrowserUpProxyApi.VerifyNotPresent"; @@ -1616,40 +1616,40 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifyNotPres /// /// Verify at least one matching item is present in the captured traffic /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. /// VerifyResult public VerifyResult VerifyPresent(string name, MatchCriteria matchCriteria, int operationIndex = 0) { - BrowserUp.Mitmproxy.Client.Client.ApiResponse localVarResponse = VerifyPresentWithHttpInfo(name, matchCriteria); + BrowserUpMitmProxyClient.Client.ApiResponse localVarResponse = VerifyPresentWithHttpInfo(name, matchCriteria); return localVarResponse.Data; } /// /// Verify at least one matching item is present in the captured traffic /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. /// ApiResponse of VerifyResult - public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifyPresentWithHttpInfo(string name, MatchCriteria matchCriteria, int operationIndex = 0) + public BrowserUpMitmProxyClient.Client.ApiResponse VerifyPresentWithHttpInfo(string name, MatchCriteria matchCriteria, int operationIndex = 0) { // verify the required parameter 'name' is set if (name == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'name' when calling BrowserUpProxyApi->VerifyPresent"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'name' when calling BrowserUpProxyApi->VerifyPresent"); } // verify the required parameter 'matchCriteria' is set if (matchCriteria == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'matchCriteria' when calling BrowserUpProxyApi->VerifyPresent"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'matchCriteria' when calling BrowserUpProxyApi->VerifyPresent"); } - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { "application/json" @@ -1660,19 +1660,19 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifyPresent "application/json" }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("name", BrowserUp.Mitmproxy.Client.Client.ClientUtils.ParameterToString(name)); // path parameter + localVarRequestOptions.PathParameters.Add("name", BrowserUpMitmProxyClient.Client.ClientUtils.ParameterToString(name)); // path parameter localVarRequestOptions.Data = matchCriteria; localVarRequestOptions.Operation = "BrowserUpProxyApi.VerifyPresent"; @@ -1696,7 +1696,7 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifyPresent /// /// Verify at least one matching item is present in the captured traffic /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. @@ -1704,35 +1704,35 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifyPresent /// Task of VerifyResult public async System.Threading.Tasks.Task VerifyPresentAsync(string name, MatchCriteria matchCriteria, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - BrowserUp.Mitmproxy.Client.Client.ApiResponse localVarResponse = await VerifyPresentWithHttpInfoAsync(name, matchCriteria, operationIndex, cancellationToken).ConfigureAwait(false); + BrowserUpMitmProxyClient.Client.ApiResponse localVarResponse = await VerifyPresentWithHttpInfoAsync(name, matchCriteria, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// Verify at least one matching item is present in the captured traffic /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (VerifyResult) - public async System.Threading.Tasks.Task> VerifyPresentWithHttpInfoAsync(string name, MatchCriteria matchCriteria, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> VerifyPresentWithHttpInfoAsync(string name, MatchCriteria matchCriteria, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'name' is set if (name == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'name' when calling BrowserUpProxyApi->VerifyPresent"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'name' when calling BrowserUpProxyApi->VerifyPresent"); } // verify the required parameter 'matchCriteria' is set if (matchCriteria == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'matchCriteria' when calling BrowserUpProxyApi->VerifyPresent"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'matchCriteria' when calling BrowserUpProxyApi->VerifyPresent"); } - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { "application/json" @@ -1743,19 +1743,19 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifyPresent "application/json" }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("name", BrowserUp.Mitmproxy.Client.Client.ClientUtils.ParameterToString(name)); // path parameter + localVarRequestOptions.PathParameters.Add("name", BrowserUpMitmProxyClient.Client.ClientUtils.ParameterToString(name)); // path parameter localVarRequestOptions.Data = matchCriteria; localVarRequestOptions.Operation = "BrowserUpProxyApi.VerifyPresent"; @@ -1780,7 +1780,7 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifyPresent /// /// Verify each traffic item matching the criteria meets is below SLA time /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The time used for comparison /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests @@ -1788,34 +1788,34 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifyPresent /// VerifyResult public VerifyResult VerifySLA(int time, string name, MatchCriteria matchCriteria, int operationIndex = 0) { - BrowserUp.Mitmproxy.Client.Client.ApiResponse localVarResponse = VerifySLAWithHttpInfo(time, name, matchCriteria); + BrowserUpMitmProxyClient.Client.ApiResponse localVarResponse = VerifySLAWithHttpInfo(time, name, matchCriteria); return localVarResponse.Data; } /// /// Verify each traffic item matching the criteria meets is below SLA time /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The time used for comparison /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. /// ApiResponse of VerifyResult - public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifySLAWithHttpInfo(int time, string name, MatchCriteria matchCriteria, int operationIndex = 0) + public BrowserUpMitmProxyClient.Client.ApiResponse VerifySLAWithHttpInfo(int time, string name, MatchCriteria matchCriteria, int operationIndex = 0) { // verify the required parameter 'name' is set if (name == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'name' when calling BrowserUpProxyApi->VerifySLA"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'name' when calling BrowserUpProxyApi->VerifySLA"); } // verify the required parameter 'matchCriteria' is set if (matchCriteria == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'matchCriteria' when calling BrowserUpProxyApi->VerifySLA"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'matchCriteria' when calling BrowserUpProxyApi->VerifySLA"); } - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { "application/json" @@ -1826,20 +1826,20 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifySLAWith "application/json" }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("time", BrowserUp.Mitmproxy.Client.Client.ClientUtils.ParameterToString(time)); // path parameter - localVarRequestOptions.PathParameters.Add("name", BrowserUp.Mitmproxy.Client.Client.ClientUtils.ParameterToString(name)); // path parameter + localVarRequestOptions.PathParameters.Add("time", BrowserUpMitmProxyClient.Client.ClientUtils.ParameterToString(time)); // path parameter + localVarRequestOptions.PathParameters.Add("name", BrowserUpMitmProxyClient.Client.ClientUtils.ParameterToString(name)); // path parameter localVarRequestOptions.Data = matchCriteria; localVarRequestOptions.Operation = "BrowserUpProxyApi.VerifySLA"; @@ -1863,7 +1863,7 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifySLAWith /// /// Verify each traffic item matching the criteria meets is below SLA time /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The time used for comparison /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests @@ -1872,36 +1872,36 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifySLAWith /// Task of VerifyResult public async System.Threading.Tasks.Task VerifySLAAsync(int time, string name, MatchCriteria matchCriteria, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - BrowserUp.Mitmproxy.Client.Client.ApiResponse localVarResponse = await VerifySLAWithHttpInfoAsync(time, name, matchCriteria, operationIndex, cancellationToken).ConfigureAwait(false); + BrowserUpMitmProxyClient.Client.ApiResponse localVarResponse = await VerifySLAWithHttpInfoAsync(time, name, matchCriteria, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// Verify each traffic item matching the criteria meets is below SLA time /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The time used for comparison /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (VerifyResult) - public async System.Threading.Tasks.Task> VerifySLAWithHttpInfoAsync(int time, string name, MatchCriteria matchCriteria, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> VerifySLAWithHttpInfoAsync(int time, string name, MatchCriteria matchCriteria, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'name' is set if (name == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'name' when calling BrowserUpProxyApi->VerifySLA"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'name' when calling BrowserUpProxyApi->VerifySLA"); } // verify the required parameter 'matchCriteria' is set if (matchCriteria == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'matchCriteria' when calling BrowserUpProxyApi->VerifySLA"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'matchCriteria' when calling BrowserUpProxyApi->VerifySLA"); } - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { "application/json" @@ -1912,20 +1912,20 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifySLAWith "application/json" }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("time", BrowserUp.Mitmproxy.Client.Client.ClientUtils.ParameterToString(time)); // path parameter - localVarRequestOptions.PathParameters.Add("name", BrowserUp.Mitmproxy.Client.Client.ClientUtils.ParameterToString(name)); // path parameter + localVarRequestOptions.PathParameters.Add("time", BrowserUpMitmProxyClient.Client.ClientUtils.ParameterToString(time)); // path parameter + localVarRequestOptions.PathParameters.Add("name", BrowserUpMitmProxyClient.Client.ClientUtils.ParameterToString(name)); // path parameter localVarRequestOptions.Data = matchCriteria; localVarRequestOptions.Operation = "BrowserUpProxyApi.VerifySLA"; @@ -1950,7 +1950,7 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifySLAWith /// /// Verify matching items in the captured traffic meet the size criteria /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The size used for comparison, in kilobytes /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests @@ -1958,34 +1958,34 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifySLAWith /// VerifyResult public VerifyResult VerifySize(int size, string name, MatchCriteria matchCriteria, int operationIndex = 0) { - BrowserUp.Mitmproxy.Client.Client.ApiResponse localVarResponse = VerifySizeWithHttpInfo(size, name, matchCriteria); + BrowserUpMitmProxyClient.Client.ApiResponse localVarResponse = VerifySizeWithHttpInfo(size, name, matchCriteria); return localVarResponse.Data; } /// /// Verify matching items in the captured traffic meet the size criteria /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The size used for comparison, in kilobytes /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. /// ApiResponse of VerifyResult - public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifySizeWithHttpInfo(int size, string name, MatchCriteria matchCriteria, int operationIndex = 0) + public BrowserUpMitmProxyClient.Client.ApiResponse VerifySizeWithHttpInfo(int size, string name, MatchCriteria matchCriteria, int operationIndex = 0) { // verify the required parameter 'name' is set if (name == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'name' when calling BrowserUpProxyApi->VerifySize"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'name' when calling BrowserUpProxyApi->VerifySize"); } // verify the required parameter 'matchCriteria' is set if (matchCriteria == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'matchCriteria' when calling BrowserUpProxyApi->VerifySize"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'matchCriteria' when calling BrowserUpProxyApi->VerifySize"); } - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { "application/json" @@ -1996,20 +1996,20 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifySizeWit "application/json" }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("size", BrowserUp.Mitmproxy.Client.Client.ClientUtils.ParameterToString(size)); // path parameter - localVarRequestOptions.PathParameters.Add("name", BrowserUp.Mitmproxy.Client.Client.ClientUtils.ParameterToString(name)); // path parameter + localVarRequestOptions.PathParameters.Add("size", BrowserUpMitmProxyClient.Client.ClientUtils.ParameterToString(size)); // path parameter + localVarRequestOptions.PathParameters.Add("name", BrowserUpMitmProxyClient.Client.ClientUtils.ParameterToString(name)); // path parameter localVarRequestOptions.Data = matchCriteria; localVarRequestOptions.Operation = "BrowserUpProxyApi.VerifySize"; @@ -2033,7 +2033,7 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifySizeWit /// /// Verify matching items in the captured traffic meet the size criteria /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The size used for comparison, in kilobytes /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests @@ -2042,36 +2042,36 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifySizeWit /// Task of VerifyResult public async System.Threading.Tasks.Task VerifySizeAsync(int size, string name, MatchCriteria matchCriteria, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - BrowserUp.Mitmproxy.Client.Client.ApiResponse localVarResponse = await VerifySizeWithHttpInfoAsync(size, name, matchCriteria, operationIndex, cancellationToken).ConfigureAwait(false); + BrowserUpMitmProxyClient.Client.ApiResponse localVarResponse = await VerifySizeWithHttpInfoAsync(size, name, matchCriteria, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// /// Verify matching items in the captured traffic meet the size criteria /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The size used for comparison, in kilobytes /// The unique name for this verification operation /// Match criteria to select requests - response pairs for size tests /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (VerifyResult) - public async System.Threading.Tasks.Task> VerifySizeWithHttpInfoAsync(int size, string name, MatchCriteria matchCriteria, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> VerifySizeWithHttpInfoAsync(int size, string name, MatchCriteria matchCriteria, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'name' is set if (name == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'name' when calling BrowserUpProxyApi->VerifySize"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'name' when calling BrowserUpProxyApi->VerifySize"); } // verify the required parameter 'matchCriteria' is set if (matchCriteria == null) { - throw new BrowserUp.Mitmproxy.Client.Client.ApiException(400, "Missing required parameter 'matchCriteria' when calling BrowserUpProxyApi->VerifySize"); + throw new BrowserUpMitmProxyClient.Client.ApiException(400, "Missing required parameter 'matchCriteria' when calling BrowserUpProxyApi->VerifySize"); } - BrowserUp.Mitmproxy.Client.Client.RequestOptions localVarRequestOptions = new BrowserUp.Mitmproxy.Client.Client.RequestOptions(); + BrowserUpMitmProxyClient.Client.RequestOptions localVarRequestOptions = new BrowserUpMitmProxyClient.Client.RequestOptions(); string[] _contentTypes = new string[] { "application/json" @@ -2082,20 +2082,20 @@ public BrowserUp.Mitmproxy.Client.Client.ApiResponse VerifySizeWit "application/json" }; - var localVarContentType = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } - var localVarAccept = BrowserUp.Mitmproxy.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + var localVarAccept = BrowserUpMitmProxyClient.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("size", BrowserUp.Mitmproxy.Client.Client.ClientUtils.ParameterToString(size)); // path parameter - localVarRequestOptions.PathParameters.Add("name", BrowserUp.Mitmproxy.Client.Client.ClientUtils.ParameterToString(name)); // path parameter + localVarRequestOptions.PathParameters.Add("size", BrowserUpMitmProxyClient.Client.ClientUtils.ParameterToString(size)); // path parameter + localVarRequestOptions.PathParameters.Add("name", BrowserUpMitmProxyClient.Client.ClientUtils.ParameterToString(name)); // path parameter localVarRequestOptions.Data = matchCriteria; localVarRequestOptions.Operation = "BrowserUpProxyApi.VerifySize"; diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/BrowserUp.Mitmproxy.Client.csproj b/clients/csharp/src/BrowserUpMitmProxyClient/BrowserUpMitmProxyClient.csproj similarity index 68% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/BrowserUp.Mitmproxy.Client.csproj rename to clients/csharp/src/BrowserUpMitmProxyClient/BrowserUpMitmProxyClient.csproj index a2a25d21fd..da35bc999d 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/BrowserUp.Mitmproxy.Client.csproj +++ b/clients/csharp/src/BrowserUpMitmProxyClient/BrowserUpMitmProxyClient.csproj @@ -3,17 +3,17 @@ false net7.0 - BrowserUp.Mitmproxy.Client - BrowserUp.Mitmproxy.Client + BrowserUpMitmProxyClient + BrowserUpMitmProxyClient Library OpenAPI OpenAPI OpenAPI Library A library generated from a OpenAPI doc No Copyright - BrowserUp.Mitmproxy.Client + BrowserUpMitmProxyClient 1.0.0 - bin\$(Configuration)\$(TargetFramework)\BrowserUp.Mitmproxy.Client.xml + bin\$(Configuration)\$(TargetFramework)\BrowserUpMitmProxyClient.xml https://github.com/GIT_USER_ID/GIT_REPO_ID.git git Minor update @@ -21,10 +21,11 @@ - - - + + + + diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ApiClient.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Client/ApiClient.cs similarity index 79% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ApiClient.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Client/ApiClient.cs index 6b66250d95..b8c9ddd72b 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ApiClient.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Client/ApiClient.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +30,7 @@ using RestSharpMethod = RestSharp.Method; using Polly; -namespace BrowserUp.Mitmproxy.Client.Client +namespace BrowserUpMitmProxyClient.Client { /// /// Allows RestSharp to Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON. @@ -38,6 +38,7 @@ namespace BrowserUp.Mitmproxy.Client.Client internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { private readonly IReadableConfiguration _configuration; + private static readonly string _contentType = "application/json"; private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings { // OpenAPI generated types generally hide default constructors. @@ -69,10 +70,10 @@ public CustomJsonCodec(JsonSerializerSettings serializerSettings, IReadableConfi /// A JSON string. public string Serialize(object obj) { - if (obj != null && obj is BrowserUp.Mitmproxy.Client.Model.AbstractOpenAPISchema) + if (obj != null && obj is BrowserUpMitmProxyClient.Model.AbstractOpenAPISchema) { // the object to be serialized is an oneOf/anyOf schema - return ((BrowserUp.Mitmproxy.Client.Model.AbstractOpenAPISchema)obj).ToJson(); + return ((BrowserUpMitmProxyClient.Model.AbstractOpenAPISchema)obj).ToJson(); } else { @@ -150,13 +151,17 @@ internal object Deserialize(RestResponse response, Type type) public ISerializer Serializer => this; public IDeserializer Deserializer => this; - public string[] AcceptedContentTypes => RestSharp.ContentType.JsonAccept; + public string[] AcceptedContentTypes => RestSharp.Serializers.ContentType.JsonAccept; public SupportsContentType SupportsContentType => contentType => - contentType.Value.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || - contentType.Value.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); + contentType.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || + contentType.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); - public ContentType ContentType { get; set; } = RestSharp.ContentType.Json; + public string ContentType + { + get { return _contentType; } + set { throw new InvalidOperationException("Not allowed to set content type."); } + } public DataFormat DataFormat => DataFormat.Json; } @@ -203,7 +208,7 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient /// public ApiClient() { - _baseUrl = BrowserUp.Mitmproxy.Client.Client.GlobalConfiguration.Instance.BasePath; + _baseUrl = BrowserUpMitmProxyClient.Client.GlobalConfiguration.Instance.BasePath; } /// @@ -429,7 +434,7 @@ private ApiResponse ToApiResponse(RestResponse response) return transformed; } - private ApiResponse Exec(RestRequest request, RequestOptions options, IReadableConfiguration configuration) + private ApiResponse Exec(RestRequest req, RequestOptions options, IReadableConfiguration configuration) { var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; @@ -449,95 +454,93 @@ private ApiResponse Exec(RestRequest request, RequestOptions options, IRea CookieContainer = cookies, MaxTimeout = configuration.Timeout, Proxy = configuration.Proxy, - UserAgent = configuration.UserAgent, - UseDefaultCredentials = configuration.UseDefaultCredentials, - RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback + UserAgent = configuration.UserAgent }; - using (RestClient client = new RestClient(clientOptions, - configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)))) - { - InterceptRequest(request); + RestClient client = new RestClient(clientOptions) + .UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)); - RestResponse response; - if (RetryConfiguration.RetryPolicy != null) - { - var policy = RetryConfiguration.RetryPolicy; - var policyResult = policy.ExecuteAndCapture(() => client.Execute(request)); - response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse(request) - { - ErrorException = policyResult.FinalException - }; - } - else - { - response = client.Execute(request); - } + InterceptRequest(req); - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof(BrowserUp.Mitmproxy.Client.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - try - { - response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); - } - catch (Exception ex) - { - throw ex.InnerException != null ? ex.InnerException : ex; - } - } - else if (typeof(T).Name == "Stream") // for binary response + RestResponse response; + if (RetryConfiguration.RetryPolicy != null) + { + var policy = RetryConfiguration.RetryPolicy; + var policyResult = policy.ExecuteAndCapture(() => client.Execute(req)); + response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse { - response.Data = (T)(object)new MemoryStream(response.RawBytes); - } - else if (typeof(T).Name == "Byte[]") // for byte response + Request = req, + ErrorException = policyResult.FinalException + }; + } + else + { + response = client.Execute(req); + } + + // if the response type is oneOf/anyOf, call FromJSON to deserialize the data + if (typeof(BrowserUpMitmProxyClient.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) + { + try { - response.Data = (T)(object)response.RawBytes; + response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); } - else if (typeof(T).Name == "String") // for string response + catch (Exception ex) { - response.Data = (T)(object)response.Content; + throw ex.InnerException != null ? ex.InnerException : ex; } + } + else if (typeof(T).Name == "Stream") // for binary response + { + response.Data = (T)(object)new MemoryStream(response.RawBytes); + } + else if (typeof(T).Name == "Byte[]") // for byte response + { + response.Data = (T)(object)response.RawBytes; + } + else if (typeof(T).Name == "String") // for string response + { + response.Data = (T)(object)response.Content; + } - InterceptResponse(request, response); + InterceptResponse(req, response); - var result = ToApiResponse(response); - if (response.ErrorMessage != null) - { - result.ErrorText = response.ErrorMessage; - } + var result = ToApiResponse(response); + if (response.ErrorMessage != null) + { + result.ErrorText = response.ErrorMessage; + } - if (response.Cookies != null && response.Cookies.Count > 0) + if (response.Cookies != null && response.Cookies.Count > 0) + { + if (result.Cookies == null) result.Cookies = new List(); + foreach (var restResponseCookie in response.Cookies.Cast()) { - if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies.Cast()) + var cookie = new Cookie( + restResponseCookie.Name, + restResponseCookie.Value, + restResponseCookie.Path, + restResponseCookie.Domain + ) { - var cookie = new Cookie( - restResponseCookie.Name, - restResponseCookie.Value, - restResponseCookie.Path, - restResponseCookie.Domain - ) - { - Comment = restResponseCookie.Comment, - CommentUri = restResponseCookie.CommentUri, - Discard = restResponseCookie.Discard, - Expired = restResponseCookie.Expired, - Expires = restResponseCookie.Expires, - HttpOnly = restResponseCookie.HttpOnly, - Port = restResponseCookie.Port, - Secure = restResponseCookie.Secure, - Version = restResponseCookie.Version - }; - - result.Cookies.Add(cookie); - } + Comment = restResponseCookie.Comment, + CommentUri = restResponseCookie.CommentUri, + Discard = restResponseCookie.Discard, + Expired = restResponseCookie.Expired, + Expires = restResponseCookie.Expires, + HttpOnly = restResponseCookie.HttpOnly, + Port = restResponseCookie.Port, + Secure = restResponseCookie.Secure, + Version = restResponseCookie.Version + }; + + result.Cookies.Add(cookie); } - return result; } + return result; } - private async Task> ExecAsync(RestRequest request, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private async Task> ExecAsync(RestRequest req, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; @@ -546,80 +549,79 @@ private ApiResponse Exec(RestRequest request, RequestOptions options, IRea ClientCertificates = configuration.ClientCertificates, MaxTimeout = configuration.Timeout, Proxy = configuration.Proxy, - UserAgent = configuration.UserAgent, - UseDefaultCredentials = configuration.UseDefaultCredentials + UserAgent = configuration.UserAgent }; - using (RestClient client = new RestClient(clientOptions, - configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)))) - { - InterceptRequest(request); + RestClient client = new RestClient(clientOptions) + .UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)); - RestResponse response; - if (RetryConfiguration.AsyncRetryPolicy != null) - { - var policy = RetryConfiguration.AsyncRetryPolicy; - var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false); - response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse(request) - { - ErrorException = policyResult.FinalException - }; - } - else - { - response = await client.ExecuteAsync(request, cancellationToken).ConfigureAwait(false); - } + InterceptRequest(req); - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof(BrowserUp.Mitmproxy.Client.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); - } - else if (typeof(T).Name == "Stream") // for binary response - { - response.Data = (T)(object)new MemoryStream(response.RawBytes); - } - else if (typeof(T).Name == "Byte[]") // for byte response + RestResponse response; + if (RetryConfiguration.AsyncRetryPolicy != null) + { + var policy = RetryConfiguration.AsyncRetryPolicy; + var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(req, ct), cancellationToken).ConfigureAwait(false); + response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse { - response.Data = (T)(object)response.RawBytes; - } + Request = req, + ErrorException = policyResult.FinalException + }; + } + else + { + response = await client.ExecuteAsync(req, cancellationToken).ConfigureAwait(false); + } - InterceptResponse(request, response); + // if the response type is oneOf/anyOf, call FromJSON to deserialize the data + if (typeof(BrowserUpMitmProxyClient.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) + { + response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + } + else if (typeof(T).Name == "Stream") // for binary response + { + response.Data = (T)(object)new MemoryStream(response.RawBytes); + } + else if (typeof(T).Name == "Byte[]") // for byte response + { + response.Data = (T)(object)response.RawBytes; + } - var result = ToApiResponse(response); - if (response.ErrorMessage != null) - { - result.ErrorText = response.ErrorMessage; - } + InterceptResponse(req, response); - if (response.Cookies != null && response.Cookies.Count > 0) + var result = ToApiResponse(response); + if (response.ErrorMessage != null) + { + result.ErrorText = response.ErrorMessage; + } + + if (response.Cookies != null && response.Cookies.Count > 0) + { + if (result.Cookies == null) result.Cookies = new List(); + foreach (var restResponseCookie in response.Cookies.Cast()) { - if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies.Cast()) + var cookie = new Cookie( + restResponseCookie.Name, + restResponseCookie.Value, + restResponseCookie.Path, + restResponseCookie.Domain + ) { - var cookie = new Cookie( - restResponseCookie.Name, - restResponseCookie.Value, - restResponseCookie.Path, - restResponseCookie.Domain - ) - { - Comment = restResponseCookie.Comment, - CommentUri = restResponseCookie.CommentUri, - Discard = restResponseCookie.Discard, - Expired = restResponseCookie.Expired, - Expires = restResponseCookie.Expires, - HttpOnly = restResponseCookie.HttpOnly, - Port = restResponseCookie.Port, - Secure = restResponseCookie.Secure, - Version = restResponseCookie.Version - }; - - result.Cookies.Add(cookie); - } + Comment = restResponseCookie.Comment, + CommentUri = restResponseCookie.CommentUri, + Discard = restResponseCookie.Discard, + Expired = restResponseCookie.Expired, + Expires = restResponseCookie.Expires, + HttpOnly = restResponseCookie.HttpOnly, + Port = restResponseCookie.Port, + Secure = restResponseCookie.Secure, + Version = restResponseCookie.Version + }; + + result.Cookies.Add(cookie); } - return result; } + return result; } #region IAsynchronousClient diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ApiException.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Client/ApiException.cs similarity index 96% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ApiException.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Client/ApiException.cs index 51f87b164c..1c38ace00e 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ApiException.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Client/ApiException.cs @@ -3,14 +3,14 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ using System; -namespace BrowserUp.Mitmproxy.Client.Client +namespace BrowserUpMitmProxyClient.Client { /// /// API Exception diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ApiResponse.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Client/ApiResponse.cs similarity index 98% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ApiResponse.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Client/ApiResponse.cs index 7130955fc1..e8a741d67c 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ApiResponse.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Client/ApiResponse.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Net; -namespace BrowserUp.Mitmproxy.Client.Client +namespace BrowserUpMitmProxyClient.Client { /// /// Provides a non-generic contract for the ApiResponse wrapper. diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ClientUtils.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Client/ClientUtils.cs similarity index 95% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ClientUtils.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Client/ClientUtils.cs index 11b322423c..a657c5e09e 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ClientUtils.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Client/ClientUtils.cs @@ -3,14 +3,13 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ using System; using System.Collections; -using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; @@ -18,7 +17,7 @@ using System.Text; using System.Text.RegularExpressions; -namespace BrowserUp.Mitmproxy.Client.Client +namespace BrowserUpMitmProxyClient.Client { /// /// Utility functions providing some benefit to API client consumers. @@ -102,12 +101,8 @@ public static string ParameterToString(object obj, IReadableConfiguration config return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); if (obj is bool boolean) return boolean ? "true" : "false"; - if (obj is ICollection collection) { - List entries = new List(); - foreach (var entry in collection) - entries.Add(ParameterToString(entry, configuration)); - return string.Join(",", entries); - } + if (obj is ICollection collection) + return string.Join(",", collection.Cast()); if (obj is Enum && HasEnumMemberAttrValue(obj)) return GetEnumMemberAttrValue(obj); diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/Configuration.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Client/Configuration.cs similarity index 94% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/Configuration.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Client/Configuration.cs index 6c137c45eb..2e4b5c7d9e 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/Configuration.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Client/Configuration.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -18,9 +18,8 @@ using System.Security.Cryptography.X509Certificates; using System.Text; using System.Net.Http; -using System.Net.Security; -namespace BrowserUp.Mitmproxy.Client.Client +namespace BrowserUpMitmProxyClient.Client { /// /// Represents a set of configuration settings @@ -76,8 +75,6 @@ public class Configuration : IReadableConfiguration /// private string _basePath; - private bool _useDefaultCredentials = false; - /// /// Gets or sets the API key based on the authentication name. /// This is the key and value comprising the "secret" for accessing an API. @@ -198,21 +195,11 @@ public Configuration( /// /// Gets or sets the base path for API access. /// - public virtual string BasePath - { + public virtual string BasePath { get { return _basePath; } set { _basePath = value; } } - /// - /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. - /// - public virtual bool UseDefaultCredentials - { - get { return _useDefaultCredentials; } - set { _useDefaultCredentials = value; } - } - /// /// Gets or sets the default header. /// @@ -477,7 +464,7 @@ public string GetOperationServerUrl(string operation, int index) /// The operation server URL. public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) { - if (operation != null && OperationServers.TryGetValue(operation, out var operationServer)) + if (OperationServers.TryGetValue(operation, out var operationServer)) { return GetServerUrl(operationServer, index, inputVariables); } @@ -536,11 +523,6 @@ private string GetServerUrl(IList> servers, return url; } - - /// - /// Gets and Sets the RemoteCertificateValidationCallback - /// - public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; } #endregion Properties @@ -551,10 +533,10 @@ private string GetServerUrl(IList> servers, /// public static string ToDebugReport() { - string report = "C# SDK (BrowserUp.Mitmproxy.Client) Debug Report:\n"; + string report = "C# SDK (BrowserUpMitmProxyClient) Debug Report:\n"; report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 1.0.0\n"; + report += " Version of the API: 1.24\n"; report += " SDK Package Version: 1.0.0\n"; return report; @@ -617,8 +599,6 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, - UseDefaultCredentials = second.UseDefaultCredentials, - RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback, }; return config; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ExceptionFactory.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Client/ExceptionFactory.cs similarity index 88% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ExceptionFactory.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Client/ExceptionFactory.cs index 993c997282..42148d22c4 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ExceptionFactory.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Client/ExceptionFactory.cs @@ -3,14 +3,14 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ using System; -namespace BrowserUp.Mitmproxy.Client.Client +namespace BrowserUpMitmProxyClient.Client { /// /// A delegate to ExceptionFactory method diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/GlobalConfiguration.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Client/GlobalConfiguration.cs similarity index 95% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/GlobalConfiguration.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Client/GlobalConfiguration.cs index 88d8f8a647..fd95ab905c 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/GlobalConfiguration.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Client/GlobalConfiguration.cs @@ -3,14 +3,14 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ using System.Collections.Generic; -namespace BrowserUp.Mitmproxy.Client.Client +namespace BrowserUpMitmProxyClient.Client { /// /// provides a compile-time extension point for globally configuring diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/HttpMethod.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Client/HttpMethod.cs similarity index 91% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/HttpMethod.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Client/HttpMethod.cs index 5c4a39617f..7c79411868 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/HttpMethod.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Client/HttpMethod.cs @@ -3,12 +3,12 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ -namespace BrowserUp.Mitmproxy.Client.Client +namespace BrowserUpMitmProxyClient.Client { /// /// Http methods supported by swagger diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/IApiAccessor.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Client/IApiAccessor.cs similarity index 92% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/IApiAccessor.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Client/IApiAccessor.cs index 52ef0755cf..5243403a95 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/IApiAccessor.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Client/IApiAccessor.cs @@ -3,14 +3,14 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ using System; -namespace BrowserUp.Mitmproxy.Client.Client +namespace BrowserUpMitmProxyClient.Client { /// /// Represents configuration aspects required to interact with the API endpoints. diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/IAsynchronousClient.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Client/IAsynchronousClient.cs similarity index 98% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/IAsynchronousClient.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Client/IAsynchronousClient.cs index 5fae815ba5..a6f92308c3 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/IAsynchronousClient.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Client/IAsynchronousClient.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -11,7 +11,7 @@ using System; using System.Threading.Tasks; -namespace BrowserUp.Mitmproxy.Client.Client +namespace BrowserUpMitmProxyClient.Client { /// /// Contract for Asynchronous RESTful API interactions. diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/IReadableConfiguration.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Client/IReadableConfiguration.cs similarity index 84% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/IReadableConfiguration.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Client/IReadableConfiguration.cs index c89d9de4fd..06f727a210 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/IReadableConfiguration.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Client/IReadableConfiguration.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -11,10 +11,9 @@ using System; using System.Collections.Generic; using System.Net; -using System.Net.Security; using System.Security.Cryptography.X509Certificates; -namespace BrowserUp.Mitmproxy.Client.Client +namespace BrowserUpMitmProxyClient.Client { /// /// Represents a readable-only configuration contract. @@ -100,11 +99,6 @@ public interface IReadableConfiguration /// Password. string Password { get; } - /// - /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. - /// - bool UseDefaultCredentials { get; } - /// /// Get the servers associated with the operation. /// @@ -131,11 +125,5 @@ public interface IReadableConfiguration /// /// X509 Certificate collection. X509CertificateCollection ClientCertificates { get; } - - /// - /// Callback function for handling the validation of remote certificates. Useful for certificate pinning and - /// overriding certificate errors in the scope of a request. - /// - RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; } } } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ISynchronousClient.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Client/ISynchronousClient.cs similarity index 98% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ISynchronousClient.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Client/ISynchronousClient.cs index aa87d493dd..430c94b24e 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/ISynchronousClient.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Client/ISynchronousClient.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -11,7 +11,7 @@ using System; using System.IO; -namespace BrowserUp.Mitmproxy.Client.Client +namespace BrowserUpMitmProxyClient.Client { /// /// Contract for Synchronous RESTful API interactions. diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/Multimap.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Client/Multimap.cs similarity index 99% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/Multimap.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Client/Multimap.cs index d3a45b82eb..48abb21165 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/Multimap.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Client/Multimap.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -12,7 +12,7 @@ using System.Collections; using System.Collections.Generic; -namespace BrowserUp.Mitmproxy.Client.Client +namespace BrowserUpMitmProxyClient.Client { /// /// A dictionary in which one key has many associated values. diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/OpenAPIDateConverter.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Client/OpenAPIDateConverter.cs similarity index 91% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/OpenAPIDateConverter.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Client/OpenAPIDateConverter.cs index 9b962578f3..ea5de2a19b 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/OpenAPIDateConverter.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Client/OpenAPIDateConverter.cs @@ -3,13 +3,13 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ using Newtonsoft.Json.Converters; -namespace BrowserUp.Mitmproxy.Client.Client +namespace BrowserUpMitmProxyClient.Client { /// /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/RequestOptions.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Client/RequestOptions.cs similarity index 96% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/RequestOptions.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Client/RequestOptions.cs index 817903f8a6..76b060de33 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/RequestOptions.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Client/RequestOptions.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -13,7 +13,7 @@ using System.IO; using System.Net; -namespace BrowserUp.Mitmproxy.Client.Client +namespace BrowserUpMitmProxyClient.Client { /// /// A container for generalized request inputs. This type allows consumers to extend the request functionality diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/RetryConfiguration.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Client/RetryConfiguration.cs similarity index 90% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/RetryConfiguration.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Client/RetryConfiguration.cs index ef9e30f752..1ffd197846 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Client/RetryConfiguration.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Client/RetryConfiguration.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -11,7 +11,7 @@ using Polly; using RestSharp; -namespace BrowserUp.Mitmproxy.Client.Client +namespace BrowserUpMitmProxyClient.Client { /// /// Configuration class to set the polly retry policies to be applied to the requests. diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/AbstractOpenAPISchema.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/AbstractOpenAPISchema.cs similarity index 96% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/AbstractOpenAPISchema.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/AbstractOpenAPISchema.cs index fe4c146a1b..a7f4423184 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/AbstractOpenAPISchema.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/AbstractOpenAPISchema.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -12,7 +12,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Action.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/Action.cs similarity index 96% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Action.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/Action.cs index e0b6073be5..6049eddf1f 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Action.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/Action.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// Action @@ -245,7 +245,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Error.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/Error.cs similarity index 93% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Error.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/Error.cs index 219b8881dc..e4e46fbbef 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Error.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/Error.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// Error @@ -139,7 +139,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Har.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/Har.cs similarity index 87% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Har.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/Har.cs index d8d5d71986..8f68197694 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Har.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/Har.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// Har @@ -146,17 +146,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntry.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntry.cs similarity index 97% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntry.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntry.cs index 715713a004..14a35b4e5c 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntry.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntry.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// HarEntry @@ -321,7 +321,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { // Time (long) minimum if (this.Time < (long)0) diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryCache.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryCache.cs similarity index 92% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryCache.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryCache.cs index ea797db09b..416090a8b7 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryCache.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryCache.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// HarEntryCache @@ -47,13 +47,13 @@ public partial class HarEntryCache : IEquatable, IValidatableObje /// /// Gets or Sets BeforeRequest /// - [DataMember(Name = "beforeRequest", EmitDefaultValue = true)] + [DataMember(Name = "beforeRequest", EmitDefaultValue = false)] public HarEntryCacheBeforeRequest BeforeRequest { get; set; } /// /// Gets or Sets AfterRequest /// - [DataMember(Name = "afterRequest", EmitDefaultValue = true)] + [DataMember(Name = "afterRequest", EmitDefaultValue = false)] public HarEntryCacheBeforeRequest AfterRequest { get; set; } /// @@ -155,7 +155,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryCacheBeforeRequest.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryCacheBeforeRequest.cs new file mode 100644 index 0000000000..8859334142 --- /dev/null +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryCacheBeforeRequest.cs @@ -0,0 +1,256 @@ +/* + * BrowserUp MitmProxy + * + * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ + * + * The version of the OpenAPI document: 1.24 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; +using System.Reflection; + +namespace BrowserUpMitmProxyClient.Model +{ + /// + /// HarEntryCacheBeforeRequest + /// + [JsonConverter(typeof(HarEntryCacheBeforeRequestJsonConverter))] + [DataContract(Name = "HarEntry_cache_beforeRequest")] + public partial class HarEntryCacheBeforeRequest : AbstractOpenAPISchema, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + public HarEntryCacheBeforeRequest() + { + this.IsNullable = true; + this.SchemaType= "oneOf"; + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of HarEntryCacheBeforeRequestOneOf. + public HarEntryCacheBeforeRequest(HarEntryCacheBeforeRequestOneOf actualInstance) + { + this.IsNullable = true; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance; + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(HarEntryCacheBeforeRequestOneOf)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: HarEntryCacheBeforeRequestOneOf"); + } + } + } + + /// + /// Get the actual instance of `HarEntryCacheBeforeRequestOneOf`. If the actual instance is not `HarEntryCacheBeforeRequestOneOf`, + /// the InvalidClassException will be thrown + /// + /// An instance of HarEntryCacheBeforeRequestOneOf + public HarEntryCacheBeforeRequestOneOf GetHarEntryCacheBeforeRequestOneOf() + { + return (HarEntryCacheBeforeRequestOneOf)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class HarEntryCacheBeforeRequest {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, HarEntryCacheBeforeRequest.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of HarEntryCacheBeforeRequest + /// + /// JSON string + /// An instance of HarEntryCacheBeforeRequest + public static HarEntryCacheBeforeRequest FromJson(string jsonString) + { + HarEntryCacheBeforeRequest newHarEntryCacheBeforeRequest = null; + + if (string.IsNullOrEmpty(jsonString)) + { + return newHarEntryCacheBeforeRequest; + } + int match = 0; + List matchedTypes = new List(); + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(HarEntryCacheBeforeRequestOneOf).GetProperty("AdditionalProperties") == null) + { + newHarEntryCacheBeforeRequest = new HarEntryCacheBeforeRequest(JsonConvert.DeserializeObject(jsonString, HarEntryCacheBeforeRequest.SerializerSettings)); + } + else + { + newHarEntryCacheBeforeRequest = new HarEntryCacheBeforeRequest(JsonConvert.DeserializeObject(jsonString, HarEntryCacheBeforeRequest.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("HarEntryCacheBeforeRequestOneOf"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into HarEntryCacheBeforeRequestOneOf: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newHarEntryCacheBeforeRequest; + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as HarEntryCacheBeforeRequest); + } + + /// + /// Returns true if HarEntryCacheBeforeRequest instances are equal + /// + /// Instance of HarEntryCacheBeforeRequest to be compared + /// Boolean + public bool Equals(HarEntryCacheBeforeRequest input) + { + if (input == null) + return false; + + return this.ActualInstance.Equals(input.ActualInstance); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for HarEntryCacheBeforeRequest + /// + public class HarEntryCacheBeforeRequestJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((string)(typeof(HarEntryCacheBeforeRequest).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return HarEntryCacheBeforeRequest.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryCacheBeforeRequestOneOf.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryCacheBeforeRequestOneOf.cs similarity index 96% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryCacheBeforeRequestOneOf.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryCacheBeforeRequestOneOf.cs index abddd79e01..62dc016d6b 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryCacheBeforeRequestOneOf.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryCacheBeforeRequestOneOf.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// HarEntryCacheBeforeRequestOneOf @@ -202,7 +202,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequest.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryRequest.cs similarity index 94% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequest.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryRequest.cs index 110ff327d6..0e96288d16 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequest.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryRequest.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// HarEntryRequest @@ -328,17 +328,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequestCookiesInner.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryRequestCookiesInner.cs similarity index 96% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequestCookiesInner.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryRequestCookiesInner.cs index 7d4898d07a..44d8f43a27 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequestCookiesInner.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryRequestCookiesInner.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// HarEntryRequestCookiesInner @@ -252,7 +252,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequestPostData.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryRequestPostData.cs similarity index 84% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequestPostData.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryRequestPostData.cs index acfa800288..1585e9fb68 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequestPostData.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryRequestPostData.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// Posted data info. @@ -41,8 +41,8 @@ protected HarEntryRequestPostData() { } /// /// mimeType (required). /// text. - /// varParams. - public HarEntryRequestPostData(string mimeType = default(string), string text = default(string), List varParams = default(List)) + /// _params. + public HarEntryRequestPostData(string mimeType = default(string), string text = default(string), List _params = default(List)) { // to ensure "mimeType" is required (not null) if (mimeType == null) @@ -51,7 +51,7 @@ protected HarEntryRequestPostData() { } } this.MimeType = mimeType; this.Text = text; - this.VarParams = varParams; + this.Params = _params; } /// @@ -67,10 +67,10 @@ protected HarEntryRequestPostData() { } public string Text { get; set; } /// - /// Gets or Sets VarParams + /// Gets or Sets Params /// [DataMember(Name = "params", EmitDefaultValue = false)] - public List VarParams { get; set; } + public List Params { get; set; } /// /// Returns the string presentation of the object @@ -82,7 +82,7 @@ public override string ToString() sb.Append("class HarEntryRequestPostData {\n"); sb.Append(" MimeType: ").Append(MimeType).Append("\n"); sb.Append(" Text: ").Append(Text).Append("\n"); - sb.Append(" VarParams: ").Append(VarParams).Append("\n"); + sb.Append(" Params: ").Append(Params).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -129,10 +129,10 @@ public bool Equals(HarEntryRequestPostData input) this.Text.Equals(input.Text)) ) && ( - this.VarParams == input.VarParams || - this.VarParams != null && - input.VarParams != null && - this.VarParams.SequenceEqual(input.VarParams) + this.Params == input.Params || + this.Params != null && + input.Params != null && + this.Params.SequenceEqual(input.Params) ); } @@ -153,9 +153,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Text.GetHashCode(); } - if (this.VarParams != null) + if (this.Params != null) { - hashCode = (hashCode * 59) + this.VarParams.GetHashCode(); + hashCode = (hashCode * 59) + this.Params.GetHashCode(); } return hashCode; } @@ -166,7 +166,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequestPostDataParamsInner.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryRequestPostDataParamsInner.cs similarity index 95% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequestPostDataParamsInner.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryRequestPostDataParamsInner.cs index be8d99dc18..8143be4d9e 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequestPostDataParamsInner.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryRequestPostDataParamsInner.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// HarEntryRequestPostDataParamsInner @@ -191,7 +191,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequestQueryStringInner.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryRequestQueryStringInner.cs similarity index 95% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequestQueryStringInner.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryRequestQueryStringInner.cs index c3abb1986c..567bb67ccd 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryRequestQueryStringInner.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryRequestQueryStringInner.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// HarEntryRequestQueryStringInner @@ -170,7 +170,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryResponse.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryResponse.cs similarity index 94% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryResponse.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryResponse.cs index 9a5d638d49..75c1dd73a7 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryResponse.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryResponse.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// HarEntryResponse @@ -323,17 +323,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryResponseContent.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryResponseContent.cs similarity index 98% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryResponseContent.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryResponseContent.cs index 82088d61a6..a8b55d7e5f 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryResponseContent.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryResponseContent.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// HarEntryResponseContent @@ -323,7 +323,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { // VideoBufferedPercent (long) minimum if (this.VideoBufferedPercent < (long)-1) diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryTimings.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryTimings.cs similarity index 97% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryTimings.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryTimings.cs index 5a8854856d..b744d0415c 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarEntryTimings.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarEntryTimings.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// HarEntryTimings @@ -222,7 +222,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { // Dns (long) minimum if (this.Dns < (long)-1) diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarLog.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarLog.cs similarity index 85% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarLog.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/HarLog.cs index 8c6acf7ce3..5c6d1b00fd 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarLog.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarLog.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// HarLog @@ -39,20 +39,20 @@ protected HarLog() { } /// /// Initializes a new instance of the class. /// - /// varVersion (required). + /// version (required). /// creator (required). /// browser. /// pages (required). /// entries (required). /// comment. - public HarLog(string varVersion = default(string), HarLogCreator creator = default(HarLogCreator), HarLogCreator browser = default(HarLogCreator), List pages = default(List), List entries = default(List), string comment = default(string)) + public HarLog(string version = default(string), HarLogCreator creator = default(HarLogCreator), HarLogCreator browser = default(HarLogCreator), List pages = default(List), List entries = default(List), string comment = default(string)) { - // to ensure "varVersion" is required (not null) - if (varVersion == null) + // to ensure "version" is required (not null) + if (version == null) { - throw new ArgumentNullException("varVersion is a required property for HarLog and cannot be null"); + throw new ArgumentNullException("version is a required property for HarLog and cannot be null"); } - this.VarVersion = varVersion; + this._Version = version; // to ensure "creator" is required (not null) if (creator == null) { @@ -76,10 +76,10 @@ protected HarLog() { } } /// - /// Gets or Sets VarVersion + /// Gets or Sets _Version /// [DataMember(Name = "version", IsRequired = true, EmitDefaultValue = true)] - public string VarVersion { get; set; } + public string _Version { get; set; } /// /// Gets or Sets Creator @@ -119,7 +119,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class HarLog {\n"); - sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); + sb.Append(" _Version: ").Append(_Version).Append("\n"); sb.Append(" Creator: ").Append(Creator).Append("\n"); sb.Append(" Browser: ").Append(Browser).Append("\n"); sb.Append(" Pages: ").Append(Pages).Append("\n"); @@ -161,9 +161,9 @@ public bool Equals(HarLog input) } return ( - this.VarVersion == input.VarVersion || - (this.VarVersion != null && - this.VarVersion.Equals(input.VarVersion)) + this._Version == input._Version || + (this._Version != null && + this._Version.Equals(input._Version)) ) && ( this.Creator == input.Creator || @@ -203,9 +203,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.VarVersion != null) + if (this._Version != null) { - hashCode = (hashCode * 59) + this.VarVersion.GetHashCode(); + hashCode = (hashCode * 59) + this._Version.GetHashCode(); } if (this.Creator != null) { @@ -236,7 +236,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarLogCreator.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarLogCreator.cs similarity index 81% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarLogCreator.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/HarLogCreator.cs index 75508d8e6c..64dab214fd 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/HarLogCreator.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/HarLogCreator.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// HarLogCreator @@ -40,9 +40,9 @@ protected HarLogCreator() { } /// Initializes a new instance of the class. /// /// name (required). - /// varVersion (required). + /// version (required). /// comment. - public HarLogCreator(string name = default(string), string varVersion = default(string), string comment = default(string)) + public HarLogCreator(string name = default(string), string version = default(string), string comment = default(string)) { // to ensure "name" is required (not null) if (name == null) @@ -50,12 +50,12 @@ protected HarLogCreator() { } throw new ArgumentNullException("name is a required property for HarLogCreator and cannot be null"); } this.Name = name; - // to ensure "varVersion" is required (not null) - if (varVersion == null) + // to ensure "version" is required (not null) + if (version == null) { - throw new ArgumentNullException("varVersion is a required property for HarLogCreator and cannot be null"); + throw new ArgumentNullException("version is a required property for HarLogCreator and cannot be null"); } - this.VarVersion = varVersion; + this._Version = version; this.Comment = comment; } @@ -66,10 +66,10 @@ protected HarLogCreator() { } public string Name { get; set; } /// - /// Gets or Sets VarVersion + /// Gets or Sets _Version /// [DataMember(Name = "version", IsRequired = true, EmitDefaultValue = true)] - public string VarVersion { get; set; } + public string _Version { get; set; } /// /// Gets or Sets Comment @@ -86,7 +86,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class HarLogCreator {\n"); sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); + sb.Append(" _Version: ").Append(_Version).Append("\n"); sb.Append(" Comment: ").Append(Comment).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -129,9 +129,9 @@ public bool Equals(HarLogCreator input) this.Name.Equals(input.Name)) ) && ( - this.VarVersion == input.VarVersion || - (this.VarVersion != null && - this.VarVersion.Equals(input.VarVersion)) + this._Version == input._Version || + (this._Version != null && + this._Version.Equals(input._Version)) ) && ( this.Comment == input.Comment || @@ -153,9 +153,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Name.GetHashCode(); } - if (this.VarVersion != null) + if (this._Version != null) { - hashCode = (hashCode * 59) + this.VarVersion.GetHashCode(); + hashCode = (hashCode * 59) + this._Version.GetHashCode(); } if (this.Comment != null) { @@ -170,7 +170,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Header.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/Header.cs similarity index 94% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Header.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/Header.cs index 8328ea0d32..b3ec8f2c4f 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Header.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/Header.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// Header @@ -170,7 +170,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/LargestContentfulPaint.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/LargestContentfulPaint.cs similarity index 89% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/LargestContentfulPaint.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/LargestContentfulPaint.cs index 463829b5b6..6ab2fe1f4a 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/LargestContentfulPaint.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/LargestContentfulPaint.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// LargestContentfulPaint @@ -38,14 +38,14 @@ public partial class LargestContentfulPaint : Dictionary, IEquat /// size (default to -1). /// domPath (default to ""). /// tag (default to ""). - public LargestContentfulPaint(long startTime = -1, long size = -1, string domPath = @"", string tag = @"") : base() + public LargestContentfulPaint(long startTime = -1, long size = -1, string domPath = "", string tag = "") : base() { this.StartTime = startTime; this.Size = size; // use default value if no "domPath" provided - this.DomPath = domPath ?? @""; + this.DomPath = domPath ?? ""; // use default value if no "tag" provided - this.Tag = tag ?? @""; + this.Tag = tag ?? ""; this.AdditionalProperties = new Dictionary(); } @@ -181,17 +181,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { // StartTime (long) minimum if (this.StartTime < (long)-1) diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/MatchCriteria.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/MatchCriteria.cs similarity index 92% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/MatchCriteria.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/MatchCriteria.cs index c95c45bbbe..04cb98b9a6 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/MatchCriteria.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/MatchCriteria.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// A set of criteria for filtering HTTP Requests and Responses. Criteria are AND based, and use python regular expressions for string comparison @@ -48,7 +48,7 @@ public partial class MatchCriteria : IEquatable, IValidatableObje /// Has JSON path. /// Validates against passed JSON schema. /// If the proxy has NO traffic at all, return error (default to true). - public MatchCriteria(string url = default(string), string page = default(string), string status = default(string), string content = default(string), string contentType = default(string), string websocketMessage = default(string), NameValuePair requestHeader = default(NameValuePair), NameValuePair requestCookie = default(NameValuePair), NameValuePair responseHeader = default(NameValuePair), NameValuePair responseCookie = default(NameValuePair), bool jsonValid = default(bool), string jsonPath = default(string), string jsonSchema = default(string), bool errorIfNoTraffic = true) + public MatchCriteria(string url = default(string), string page = default(string), string status = default(string), string content = default(string), string contentType = default(string), string websocketMessage = default(string), MatchCriteriaRequestHeader requestHeader = default(MatchCriteriaRequestHeader), MatchCriteriaRequestHeader requestCookie = default(MatchCriteriaRequestHeader), MatchCriteriaRequestHeader responseHeader = default(MatchCriteriaRequestHeader), MatchCriteriaRequestHeader responseCookie = default(MatchCriteriaRequestHeader), bool jsonValid = default(bool), string jsonPath = default(string), string jsonSchema = default(string), bool errorIfNoTraffic = true) { this.Url = url; this.Page = page; @@ -112,25 +112,25 @@ public partial class MatchCriteria : IEquatable, IValidatableObje /// Gets or Sets RequestHeader /// [DataMember(Name = "request_header", EmitDefaultValue = false)] - public NameValuePair RequestHeader { get; set; } + public MatchCriteriaRequestHeader RequestHeader { get; set; } /// /// Gets or Sets RequestCookie /// [DataMember(Name = "request_cookie", EmitDefaultValue = false)] - public NameValuePair RequestCookie { get; set; } + public MatchCriteriaRequestHeader RequestCookie { get; set; } /// /// Gets or Sets ResponseHeader /// [DataMember(Name = "response_header", EmitDefaultValue = false)] - public NameValuePair ResponseHeader { get; set; } + public MatchCriteriaRequestHeader ResponseHeader { get; set; } /// /// Gets or Sets ResponseCookie /// [DataMember(Name = "response_cookie", EmitDefaultValue = false)] - public NameValuePair ResponseCookie { get; set; } + public MatchCriteriaRequestHeader ResponseCookie { get; set; } /// /// Is valid JSON @@ -355,7 +355,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/MatchCriteriaRequestHeader.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/MatchCriteriaRequestHeader.cs similarity index 93% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/MatchCriteriaRequestHeader.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/MatchCriteriaRequestHeader.cs index c89a91a1a7..d66c059605 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/MatchCriteriaRequestHeader.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/MatchCriteriaRequestHeader.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// MatchCriteriaRequestHeader @@ -139,7 +139,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Counter.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/Metric.cs similarity index 73% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Counter.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/Metric.cs index 1c8b3b0c94..2474feca21 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Counter.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/Metric.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,38 +21,38 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// - /// Counter + /// Metric /// - [DataContract(Name = "Counter")] - public partial class Counter : IEquatable, IValidatableObject + [DataContract(Name = "Metric")] + public partial class Metric : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// Name of Custom Counter to add to the page under _counters. - /// Value for the counter. - public Counter(string name = default(string), double value = default(double)) + /// Name of Custom Metric to add to the page under _metrics. + /// Value for the metric. + public Metric(string name = default(string), double value = default(double)) { this.Name = name; this.Value = value; } /// - /// Name of Custom Counter to add to the page under _counters + /// Name of Custom Metric to add to the page under _metrics /// - /// Name of Custom Counter to add to the page under _counters + /// Name of Custom Metric to add to the page under _metrics [DataMember(Name = "name", EmitDefaultValue = false)] public string Name { get; set; } /// - /// Value for the counter + /// Value for the metric /// - /// Value for the counter + /// Value for the metric [DataMember(Name = "value", EmitDefaultValue = false)] public double Value { get; set; } @@ -63,7 +63,7 @@ public partial class Counter : IEquatable, IValidatableObject public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class Counter {\n"); + sb.Append("class Metric {\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); sb.Append("}\n"); @@ -86,15 +86,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as Counter); + return this.Equals(input as Metric); } /// - /// Returns true if Counter instances are equal + /// Returns true if Metric instances are equal /// - /// Instance of Counter to be compared + /// Instance of Metric to be compared /// Boolean - public bool Equals(Counter input) + public bool Equals(Metric input) { if (input == null) { @@ -135,7 +135,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/NameValuePair.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/NameValuePair.cs similarity index 93% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/NameValuePair.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/NameValuePair.cs index e8793fd87b..f89ec9915e 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/NameValuePair.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/NameValuePair.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// NameValuePair @@ -139,7 +139,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Page.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/Page.cs similarity index 87% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Page.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/Page.cs index 2b5001b9ed..7005382561 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/Page.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/Page.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// Page @@ -46,11 +46,11 @@ protected Page() /// id (required). /// title (required). /// verifications. - /// counters. + /// metrics. /// errors. /// pageTimings (required). /// comment. - public Page(DateTime startedDateTime = default(DateTime), string id = default(string), string title = default(string), List verifications = default(List), List counters = default(List), List errors = default(List), PageTimings pageTimings = default(PageTimings), string comment = default(string)) : base() + public Page(DateTime startedDateTime = default(DateTime), string id = default(string), string title = default(string), List verifications = default(List), List metrics = default(List), List errors = default(List), PageTimings pageTimings = default(PageTimings), string comment = default(string)) : base() { this.StartedDateTime = startedDateTime; // to ensure "id" is required (not null) @@ -72,7 +72,7 @@ protected Page() } this.PageTimings = pageTimings; this.Verifications = verifications; - this.Counters = counters; + this.Metrics = metrics; this.Errors = errors; this.Comment = comment; this.AdditionalProperties = new Dictionary(); @@ -103,10 +103,10 @@ protected Page() public List Verifications { get; set; } /// - /// Gets or Sets Counters + /// Gets or Sets Metrics /// - [DataMember(Name = "_counters", EmitDefaultValue = false)] - public List Counters { get; set; } + [DataMember(Name = "_metrics", EmitDefaultValue = false)] + public List Metrics { get; set; } /// /// Gets or Sets Errors @@ -145,7 +145,7 @@ public override string ToString() sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Title: ").Append(Title).Append("\n"); sb.Append(" Verifications: ").Append(Verifications).Append("\n"); - sb.Append(" Counters: ").Append(Counters).Append("\n"); + sb.Append(" Metrics: ").Append(Metrics).Append("\n"); sb.Append(" Errors: ").Append(Errors).Append("\n"); sb.Append(" PageTimings: ").Append(PageTimings).Append("\n"); sb.Append(" Comment: ").Append(Comment).Append("\n"); @@ -207,10 +207,10 @@ public bool Equals(Page input) this.Verifications.SequenceEqual(input.Verifications) ) && base.Equals(input) && ( - this.Counters == input.Counters || - this.Counters != null && - input.Counters != null && - this.Counters.SequenceEqual(input.Counters) + this.Metrics == input.Metrics || + this.Metrics != null && + input.Metrics != null && + this.Metrics.SequenceEqual(input.Metrics) ) && base.Equals(input) && ( this.Errors == input.Errors || @@ -256,9 +256,9 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Verifications.GetHashCode(); } - if (this.Counters != null) + if (this.Metrics != null) { - hashCode = (hashCode * 59) + this.Counters.GetHashCode(); + hashCode = (hashCode * 59) + this.Metrics.GetHashCode(); } if (this.Errors != null) { @@ -285,17 +285,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/PageTiming.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/PageTiming.cs similarity index 97% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/PageTiming.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/PageTiming.cs index d86ca8ca5c..45a76b2100 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/PageTiming.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/PageTiming.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// PageTiming @@ -285,7 +285,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/PageTimings.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/PageTimings.cs similarity index 93% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/PageTimings.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/PageTimings.cs index 3389605f1d..9357722335 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/PageTimings.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/PageTimings.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// PageTimings @@ -55,12 +55,12 @@ protected PageTimings() /// domInteractive (default to -1). /// firstContentfulPaint (default to -1). /// comment. - public PageTimings(long onContentLoad = -1, long onLoad = -1, string href = @"", long dns = -1, long ssl = -1, long timeToFirstByte = -1, float cumulativeLayoutShift = -1F, LargestContentfulPaint largestContentfulPaint = default(LargestContentfulPaint), long firstPaint = -1, float firstInputDelay = -1F, long domInteractive = -1, long firstContentfulPaint = -1, string comment = default(string)) : base() + public PageTimings(long onContentLoad = -1, long onLoad = -1, string href = "", long dns = -1, long ssl = -1, long timeToFirstByte = -1, float cumulativeLayoutShift = -1F, LargestContentfulPaint largestContentfulPaint = default(LargestContentfulPaint), long firstPaint = -1, float firstInputDelay = -1F, long domInteractive = -1, long firstContentfulPaint = -1, string comment = default(string)) : base() { this.OnContentLoad = onContentLoad; this.OnLoad = onLoad; // use default value if no "href" provided - this.Href = href ?? @""; + this.Href = href ?? ""; this.Dns = dns; this.Ssl = ssl; this.TimeToFirstByte = timeToFirstByte; @@ -318,17 +318,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { // OnContentLoad (long) minimum if (this.OnContentLoad < (long)-1) diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/VerifyResult.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/VerifyResult.cs similarity index 94% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/VerifyResult.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/VerifyResult.cs index 7eee46095c..5eff19035b 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/VerifyResult.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/VerifyResult.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// VerifyResult @@ -154,7 +154,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/WebSocketMessage.cs b/clients/csharp/src/BrowserUpMitmProxyClient/Model/WebSocketMessage.cs similarity index 95% rename from clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/WebSocketMessage.cs rename to clients/csharp/src/BrowserUpMitmProxyClient/Model/WebSocketMessage.cs index b4ee41bf49..e03713006a 100644 --- a/clients/csharp/src/BrowserUp.Mitmproxy.Client/Model/WebSocketMessage.cs +++ b/clients/csharp/src/BrowserUpMitmProxyClient/Model/WebSocketMessage.cs @@ -3,7 +3,7 @@ * * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -21,9 +21,9 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = BrowserUp.Mitmproxy.Client.Client.OpenAPIDateConverter; +using OpenAPIDateConverter = BrowserUpMitmProxyClient.Client.OpenAPIDateConverter; -namespace BrowserUp.Mitmproxy.Client.Model +namespace BrowserUpMitmProxyClient.Model { /// /// WebSocketMessage @@ -180,7 +180,7 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public IEnumerable Validate(ValidationContext validationContext) { yield break; } diff --git a/clients/java/.openapi-generator/FILES b/clients/java/.openapi-generator/FILES index 1fba6c8aa4..2804164d4a 100644 --- a/clients/java/.openapi-generator/FILES +++ b/clients/java/.openapi-generator/FILES @@ -1,5 +1,6 @@ .github/workflows/maven.yml .gitignore +.openapi-generator-ignore .travis.yml README.md api/openapi.yaml @@ -7,12 +8,12 @@ build.gradle build.sbt docs/Action.md docs/BrowserUpProxyApi.md -docs/Counter.md docs/Error.md docs/Har.md docs/HarEntry.md docs/HarEntryCache.md docs/HarEntryCacheBeforeRequest.md +docs/HarEntryCacheBeforeRequestOneOf.md docs/HarEntryRequest.md docs/HarEntryRequestCookiesInner.md docs/HarEntryRequestPostData.md @@ -26,6 +27,8 @@ docs/HarLogCreator.md docs/Header.md docs/LargestContentfulPaint.md docs/MatchCriteria.md +docs/MatchCriteriaRequestHeader.md +docs/Metric.md docs/NameValuePair.md docs/Page.md docs/PageTiming.md @@ -49,13 +52,13 @@ src/main/java/com/browserup/proxy_client/ApiClient.java src/main/java/com/browserup/proxy_client/ApiException.java src/main/java/com/browserup/proxy_client/ApiResponse.java src/main/java/com/browserup/proxy_client/Configuration.java -src/main/java/com/browserup/proxy_client/Counter.java src/main/java/com/browserup/proxy_client/Error.java src/main/java/com/browserup/proxy_client/GzipRequestInterceptor.java src/main/java/com/browserup/proxy_client/Har.java src/main/java/com/browserup/proxy_client/HarEntry.java src/main/java/com/browserup/proxy_client/HarEntryCache.java src/main/java/com/browserup/proxy_client/HarEntryCacheBeforeRequest.java +src/main/java/com/browserup/proxy_client/HarEntryCacheBeforeRequestOneOf.java src/main/java/com/browserup/proxy_client/HarEntryRequest.java src/main/java/com/browserup/proxy_client/HarEntryRequestCookiesInner.java src/main/java/com/browserup/proxy_client/HarEntryRequestPostData.java @@ -70,6 +73,8 @@ src/main/java/com/browserup/proxy_client/Header.java src/main/java/com/browserup/proxy_client/JSON.java src/main/java/com/browserup/proxy_client/LargestContentfulPaint.java src/main/java/com/browserup/proxy_client/MatchCriteria.java +src/main/java/com/browserup/proxy_client/MatchCriteriaRequestHeader.java +src/main/java/com/browserup/proxy_client/Metric.java src/main/java/com/browserup/proxy_client/NameValuePair.java src/main/java/com/browserup/proxy_client/Page.java src/main/java/com/browserup/proxy_client/PageTiming.java @@ -86,3 +91,32 @@ src/main/java/com/browserup/proxy_client/auth/ApiKeyAuth.java src/main/java/com/browserup/proxy_client/auth/Authentication.java src/main/java/com/browserup/proxy_client/auth/HttpBasicAuth.java src/main/java/com/browserup/proxy_client/auth/HttpBearerAuth.java +src/test/java/com/browserup/proxy/api/BrowserUpProxyApiTest.java +src/test/java/com/browserup/proxy_client/ActionTest.java +src/test/java/com/browserup/proxy_client/ErrorTest.java +src/test/java/com/browserup/proxy_client/HarEntryCacheBeforeRequestOneOfTest.java +src/test/java/com/browserup/proxy_client/HarEntryCacheBeforeRequestTest.java +src/test/java/com/browserup/proxy_client/HarEntryCacheTest.java +src/test/java/com/browserup/proxy_client/HarEntryRequestCookiesInnerTest.java +src/test/java/com/browserup/proxy_client/HarEntryRequestPostDataParamsInnerTest.java +src/test/java/com/browserup/proxy_client/HarEntryRequestPostDataTest.java +src/test/java/com/browserup/proxy_client/HarEntryRequestQueryStringInnerTest.java +src/test/java/com/browserup/proxy_client/HarEntryRequestTest.java +src/test/java/com/browserup/proxy_client/HarEntryResponseContentTest.java +src/test/java/com/browserup/proxy_client/HarEntryResponseTest.java +src/test/java/com/browserup/proxy_client/HarEntryTest.java +src/test/java/com/browserup/proxy_client/HarEntryTimingsTest.java +src/test/java/com/browserup/proxy_client/HarLogCreatorTest.java +src/test/java/com/browserup/proxy_client/HarLogTest.java +src/test/java/com/browserup/proxy_client/HarTest.java +src/test/java/com/browserup/proxy_client/HeaderTest.java +src/test/java/com/browserup/proxy_client/LargestContentfulPaintTest.java +src/test/java/com/browserup/proxy_client/MatchCriteriaRequestHeaderTest.java +src/test/java/com/browserup/proxy_client/MatchCriteriaTest.java +src/test/java/com/browserup/proxy_client/MetricTest.java +src/test/java/com/browserup/proxy_client/NameValuePairTest.java +src/test/java/com/browserup/proxy_client/PageTest.java +src/test/java/com/browserup/proxy_client/PageTimingTest.java +src/test/java/com/browserup/proxy_client/PageTimingsTest.java +src/test/java/com/browserup/proxy_client/VerifyResultTest.java +src/test/java/com/browserup/proxy_client/WebSocketMessageTest.java diff --git a/clients/java/.openapi-generator/VERSION b/clients/java/.openapi-generator/VERSION index 4122521804..c0be8a7992 100644 --- a/clients/java/.openapi-generator/VERSION +++ b/clients/java/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.0 \ No newline at end of file +6.4.0 \ No newline at end of file diff --git a/clients/java/README.md b/clients/java/README.md index 76a1bb7fee..a3b8b07c97 100644 --- a/clients/java/README.md +++ b/clients/java/README.md @@ -1,7 +1,7 @@ # browserup-mitmproxy-client BrowserUp MitmProxy -- API version: 1.0.0 +- API version: 1.24 ___ This is the REST API for controlling the BrowserUp MitmProxy. @@ -96,11 +96,11 @@ public class Example { defaultClient.setBasePath("http://localhost:48088"); BrowserUpProxyApi apiInstance = new BrowserUpProxyApi(defaultClient); - Counter counter = new Counter(); // Counter | Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key + Error error = new Error(); // Error | Receives an error to track. Internally, the error is stored in an array in the har under the _errors key try { - apiInstance.addCounter(counter); + apiInstance.addError(error); } catch (ApiException e) { - System.err.println("Exception when calling BrowserUpProxyApi#addCounter"); + System.err.println("Exception when calling BrowserUpProxyApi#addError"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -117,8 +117,8 @@ All URIs are relative to *http://localhost:48088* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*BrowserUpProxyApi* | [**addCounter**](docs/BrowserUpProxyApi.md#addCounter) | **POST** /har/counters | *BrowserUpProxyApi* | [**addError**](docs/BrowserUpProxyApi.md#addError) | **POST** /har/errors | +*BrowserUpProxyApi* | [**addMetric**](docs/BrowserUpProxyApi.md#addMetric) | **POST** /har/metrics | *BrowserUpProxyApi* | [**getHarLog**](docs/BrowserUpProxyApi.md#getHarLog) | **GET** /har | *BrowserUpProxyApi* | [**healthcheck**](docs/BrowserUpProxyApi.md#healthcheck) | **GET** /healthcheck | *BrowserUpProxyApi* | [**newPage**](docs/BrowserUpProxyApi.md#newPage) | **POST** /har/page | @@ -132,12 +132,12 @@ Class | Method | HTTP request | Description ## Documentation for Models - [Action](docs/Action.md) - - [Counter](docs/Counter.md) - [Error](docs/Error.md) - [Har](docs/Har.md) - [HarEntry](docs/HarEntry.md) - [HarEntryCache](docs/HarEntryCache.md) - [HarEntryCacheBeforeRequest](docs/HarEntryCacheBeforeRequest.md) + - [HarEntryCacheBeforeRequestOneOf](docs/HarEntryCacheBeforeRequestOneOf.md) - [HarEntryRequest](docs/HarEntryRequest.md) - [HarEntryRequestCookiesInner](docs/HarEntryRequestCookiesInner.md) - [HarEntryRequestPostData](docs/HarEntryRequestPostData.md) @@ -151,6 +151,8 @@ Class | Method | HTTP request | Description - [Header](docs/Header.md) - [LargestContentfulPaint](docs/LargestContentfulPaint.md) - [MatchCriteria](docs/MatchCriteria.md) + - [MatchCriteriaRequestHeader](docs/MatchCriteriaRequestHeader.md) + - [Metric](docs/Metric.md) - [NameValuePair](docs/NameValuePair.md) - [Page](docs/Page.md) - [PageTiming](docs/PageTiming.md) @@ -159,11 +161,10 @@ Class | Method | HTTP request | Description - [WebSocketMessage](docs/WebSocketMessage.md) - ## Documentation for Authorization -Endpoints do not require authorization. - +All endpoints do not require authorization. +Authentication schemes defined for the API: ## Recommendation diff --git a/clients/java/api/openapi.yaml b/clients/java/api/openapi.yaml index d6c63b5c62..04e7a6f573 100644 --- a/clients/java/api/openapi.yaml +++ b/clients/java/api/openapi.yaml @@ -7,7 +7,7 @@ info: captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ title: BrowserUp MitmProxy - version: 1.0.0 + version: "1.24" x-logo: url: logo.png servers: @@ -250,23 +250,23 @@ paths: - BrowserUpProxy x-content-type: application/json x-accepts: application/json - /har/counters: + /har/metrics: post: - description: Add Custom Counter to the captured traffic har - operationId: addCounter + description: Add Custom Metric to the captured traffic har + operationId: addMetric requestBody: content: application/json: schema: - $ref: '#/components/schemas/Counter' - description: "Receives a new counter to add. The counter is stored, under\ - \ the hood, in an array in the har under the _counters key" + $ref: '#/components/schemas/Metric' + description: "Receives a new metric to add. The metric is stored, under the\ + \ hood, in an array in the har under the _metrics key" required: true responses: "204": - description: The counter was added. + description: The metric was added. "422": - description: The counter was invalid. + description: The metric was invalid. tags: - BrowserUpProxy x-content-type: application/json @@ -336,15 +336,15 @@ components: A set of criteria for filtering HTTP Requests and Responses. Criteria are AND based, and use python regular expressions for string comparison example: - request_cookie: "" - response_cookie: "" + request_cookie: null + response_cookie: null json_path: json_path error_if_no_traffic: true url: url content: content - response_header: "" + response_header: null content_type: content_type - request_header: "" + request_header: null json_schema: json_schema json_valid: true page: page @@ -388,29 +388,13 @@ components: url: https://docs.python.org/3/howto/regex.html type: string request_header: - allOf: - - $ref: '#/components/schemas/NameValuePair' - externalDocs: - description: Python Regex - url: https://docs.python.org/3/howto/regex.html + $ref: '#/components/schemas/MatchCriteria_request_header' request_cookie: - allOf: - - $ref: '#/components/schemas/NameValuePair' - externalDocs: - description: Python Regex - url: https://docs.python.org/3/howto/regex.html + $ref: '#/components/schemas/MatchCriteria_request_header' response_header: - allOf: - - $ref: '#/components/schemas/NameValuePair' - externalDocs: - description: Python Regex - url: https://docs.python.org/3/howto/regex.html + $ref: '#/components/schemas/MatchCriteria_request_header' response_cookie: - allOf: - - $ref: '#/components/schemas/NameValuePair' - externalDocs: - description: Python Regex - url: https://docs.python.org/3/howto/regex.html + $ref: '#/components/schemas/MatchCriteria_request_header' json_valid: description: Is valid JSON type: boolean @@ -453,16 +437,16 @@ components: description: Short details of the error type: string type: object - Counter: + Metric: example: name: name value: 0.8008281904610115 properties: name: - description: Name of Custom Counter to add to the page under _counters + description: Name of Custom Metric to add to the page under _metrics type: string value: - description: Value for the counter + description: Value for the metric format: double type: number type: object @@ -494,9 +478,9 @@ components: WebSocketMessage: example: data: data - time: 7.058770351582356 + time: 0.8851374739011653 type: type - opcode: 0.8851374739011653 + opcode: 7.143538047012306 properties: type: type: string @@ -674,7 +658,7 @@ components: comment: comment value: value contentType: contentType - url: https://openapi-generator.tech + url: url cookies: - path: path expires: expires @@ -693,28 +677,18 @@ components: secure: true value: value cache: - afterRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment + afterRequest: null comment: comment - beforeRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment + beforeRequest: null _webSocketMessages: - data: data - time: 7.058770351582356 + time: 0.8851374739011653 type: type - opcode: 0.8851374739011653 + opcode: 7.143538047012306 - data: data - time: 7.058770351582356 + time: 0.8851374739011653 type: type - opcode: 0.8851374739011653 + opcode: 7.143538047012306 response: headers: - name: name @@ -811,7 +785,7 @@ components: comment: comment value: value contentType: contentType - url: https://openapi-generator.tech + url: url cookies: - path: path expires: expires @@ -830,28 +804,18 @@ components: secure: true value: value cache: - afterRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment + afterRequest: null comment: comment - beforeRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment + beforeRequest: null _webSocketMessages: - data: data - time: 7.058770351582356 + time: 0.8851374739011653 type: type - opcode: 0.8851374739011653 + opcode: 7.143538047012306 - data: data - time: 7.058770351582356 + time: 0.8851374739011653 type: type - opcode: 0.8851374739011653 + opcode: 7.143538047012306 response: headers: - name: name @@ -943,7 +907,7 @@ components: name: name type: type title: title - _counters: + _metrics: - name: name value: 0.8008281904610115 - name: name @@ -982,7 +946,7 @@ components: name: name type: type title: title - _counters: + _metrics: - name: name value: 0.8008281904610115 - name: name @@ -1041,7 +1005,7 @@ components: comment: comment value: value contentType: contentType - url: https://openapi-generator.tech + url: url cookies: - path: path expires: expires @@ -1060,28 +1024,18 @@ components: secure: true value: value cache: - afterRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment + afterRequest: null comment: comment - beforeRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment + beforeRequest: null _webSocketMessages: - data: data - time: 7.058770351582356 + time: 0.8851374739011653 type: type - opcode: 0.8851374739011653 + opcode: 7.143538047012306 - data: data - time: 7.058770351582356 + time: 0.8851374739011653 type: type - opcode: 0.8851374739011653 + opcode: 7.143538047012306 response: headers: - name: name @@ -1214,7 +1168,7 @@ components: name: name type: type title: title - _counters: + _metrics: - name: name value: 0.8008281904610115 - name: name @@ -1237,10 +1191,10 @@ components: items: $ref: '#/components/schemas/VerifyResult' type: array - _counters: + _metrics: default: [] items: - $ref: '#/components/schemas/Counter' + $ref: '#/components/schemas/Metric' type: array _errors: default: [] @@ -1257,6 +1211,12 @@ components: - startedDateTime - title type: object + MatchCriteria_request_header: + allOf: + - $ref: '#/components/schemas/NameValuePair' + externalDocs: + description: Python Regex + url: https://docs.python.org/3/howto/regex.html Har_log_creator: example: name: name @@ -1315,7 +1275,7 @@ components: comment: comment value: value contentType: contentType - url: https://openapi-generator.tech + url: url cookies: - path: path expires: expires @@ -1334,28 +1294,18 @@ components: secure: true value: value cache: - afterRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment + afterRequest: null comment: comment - beforeRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment + beforeRequest: null _webSocketMessages: - data: data - time: 7.058770351582356 + time: 0.8851374739011653 type: type - opcode: 0.8851374739011653 + opcode: 7.143538047012306 - data: data - time: 7.058770351582356 + time: 0.8851374739011653 type: type - opcode: 0.8851374739011653 + opcode: 7.143538047012306 response: headers: - name: name @@ -1452,7 +1402,7 @@ components: comment: comment value: value contentType: contentType - url: https://openapi-generator.tech + url: url cookies: - path: path expires: expires @@ -1471,28 +1421,18 @@ components: secure: true value: value cache: - afterRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment + afterRequest: null comment: comment - beforeRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment + beforeRequest: null _webSocketMessages: - data: data - time: 7.058770351582356 + time: 0.8851374739011653 type: type - opcode: 0.8851374739011653 + opcode: 7.143538047012306 - data: data - time: 7.058770351582356 + time: 0.8851374739011653 type: type - opcode: 0.8851374739011653 + opcode: 7.143538047012306 response: headers: - name: name @@ -1584,7 +1524,7 @@ components: name: name type: type title: title - _counters: + _metrics: - name: name value: 0.8008281904610115 - name: name @@ -1623,7 +1563,7 @@ components: name: name type: type title: title - _counters: + _metrics: - name: name value: 0.8008281904610115 - name: name @@ -1794,7 +1734,7 @@ components: comment: comment value: value contentType: contentType - url: https://openapi-generator.tech + url: url cookies: - path: path expires: expires @@ -1816,7 +1756,6 @@ components: method: type: string url: - format: uri type: string httpVersion: type: string @@ -2008,14 +1947,7 @@ components: - status - statusText type: object - HarEntry_cache_beforeRequest: - example: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment - nullable: true + HarEntry_cache_beforeRequest_oneOf: properties: expires: type: string @@ -2032,21 +1964,15 @@ components: - hitCount - lastAccess type: object + HarEntry_cache_beforeRequest: + oneOf: + - type: "null" + - $ref: '#/components/schemas/HarEntry_cache_beforeRequest_oneOf' HarEntry_cache: example: - afterRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment + afterRequest: null comment: comment - beforeRequest: - expires: expires - hitCount: 2 - lastAccess: lastAccess - eTag: eTag - comment: comment + beforeRequest: null properties: beforeRequest: $ref: '#/components/schemas/HarEntry_cache_beforeRequest' diff --git a/clients/java/build.gradle b/clients/java/build.gradle index 8c25c48857..588f8560a1 100644 --- a/clients/java/build.gradle +++ b/clients/java/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'com.browserup' -version = '1.1.5-SNAPSHOT' +version = '1.1.4-SNAPSHOT' buildscript { repositories { @@ -88,9 +88,51 @@ if(hasProperty('target') && target == 'android') { publishing { publications { - maven(MavenPublication) { - artifactId = 'browserup-mitmproxy-client' - from components.java + PubToSonatype(MavenPublication) { + groupId = 'com.browserup' + artifactId = 'browserup-mitmproxy-client' + version = project.version + from components.java + + pom { + name = 'browserup-mitmproxy-client' + description = 'BrowserUp Proxy Client' + url = 'https://github.com/browserup/mitmproxy' + packaging = 'jar' + + scm { + connection = 'scm:git:git.com:browserup/mitmproxy.git' + developerConnection = 'scm:git:git.com:browserup/mitmproxy.git' + url = 'https://github.com/browserup/mitmproxy/tree/main/clients/java' + } + licenses { + license { + name = 'The Apache Software License, Version 2.0' + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + distribution = 'repo' + } + } + developers { + developer { + id = 'browserup' + name = 'BrowserUp, Inc.' + email = 'developers.com' + } + } + } + } + } + repositories { + maven { + if (project.hasProperty("ossrhUsername") && project.hasProperty("ossrhPassword")) { + credentials { + username = ossrhUsername + password = ossrhPassword + } + def releaseRepository = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2") + def snapshotRepository = uri("https://oss.sonatype.org/content/repositories/snapshots") + url = version.endsWith('SNAPSHOT') ? snapshotRepository : releaseRepository + } } } } @@ -114,7 +156,7 @@ dependencies { implementation 'io.gsonfire:gson-fire:1.8.5' implementation 'javax.ws.rs:jsr311-api:1.1.1' implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' - implementation 'org.openapitools:jackson-databind-nullable:0.2.6' + implementation 'org.openapitools:jackson-databind-nullable:0.2.4' implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1' diff --git a/clients/java/build.sbt b/clients/java/build.sbt index 4203820d6e..917606cc3d 100644 --- a/clients/java/build.sbt +++ b/clients/java/build.sbt @@ -16,7 +16,7 @@ lazy val root = (project in file(".")). "org.apache.commons" % "commons-lang3" % "3.12.0", "javax.ws.rs" % "jsr311-api" % "1.1.1", "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", - "org.openapitools" % "jackson-databind-nullable" % "0.2.6", + "org.openapitools" % "jackson-databind-nullable" % "0.2.4", "io.gsonfire" % "gson-fire" % "1.8.5" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", diff --git a/clients/java/docs/BrowserUpProxyApi.md b/clients/java/docs/BrowserUpProxyApi.md index 322cc72369..061fea4e43 100644 --- a/clients/java/docs/BrowserUpProxyApi.md +++ b/clients/java/docs/BrowserUpProxyApi.md @@ -4,8 +4,8 @@ All URIs are relative to *http://localhost:48088* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**addCounter**](BrowserUpProxyApi.md#addCounter) | **POST** /har/counters | | | [**addError**](BrowserUpProxyApi.md#addError) | **POST** /har/errors | | +| [**addMetric**](BrowserUpProxyApi.md#addMetric) | **POST** /har/metrics | | | [**getHarLog**](BrowserUpProxyApi.md#getHarLog) | **GET** /har | | | [**healthcheck**](BrowserUpProxyApi.md#healthcheck) | **GET** /healthcheck | | | [**newPage**](BrowserUpProxyApi.md#newPage) | **POST** /har/page | | @@ -16,13 +16,13 @@ All URIs are relative to *http://localhost:48088* | [**verifySize**](BrowserUpProxyApi.md#verifySize) | **POST** /verify/size/{size}/{name} | | - -# **addCounter** -> addCounter(counter) + +# **addError** +> addError(error) -Add Custom Counter to the captured traffic har +Add Custom Error to the captured traffic har ### Example ```java @@ -39,11 +39,11 @@ public class Example { defaultClient.setBasePath("http://localhost:48088"); BrowserUpProxyApi apiInstance = new BrowserUpProxyApi(defaultClient); - Counter counter = new Counter(); // Counter | Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key + Error error = new Error(); // Error | Receives an error to track. Internally, the error is stored in an array in the har under the _errors key try { - apiInstance.addCounter(counter); + apiInstance.addError(error); } catch (ApiException e) { - System.err.println("Exception when calling BrowserUpProxyApi#addCounter"); + System.err.println("Exception when calling BrowserUpProxyApi#addError"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -57,7 +57,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **counter** | [**Counter**](Counter.md)| Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key | | +| **error** | [**Error**](Error.md)| Receives an error to track. Internally, the error is stored in an array in the har under the _errors key | | ### Return type @@ -75,16 +75,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | The counter was added. | - | -| **422** | The counter was invalid. | - | +| **204** | The Error was added. | - | +| **422** | The Error was invalid. | - | - -# **addError** -> addError(error) + +# **addMetric** +> addMetric(metric) -Add Custom Error to the captured traffic har +Add Custom Metric to the captured traffic har ### Example ```java @@ -101,11 +101,11 @@ public class Example { defaultClient.setBasePath("http://localhost:48088"); BrowserUpProxyApi apiInstance = new BrowserUpProxyApi(defaultClient); - Error error = new Error(); // Error | Receives an error to track. Internally, the error is stored in an array in the har under the _errors key + Metric metric = new Metric(); // Metric | Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key try { - apiInstance.addError(error); + apiInstance.addMetric(metric); } catch (ApiException e) { - System.err.println("Exception when calling BrowserUpProxyApi#addError"); + System.err.println("Exception when calling BrowserUpProxyApi#addMetric"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -119,7 +119,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **error** | [**Error**](Error.md)| Receives an error to track. Internally, the error is stored in an array in the har under the _errors key | | +| **metric** | [**Metric**](Metric.md)| Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key | | ### Return type @@ -137,10 +137,10 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | The Error was added. | - | -| **422** | The Error was invalid. | - | +| **204** | The metric was added. | - | +| **422** | The metric was invalid. | - | - + # **getHarLog** > Har getHarLog() @@ -198,7 +198,7 @@ No authorization required |-------------|-------------|------------------| | **200** | The current Har file. | - | - + # **healthcheck** > healthcheck() @@ -255,7 +255,7 @@ No authorization required |-------------|-------------|------------------| | **200** | OK means all is well. | - | - + # **newPage** > Har newPage(title) @@ -317,7 +317,7 @@ No authorization required |-------------|-------------|------------------| | **200** | The current Har file. | - | - + # **resetHarLog** > Har resetHarLog() @@ -375,7 +375,7 @@ No authorization required |-------------|-------------|------------------| | **200** | The current Har file. | - | - + # **verifyNotPresent** > VerifyResult verifyNotPresent(name, matchCriteria) @@ -440,7 +440,7 @@ No authorization required | **200** | The traffic had no matching items | - | | **422** | The MatchCriteria are invalid. | - | - + # **verifyPresent** > VerifyResult verifyPresent(name, matchCriteria) @@ -505,7 +505,7 @@ No authorization required | **200** | The traffic conformed to the time criteria. | - | | **422** | The MatchCriteria are invalid. | - | - + # **verifySLA** > VerifyResult verifySLA(time, name, matchCriteria) @@ -572,7 +572,7 @@ No authorization required | **200** | The traffic conformed to the time criteria. | - | | **422** | The MatchCriteria are invalid. | - | - + # **verifySize** > VerifyResult verifySize(size, name, matchCriteria) diff --git a/clients/java/docs/Counter.md b/clients/java/docs/Counter.md deleted file mode 100644 index b48974dcd2..0000000000 --- a/clients/java/docs/Counter.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# Counter - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | Name of Custom Counter to add to the page under _counters | [optional] | -|**value** | **Double** | Value for the counter | [optional] | - - - diff --git a/clients/java/docs/HarEntryRequest.md b/clients/java/docs/HarEntryRequest.md index 2ca40102e9..31c784d0c5 100644 --- a/clients/java/docs/HarEntryRequest.md +++ b/clients/java/docs/HarEntryRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**method** | **String** | | | -|**url** | **URI** | | | +|**url** | **String** | | | |**httpVersion** | **String** | | | |**cookies** | [**List<HarEntryRequestCookiesInner>**](HarEntryRequestCookiesInner.md) | | | |**headers** | [**List<Header>**](Header.md) | | | diff --git a/clients/java/docs/MatchCriteria.md b/clients/java/docs/MatchCriteria.md index 0f8e959650..233045b7a9 100644 --- a/clients/java/docs/MatchCriteria.md +++ b/clients/java/docs/MatchCriteria.md @@ -14,10 +14,10 @@ A set of criteria for filtering HTTP Requests and Responses. |**content** | **String** | Body content regexp content to match | [optional] | |**contentType** | **String** | Content type | [optional] | |**websocketMessage** | **String** | Websocket message text to match | [optional] | -|**requestHeader** | [**NameValuePair**](NameValuePair.md) | | [optional] | -|**requestCookie** | [**NameValuePair**](NameValuePair.md) | | [optional] | -|**responseHeader** | [**NameValuePair**](NameValuePair.md) | | [optional] | -|**responseCookie** | [**NameValuePair**](NameValuePair.md) | | [optional] | +|**requestHeader** | [**MatchCriteriaRequestHeader**](MatchCriteriaRequestHeader.md) | | [optional] | +|**requestCookie** | [**MatchCriteriaRequestHeader**](MatchCriteriaRequestHeader.md) | | [optional] | +|**responseHeader** | [**MatchCriteriaRequestHeader**](MatchCriteriaRequestHeader.md) | | [optional] | +|**responseCookie** | [**MatchCriteriaRequestHeader**](MatchCriteriaRequestHeader.md) | | [optional] | |**jsonValid** | **Boolean** | Is valid JSON | [optional] | |**jsonPath** | **String** | Has JSON path | [optional] | |**jsonSchema** | **String** | Validates against passed JSON schema | [optional] | diff --git a/clients/java/docs/Metric.md b/clients/java/docs/Metric.md new file mode 100644 index 0000000000..e84b32f6d5 --- /dev/null +++ b/clients/java/docs/Metric.md @@ -0,0 +1,14 @@ + + +# Metric + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of Custom Metric to add to the page under _metrics | [optional] | +|**value** | **Double** | Value for the metric | [optional] | + + + diff --git a/clients/java/docs/Page.md b/clients/java/docs/Page.md index e871fbbde6..19b65f6387 100644 --- a/clients/java/docs/Page.md +++ b/clients/java/docs/Page.md @@ -11,7 +11,7 @@ |**id** | **String** | | | |**title** | **String** | | | |**verifications** | [**List<VerifyResult>**](VerifyResult.md) | | [optional] | -|**counters** | [**List<Counter>**](Counter.md) | | [optional] | +|**metrics** | [**List<Metric>**](Metric.md) | | [optional] | |**errors** | [**List<Error>**](Error.md) | | [optional] | |**pageTimings** | **PageTimings** | | | |**comment** | **String** | | [optional] | diff --git a/clients/java/pom.xml b/clients/java/pom.xml index cc1deb56cb..30211e5c14 100644 --- a/clients/java/pom.xml +++ b/clients/java/pom.xml @@ -336,10 +336,11 @@ ${java.version} ${java.version} 1.8.5 + 1.6.6 4.10.0 2.9.1 3.12.0 - 0.2.6 + 0.2.4 1.3.5 5.9.1 1.9.1 diff --git a/clients/java/src/main/java/com/browserup/proxy/api/BrowserUpProxyApi.java b/clients/java/src/main/java/com/browserup/proxy/api/BrowserUpProxyApi.java index 2f557b2783..c46960d488 100644 --- a/clients/java/src/main/java/com/browserup/proxy/api/BrowserUpProxyApi.java +++ b/clients/java/src/main/java/com/browserup/proxy/api/BrowserUpProxyApi.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,10 +27,10 @@ import java.io.IOException; -import com.browserup.proxy_client.Counter; import com.browserup.proxy_client.Error; import com.browserup.proxy_client.Har; import com.browserup.proxy_client.MatchCriteria; +import com.browserup.proxy_client.Metric; import com.browserup.proxy_client.VerifyResult; import java.lang.reflect.Type; @@ -38,6 +38,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.ws.rs.core.GenericType; public class BrowserUpProxyApi { private ApiClient localVarApiClient; @@ -77,19 +78,19 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for addCounter - * @param counter Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key (required) + * Build call for addError + * @param error Receives an error to track. Internally, the error is stored in an array in the har under the _errors key (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - + +
Status Code Description Response Headers
204 The counter was added. -
422 The counter was invalid. -
204 The Error was added. -
422 The Error was invalid. -
*/ - public okhttp3.Call addCounterCall(Counter counter, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addErrorCall(Error error, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -103,10 +104,10 @@ public okhttp3.Call addCounterCall(Counter counter, final ApiCallback _callback) basePath = null; } - Object localVarPostBody = counter; + Object localVarPostBody = error; // create path and map variables - String localVarPath = "/har/counters"; + String localVarPath = "/har/errors"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -134,84 +135,84 @@ public okhttp3.Call addCounterCall(Counter counter, final ApiCallback _callback) } @SuppressWarnings("rawtypes") - private okhttp3.Call addCounterValidateBeforeCall(Counter counter, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'counter' is set - if (counter == null) { - throw new ApiException("Missing the required parameter 'counter' when calling addCounter(Async)"); + private okhttp3.Call addErrorValidateBeforeCall(Error error, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'error' is set + if (error == null) { + throw new ApiException("Missing the required parameter 'error' when calling addError(Async)"); } - return addCounterCall(counter, _callback); + return addErrorCall(error, _callback); } /** * - * Add Custom Counter to the captured traffic har - * @param counter Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key (required) + * Add Custom Error to the captured traffic har + * @param error Receives an error to track. Internally, the error is stored in an array in the har under the _errors key (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - + +
Status Code Description Response Headers
204 The counter was added. -
422 The counter was invalid. -
204 The Error was added. -
422 The Error was invalid. -
*/ - public void addCounter(Counter counter) throws ApiException { - addCounterWithHttpInfo(counter); + public void addError(Error error) throws ApiException { + addErrorWithHttpInfo(error); } /** * - * Add Custom Counter to the captured traffic har - * @param counter Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key (required) + * Add Custom Error to the captured traffic har + * @param error Receives an error to track. Internally, the error is stored in an array in the har under the _errors key (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - + +
Status Code Description Response Headers
204 The counter was added. -
422 The counter was invalid. -
204 The Error was added. -
422 The Error was invalid. -
*/ - public ApiResponse addCounterWithHttpInfo(Counter counter) throws ApiException { - okhttp3.Call localVarCall = addCounterValidateBeforeCall(counter, null); + public ApiResponse addErrorWithHttpInfo(Error error) throws ApiException { + okhttp3.Call localVarCall = addErrorValidateBeforeCall(error, null); return localVarApiClient.execute(localVarCall); } /** * (asynchronously) - * Add Custom Counter to the captured traffic har - * @param counter Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key (required) + * Add Custom Error to the captured traffic har + * @param error Receives an error to track. Internally, the error is stored in an array in the har under the _errors key (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - + +
Status Code Description Response Headers
204 The counter was added. -
422 The counter was invalid. -
204 The Error was added. -
422 The Error was invalid. -
*/ - public okhttp3.Call addCounterAsync(Counter counter, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addErrorAsync(Error error, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = addCounterValidateBeforeCall(counter, _callback); + okhttp3.Call localVarCall = addErrorValidateBeforeCall(error, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for addError - * @param error Receives an error to track. Internally, the error is stored in an array in the har under the _errors key (required) + * Build call for addMetric + * @param metric Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - + +
Status Code Description Response Headers
204 The Error was added. -
422 The Error was invalid. -
204 The metric was added. -
422 The metric was invalid. -
*/ - public okhttp3.Call addErrorCall(Error error, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addMetricCall(Metric metric, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -225,10 +226,10 @@ public okhttp3.Call addErrorCall(Error error, final ApiCallback _callback) throw basePath = null; } - Object localVarPostBody = error; + Object localVarPostBody = metric; // create path and map variables - String localVarPath = "/har/errors"; + String localVarPath = "/har/metrics"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -256,67 +257,67 @@ public okhttp3.Call addErrorCall(Error error, final ApiCallback _callback) throw } @SuppressWarnings("rawtypes") - private okhttp3.Call addErrorValidateBeforeCall(Error error, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'error' is set - if (error == null) { - throw new ApiException("Missing the required parameter 'error' when calling addError(Async)"); + private okhttp3.Call addMetricValidateBeforeCall(Metric metric, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'metric' is set + if (metric == null) { + throw new ApiException("Missing the required parameter 'metric' when calling addMetric(Async)"); } - return addErrorCall(error, _callback); + return addMetricCall(metric, _callback); } /** * - * Add Custom Error to the captured traffic har - * @param error Receives an error to track. Internally, the error is stored in an array in the har under the _errors key (required) + * Add Custom Metric to the captured traffic har + * @param metric Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - + +
Status Code Description Response Headers
204 The Error was added. -
422 The Error was invalid. -
204 The metric was added. -
422 The metric was invalid. -
*/ - public void addError(Error error) throws ApiException { - addErrorWithHttpInfo(error); + public void addMetric(Metric metric) throws ApiException { + addMetricWithHttpInfo(metric); } /** * - * Add Custom Error to the captured traffic har - * @param error Receives an error to track. Internally, the error is stored in an array in the har under the _errors key (required) + * Add Custom Metric to the captured traffic har + * @param metric Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - + +
Status Code Description Response Headers
204 The Error was added. -
422 The Error was invalid. -
204 The metric was added. -
422 The metric was invalid. -
*/ - public ApiResponse addErrorWithHttpInfo(Error error) throws ApiException { - okhttp3.Call localVarCall = addErrorValidateBeforeCall(error, null); + public ApiResponse addMetricWithHttpInfo(Metric metric) throws ApiException { + okhttp3.Call localVarCall = addMetricValidateBeforeCall(metric, null); return localVarApiClient.execute(localVarCall); } /** * (asynchronously) - * Add Custom Error to the captured traffic har - * @param error Receives an error to track. Internally, the error is stored in an array in the har under the _errors key (required) + * Add Custom Metric to the captured traffic har + * @param metric Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - + +
Status Code Description Response Headers
204 The Error was added. -
422 The Error was invalid. -
204 The metric was added. -
422 The metric was invalid. -
*/ - public okhttp3.Call addErrorAsync(Error error, final ApiCallback _callback) throws ApiException { + public okhttp3.Call addMetricAsync(Metric metric, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = addErrorValidateBeforeCall(error, _callback); + okhttp3.Call localVarCall = addMetricValidateBeforeCall(metric, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } diff --git a/clients/java/src/main/java/com/browserup/proxy_client/AbstractOpenApiSchema.java b/clients/java/src/main/java/com/browserup/proxy_client/AbstractOpenApiSchema.java index c7574843e7..2bf0b9fe25 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/AbstractOpenApiSchema.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/AbstractOpenApiSchema.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -17,6 +17,7 @@ import java.util.Objects; import java.lang.reflect.Type; import java.util.Map; +import javax.ws.rs.core.GenericType; //import com.fasterxml.jackson.annotation.JsonValue; @@ -45,7 +46,7 @@ public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { * * @return an instance of the actual schema/object */ - public abstract Map> getSchemas(); + public abstract Map getSchemas(); /** * Get the actual instance diff --git a/clients/java/src/main/java/com/browserup/proxy_client/Action.java b/clients/java/src/main/java/com/browserup/proxy_client/Action.java index 4beb292c60..f1993b12b8 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/Action.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/Action.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,13 +14,13 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,10 +32,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -98,6 +94,7 @@ public Action name(String name) { * @return name **/ @javax.annotation.Nullable + public String getName() { return name; } @@ -119,6 +116,7 @@ public Action id(String id) { * @return id **/ @javax.annotation.Nullable + public String getId() { return id; } @@ -140,6 +138,7 @@ public Action className(String className) { * @return className **/ @javax.annotation.Nullable + public String getClassName() { return className; } @@ -161,6 +160,7 @@ public Action tagName(String tagName) { * @return tagName **/ @javax.annotation.Nullable + public String getTagName() { return tagName; } @@ -182,6 +182,7 @@ public Action xpath(String xpath) { * @return xpath **/ @javax.annotation.Nullable + public String getXpath() { return xpath; } @@ -203,6 +204,7 @@ public Action dataAttributes(String dataAttributes) { * @return dataAttributes **/ @javax.annotation.Nullable + public String getDataAttributes() { return dataAttributes; } @@ -224,6 +226,7 @@ public Action formName(String formName) { * @return formName **/ @javax.annotation.Nullable + public String getFormName() { return formName; } @@ -245,6 +248,7 @@ public Action content(String content) { * @return content **/ @javax.annotation.Nullable + public String getContent() { return content; } @@ -328,26 +332,25 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Action + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to Action */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Action.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!Action.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Action is not found in the empty JSON string", Action.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!Action.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Action` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Action` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -394,9 +397,9 @@ public void write(JsonWriter out, Action value) throws IOException { @Override public Action read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/ApiCallback.java b/clients/java/src/main/java/com/browserup/proxy_client/ApiCallback.java index 2bd15f0e8e..afec5b44f7 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/ApiCallback.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/ApiCallback.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/main/java/com/browserup/proxy_client/ApiClient.java b/clients/java/src/main/java/com/browserup/proxy_client/ApiClient.java index dbbc0826d7..c6baa5417f 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/ApiClient.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/ApiClient.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -1176,15 +1176,12 @@ public Request buildRequest(String baseUrl, String path, String method, ListApiException class.

@@ -28,7 +29,7 @@ public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; private String responseBody = null; - + /** *

Constructor for ApiException.

*/ diff --git a/clients/java/src/main/java/com/browserup/proxy_client/ApiResponse.java b/clients/java/src/main/java/com/browserup/proxy_client/ApiResponse.java index 3d8b0a30f9..26f611c348 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/ApiResponse.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/ApiResponse.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/main/java/com/browserup/proxy_client/Configuration.java b/clients/java/src/main/java/com/browserup/proxy_client/Configuration.java index 446b18dca1..b9f3447018 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/Configuration.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/Configuration.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -15,8 +15,6 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "1.1.4-SNAPSHOT"; - private static ApiClient defaultApiClient = new ApiClient(); /** diff --git a/clients/java/src/main/java/com/browserup/proxy_client/Error.java b/clients/java/src/main/java/com/browserup/proxy_client/Error.java index 4ccc344e56..8bf045bff7 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/Error.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/Error.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,13 +14,13 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,10 +32,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -74,6 +70,7 @@ public Error name(String name) { * @return name **/ @javax.annotation.Nullable + public String getName() { return name; } @@ -95,6 +92,7 @@ public Error details(String details) { * @return details **/ @javax.annotation.Nullable + public String getDetails() { return details; } @@ -160,26 +158,25 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Error + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to Error */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Error.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!Error.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Error is not found in the empty JSON string", Error.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!Error.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Error` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Error` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -208,9 +205,9 @@ public void write(JsonWriter out, Error value) throws IOException { @Override public Error read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/GzipRequestInterceptor.java b/clients/java/src/main/java/com/browserup/proxy_client/GzipRequestInterceptor.java index 8ace867546..0637d1226e 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/GzipRequestInterceptor.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/GzipRequestInterceptor.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/main/java/com/browserup/proxy_client/Har.java b/clients/java/src/main/java/com/browserup/proxy_client/Har.java index 6846061f86..570d7508dd 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/Har.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/Har.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,6 +14,7 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.browserup.proxy_client.HarLog; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -21,7 +22,6 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,10 +33,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -71,6 +67,7 @@ public Har log(HarLog log) { * @return log **/ @javax.annotation.Nonnull + public HarLog getLog() { return log; } @@ -180,27 +177,26 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Har + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to Har */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Har.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!Har.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Har is not found in the empty JSON string", Har.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Har.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `log` - HarLog.validateJsonElement(jsonObj.get("log")); + HarLog.validateJsonObject(jsonObj.getAsJsonObject("log")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -240,9 +236,8 @@ else if (entry.getValue() instanceof Character) @Override public Har read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); // store additional fields in the deserialized instance Har instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { diff --git a/clients/java/src/main/java/com/browserup/proxy_client/HarEntry.java b/clients/java/src/main/java/com/browserup/proxy_client/HarEntry.java index 74cbc633a3..a18f9ce696 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/HarEntry.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/HarEntry.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,6 +14,7 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.browserup.proxy_client.HarEntryCache; import com.browserup.proxy_client.HarEntryRequest; import com.browserup.proxy_client.HarEntryResponse; @@ -27,7 +28,6 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -40,10 +40,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -94,7 +90,7 @@ public class HarEntry { public static final String SERIALIZED_NAME_WEB_SOCKET_MESSAGES = "_webSocketMessages"; @SerializedName(SERIALIZED_NAME_WEB_SOCKET_MESSAGES) - private List webSocketMessages; + private List webSocketMessages = new ArrayList<>(); public static final String SERIALIZED_NAME_CONNECTION = "connection"; @SerializedName(SERIALIZED_NAME_CONNECTION) @@ -118,6 +114,7 @@ public HarEntry pageref(String pageref) { * @return pageref **/ @javax.annotation.Nullable + public String getPageref() { return pageref; } @@ -139,6 +136,7 @@ public HarEntry startedDateTime(OffsetDateTime startedDateTime) { * @return startedDateTime **/ @javax.annotation.Nonnull + public OffsetDateTime getStartedDateTime() { return startedDateTime; } @@ -161,6 +159,7 @@ public HarEntry time(Long time) { * @return time **/ @javax.annotation.Nonnull + public Long getTime() { return time; } @@ -182,6 +181,7 @@ public HarEntry request(HarEntryRequest request) { * @return request **/ @javax.annotation.Nonnull + public HarEntryRequest getRequest() { return request; } @@ -203,6 +203,7 @@ public HarEntry response(HarEntryResponse response) { * @return response **/ @javax.annotation.Nonnull + public HarEntryResponse getResponse() { return response; } @@ -224,6 +225,7 @@ public HarEntry cache(HarEntryCache cache) { * @return cache **/ @javax.annotation.Nonnull + public HarEntryCache getCache() { return cache; } @@ -245,6 +247,7 @@ public HarEntry timings(HarEntryTimings timings) { * @return timings **/ @javax.annotation.Nonnull + public HarEntryTimings getTimings() { return timings; } @@ -266,6 +269,7 @@ public HarEntry serverIPAddress(String serverIPAddress) { * @return serverIPAddress **/ @javax.annotation.Nullable + public String getServerIPAddress() { return serverIPAddress; } @@ -295,6 +299,7 @@ public HarEntry addWebSocketMessagesItem(WebSocketMessage webSocketMessagesItem) * @return webSocketMessages **/ @javax.annotation.Nullable + public List getWebSocketMessages() { return webSocketMessages; } @@ -316,6 +321,7 @@ public HarEntry connection(String connection) { * @return connection **/ @javax.annotation.Nullable + public String getConnection() { return connection; } @@ -337,6 +343,7 @@ public HarEntry comment(String comment) { * @return comment **/ @javax.annotation.Nullable + public String getComment() { return comment; } @@ -435,40 +442,39 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HarEntry + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to HarEntry */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HarEntry.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!HarEntry.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in HarEntry is not found in the empty JSON string", HarEntry.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!HarEntry.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntry` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntry` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : HarEntry.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("pageref") != null && !jsonObj.get("pageref").isJsonNull()) && !jsonObj.get("pageref").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `pageref` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pageref").toString())); } // validate the required field `cache` - HarEntryCache.validateJsonElement(jsonObj.get("cache")); + HarEntryCache.validateJsonObject(jsonObj.getAsJsonObject("cache")); // validate the required field `timings` - HarEntryTimings.validateJsonElement(jsonObj.get("timings")); + HarEntryTimings.validateJsonObject(jsonObj.getAsJsonObject("timings")); if ((jsonObj.get("serverIPAddress") != null && !jsonObj.get("serverIPAddress").isJsonNull()) && !jsonObj.get("serverIPAddress").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `serverIPAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("serverIPAddress").toString())); } @@ -482,7 +488,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `_webSocketMessages` (array) for (int i = 0; i < jsonArraywebSocketMessages.size(); i++) { - WebSocketMessage.validateJsonElement(jsonArraywebSocketMessages.get(i)); + WebSocketMessage.validateJsonObject(jsonArraywebSocketMessages.get(i).getAsJsonObject()); }; } } @@ -514,9 +520,9 @@ public void write(JsonWriter out, HarEntry value) throws IOException { @Override public HarEntry read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryCache.java b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryCache.java index 6e3a4922da..6d93843827 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryCache.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryCache.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,6 +14,7 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.browserup.proxy_client.HarEntryCacheBeforeRequest; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -21,8 +22,6 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -34,10 +33,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -80,6 +75,7 @@ public HarEntryCache beforeRequest(HarEntryCacheBeforeRequest beforeRequest) { * @return beforeRequest **/ @javax.annotation.Nullable + public HarEntryCacheBeforeRequest getBeforeRequest() { return beforeRequest; } @@ -101,6 +97,7 @@ public HarEntryCache afterRequest(HarEntryCacheBeforeRequest afterRequest) { * @return afterRequest **/ @javax.annotation.Nullable + public HarEntryCacheBeforeRequest getAfterRequest() { return afterRequest; } @@ -122,6 +119,7 @@ public HarEntryCache comment(String comment) { * @return comment **/ @javax.annotation.Nullable + public String getComment() { return comment; } @@ -147,22 +145,11 @@ public boolean equals(Object o) { Objects.equals(this.comment, harEntryCache.comment); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(beforeRequest, afterRequest, comment); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -201,33 +188,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HarEntryCache + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to HarEntryCache */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HarEntryCache.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!HarEntryCache.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in HarEntryCache is not found in the empty JSON string", HarEntryCache.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!HarEntryCache.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntryCache` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntryCache` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `beforeRequest` if (jsonObj.get("beforeRequest") != null && !jsonObj.get("beforeRequest").isJsonNull()) { - HarEntryCacheBeforeRequest.validateJsonElement(jsonObj.get("beforeRequest")); + HarEntryCacheBeforeRequest.validateJsonObject(jsonObj.getAsJsonObject("beforeRequest")); } // validate the optional field `afterRequest` if (jsonObj.get("afterRequest") != null && !jsonObj.get("afterRequest").isJsonNull()) { - HarEntryCacheBeforeRequest.validateJsonElement(jsonObj.get("afterRequest")); + HarEntryCacheBeforeRequest.validateJsonObject(jsonObj.getAsJsonObject("afterRequest")); } if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); @@ -254,9 +240,9 @@ public void write(JsonWriter out, HarEntryCache value) throws IOException { @Override public HarEntryCache read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryCacheBeforeRequest.java b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryCacheBeforeRequest.java index 9f75b8c251..cb94b10d4c 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryCacheBeforeRequest.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryCacheBeforeRequest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,306 +14,202 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; +import com.browserup.proxy_client.HarEntryCacheBeforeRequestOneOf; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; + +import javax.ws.rs.core.GenericType; + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.Map; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; import com.browserup.proxy_client.JSON; -/** - * HarEntryCacheBeforeRequest - */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class HarEntryCacheBeforeRequest { - public static final String SERIALIZED_NAME_EXPIRES = "expires"; - @SerializedName(SERIALIZED_NAME_EXPIRES) - private String expires; - - public static final String SERIALIZED_NAME_LAST_ACCESS = "lastAccess"; - @SerializedName(SERIALIZED_NAME_LAST_ACCESS) - private String lastAccess; - - public static final String SERIALIZED_NAME_E_TAG = "eTag"; - @SerializedName(SERIALIZED_NAME_E_TAG) - private String eTag; - - public static final String SERIALIZED_NAME_HIT_COUNT = "hitCount"; - @SerializedName(SERIALIZED_NAME_HIT_COUNT) - private Integer hitCount; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - private String comment; - - public HarEntryCacheBeforeRequest() { - } - - public HarEntryCacheBeforeRequest expires(String expires) { - - this.expires = expires; - return this; - } - - /** - * Get expires - * @return expires - **/ - @javax.annotation.Nullable - public String getExpires() { - return expires; - } - - - public void setExpires(String expires) { - this.expires = expires; - } - - - public HarEntryCacheBeforeRequest lastAccess(String lastAccess) { - - this.lastAccess = lastAccess; - return this; - } - - /** - * Get lastAccess - * @return lastAccess - **/ - @javax.annotation.Nonnull - public String getLastAccess() { - return lastAccess; - } - - - public void setLastAccess(String lastAccess) { - this.lastAccess = lastAccess; - } - - - public HarEntryCacheBeforeRequest eTag(String eTag) { - - this.eTag = eTag; - return this; - } - - /** - * Get eTag - * @return eTag - **/ - @javax.annotation.Nonnull - public String geteTag() { - return eTag; - } - - - public void seteTag(String eTag) { - this.eTag = eTag; - } - - - public HarEntryCacheBeforeRequest hitCount(Integer hitCount) { - - this.hitCount = hitCount; - return this; - } - - /** - * Get hitCount - * @return hitCount - **/ - @javax.annotation.Nonnull - public Integer getHitCount() { - return hitCount; - } - - - public void setHitCount(Integer hitCount) { - this.hitCount = hitCount; - } - - - public HarEntryCacheBeforeRequest comment(String comment) { - - this.comment = comment; - return this; - } - - /** - * Get comment - * @return comment - **/ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - +public class HarEntryCacheBeforeRequest extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(HarEntryCacheBeforeRequest.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!HarEntryCacheBeforeRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'HarEntryCacheBeforeRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterHarEntryCacheBeforeRequestOneOf = gson.getDelegateAdapter(this, TypeToken.get(HarEntryCacheBeforeRequestOneOf.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, HarEntryCacheBeforeRequest value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `HarEntryCacheBeforeRequestOneOf` + if (value.getActualInstance() instanceof HarEntryCacheBeforeRequestOneOf) { + JsonObject obj = adapterHarEntryCacheBeforeRequestOneOf.toJsonTree((HarEntryCacheBeforeRequestOneOf)value.getActualInstance()).getAsJsonObject(); + elementAdapter.write(out, obj); + return; + } + + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: HarEntryCacheBeforeRequestOneOf"); + } + + @Override + public HarEntryCacheBeforeRequest read(JsonReader in) throws IOException { + Object deserialized = null; + JsonObject jsonObject = elementAdapter.read(in).getAsJsonObject(); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize HarEntryCacheBeforeRequestOneOf + try { + // validate the JSON object to see if any exception is thrown + HarEntryCacheBeforeRequestOneOf.validateJsonObject(jsonObject); + actualAdapter = adapterHarEntryCacheBeforeRequestOneOf; + match++; + log.log(Level.FINER, "Input data matches schema 'HarEntryCacheBeforeRequestOneOf'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for HarEntryCacheBeforeRequestOneOf failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'HarEntryCacheBeforeRequestOneOf'", e); + } + + if (match == 1) { + HarEntryCacheBeforeRequest ret = new HarEntryCacheBeforeRequest(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonObject)); + return ret; + } + + throw new IOException(String.format("Failed deserialization for HarEntryCacheBeforeRequest: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonObject.toString())); + } + }.nullSafe(); + } + } - public void setComment(String comment) { - this.comment = comment; - } + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + public HarEntryCacheBeforeRequest() { + super("oneOf", Boolean.TRUE); + } + public HarEntryCacheBeforeRequest(HarEntryCacheBeforeRequestOneOf o) { + super("oneOf", Boolean.TRUE); + setActualInstance(o); + } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; + static { + schemas.put("HarEntryCacheBeforeRequestOneOf", new GenericType() { + }); } - if (o == null || getClass() != o.getClass()) { - return false; + + @Override + public Map getSchemas() { + return HarEntryCacheBeforeRequest.schemas; } - HarEntryCacheBeforeRequest harEntryCacheBeforeRequest = (HarEntryCacheBeforeRequest) o; - return Objects.equals(this.expires, harEntryCacheBeforeRequest.expires) && - Objects.equals(this.lastAccess, harEntryCacheBeforeRequest.lastAccess) && - Objects.equals(this.eTag, harEntryCacheBeforeRequest.eTag) && - Objects.equals(this.hitCount, harEntryCacheBeforeRequest.hitCount) && - Objects.equals(this.comment, harEntryCacheBeforeRequest.comment); - } - @Override - public int hashCode() { - return Objects.hash(expires, lastAccess, eTag, hitCount, comment); - } + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * HarEntryCacheBeforeRequestOneOf + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (instance == null) { + super.setActualInstance(instance); + return; + } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HarEntryCacheBeforeRequest {\n"); - sb.append(" expires: ").append(toIndentedString(expires)).append("\n"); - sb.append(" lastAccess: ").append(toIndentedString(lastAccess)).append("\n"); - sb.append(" eTag: ").append(toIndentedString(eTag)).append("\n"); - sb.append(" hitCount: ").append(toIndentedString(hitCount)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append("}"); - return sb.toString(); - } + if (instance instanceof HarEntryCacheBeforeRequestOneOf) { + super.setActualInstance(instance); + return; + } - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; + throw new RuntimeException("Invalid instance type. Must be HarEntryCacheBeforeRequestOneOf"); } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; + /** + * Get the actual instance, which can be the following: + * HarEntryCacheBeforeRequestOneOf + * + * @return The actual instance (HarEntryCacheBeforeRequestOneOf) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("expires"); - openapiFields.add("lastAccess"); - openapiFields.add("eTag"); - openapiFields.add("hitCount"); - openapiFields.add("comment"); + /** + * Get the actual instance of `HarEntryCacheBeforeRequestOneOf`. If the actual instance is not `HarEntryCacheBeforeRequestOneOf`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `HarEntryCacheBeforeRequestOneOf` + * @throws ClassCastException if the instance is not `HarEntryCacheBeforeRequestOneOf` + */ + public HarEntryCacheBeforeRequestOneOf getHarEntryCacheBeforeRequestOneOf() throws ClassCastException { + return (HarEntryCacheBeforeRequestOneOf)super.getActualInstance(); + } - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("lastAccess"); - openapiRequiredFields.add("eTag"); - openapiRequiredFields.add("hitCount"); - } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HarEntryCacheBeforeRequest + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to HarEntryCacheBeforeRequest */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HarEntryCacheBeforeRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in HarEntryCacheBeforeRequest is not found in the empty JSON string", HarEntryCacheBeforeRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!HarEntryCacheBeforeRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntryCacheBeforeRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : HarEntryCacheBeforeRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("expires") != null && !jsonObj.get("expires").isJsonNull()) && !jsonObj.get("expires").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `expires` to be a primitive type in the JSON string but got `%s`", jsonObj.get("expires").toString())); - } - if (!jsonObj.get("lastAccess").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `lastAccess` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastAccess").toString())); - } - if (!jsonObj.get("eTag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eTag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eTag").toString())); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!HarEntryCacheBeforeRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'HarEntryCacheBeforeRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(HarEntryCacheBeforeRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, HarEntryCacheBeforeRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public HarEntryCacheBeforeRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with HarEntryCacheBeforeRequestOneOf + try { + HarEntryCacheBeforeRequestOneOf.validateJsonObject(jsonObj); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for HarEntryCacheBeforeRequestOneOf failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format("The JSON string is invalid for HarEntryCacheBeforeRequest with oneOf schemas: HarEntryCacheBeforeRequestOneOf. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonObj.toString())); } } diff --git a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryCacheBeforeRequestOneOf.java b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryCacheBeforeRequestOneOf.java index c120346600..9f0d0e4288 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryCacheBeforeRequestOneOf.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryCacheBeforeRequestOneOf.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -32,10 +32,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -86,6 +82,7 @@ public HarEntryCacheBeforeRequestOneOf expires(String expires) { * @return expires **/ @javax.annotation.Nullable + public String getExpires() { return expires; } @@ -107,6 +104,7 @@ public HarEntryCacheBeforeRequestOneOf lastAccess(String lastAccess) { * @return lastAccess **/ @javax.annotation.Nonnull + public String getLastAccess() { return lastAccess; } @@ -128,6 +126,7 @@ public HarEntryCacheBeforeRequestOneOf eTag(String eTag) { * @return eTag **/ @javax.annotation.Nonnull + public String geteTag() { return eTag; } @@ -149,6 +148,7 @@ public HarEntryCacheBeforeRequestOneOf hitCount(Integer hitCount) { * @return hitCount **/ @javax.annotation.Nonnull + public Integer getHitCount() { return hitCount; } @@ -170,6 +170,7 @@ public HarEntryCacheBeforeRequestOneOf comment(String comment) { * @return comment **/ @javax.annotation.Nullable + public String getComment() { return comment; } diff --git a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequest.java b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequest.java index a6717f0c5f..b76cfa96f0 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequest.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,6 +14,7 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.browserup.proxy_client.HarEntryRequestCookiesInner; import com.browserup.proxy_client.HarEntryRequestPostData; import com.browserup.proxy_client.HarEntryRequestQueryStringInner; @@ -24,9 +25,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.net.URI; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -39,10 +38,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -65,7 +60,7 @@ public class HarEntryRequest { public static final String SERIALIZED_NAME_URL = "url"; @SerializedName(SERIALIZED_NAME_URL) - private URI url; + private String url; public static final String SERIALIZED_NAME_HTTP_VERSION = "httpVersion"; @SerializedName(SERIALIZED_NAME_HTTP_VERSION) @@ -113,6 +108,7 @@ public HarEntryRequest method(String method) { * @return method **/ @javax.annotation.Nonnull + public String getMethod() { return method; } @@ -123,7 +119,7 @@ public void setMethod(String method) { } - public HarEntryRequest url(URI url) { + public HarEntryRequest url(String url) { this.url = url; return this; @@ -134,12 +130,13 @@ public HarEntryRequest url(URI url) { * @return url **/ @javax.annotation.Nonnull - public URI getUrl() { + + public String getUrl() { return url; } - public void setUrl(URI url) { + public void setUrl(String url) { this.url = url; } @@ -155,6 +152,7 @@ public HarEntryRequest httpVersion(String httpVersion) { * @return httpVersion **/ @javax.annotation.Nonnull + public String getHttpVersion() { return httpVersion; } @@ -172,9 +170,6 @@ public HarEntryRequest cookies(List cookies) { } public HarEntryRequest addCookiesItem(HarEntryRequestCookiesInner cookiesItem) { - if (this.cookies == null) { - this.cookies = new ArrayList<>(); - } this.cookies.add(cookiesItem); return this; } @@ -184,6 +179,7 @@ public HarEntryRequest addCookiesItem(HarEntryRequestCookiesInner cookiesItem) { * @return cookies **/ @javax.annotation.Nonnull + public List getCookies() { return cookies; } @@ -201,9 +197,6 @@ public HarEntryRequest headers(List
headers) { } public HarEntryRequest addHeadersItem(Header headersItem) { - if (this.headers == null) { - this.headers = new ArrayList<>(); - } this.headers.add(headersItem); return this; } @@ -213,6 +206,7 @@ public HarEntryRequest addHeadersItem(Header headersItem) { * @return headers **/ @javax.annotation.Nonnull + public List
getHeaders() { return headers; } @@ -230,9 +224,6 @@ public HarEntryRequest queryString(List querySt } public HarEntryRequest addQueryStringItem(HarEntryRequestQueryStringInner queryStringItem) { - if (this.queryString == null) { - this.queryString = new ArrayList<>(); - } this.queryString.add(queryStringItem); return this; } @@ -242,6 +233,7 @@ public HarEntryRequest addQueryStringItem(HarEntryRequestQueryStringInner queryS * @return queryString **/ @javax.annotation.Nonnull + public List getQueryString() { return queryString; } @@ -263,6 +255,7 @@ public HarEntryRequest postData(HarEntryRequestPostData postData) { * @return postData **/ @javax.annotation.Nullable + public HarEntryRequestPostData getPostData() { return postData; } @@ -284,6 +277,7 @@ public HarEntryRequest headersSize(Integer headersSize) { * @return headersSize **/ @javax.annotation.Nonnull + public Integer getHeadersSize() { return headersSize; } @@ -305,6 +299,7 @@ public HarEntryRequest bodySize(Integer bodySize) { * @return bodySize **/ @javax.annotation.Nonnull + public Integer getBodySize() { return bodySize; } @@ -326,6 +321,7 @@ public HarEntryRequest comment(String comment) { * @return comment **/ @javax.annotation.Nullable + public String getComment() { return comment; } @@ -469,25 +465,24 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HarEntryRequest + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to HarEntryRequest */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HarEntryRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!HarEntryRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in HarEntryRequest is not found in the empty JSON string", HarEntryRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : HarEntryRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("method").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("method").toString())); } @@ -505,7 +500,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray jsonArraycookies = jsonObj.getAsJsonArray("cookies"); // validate the required field `cookies` (array) for (int i = 0; i < jsonArraycookies.size(); i++) { - HarEntryRequestCookiesInner.validateJsonElement(jsonArraycookies.get(i)); + HarEntryRequestCookiesInner.validateJsonObject(jsonArraycookies.get(i).getAsJsonObject()); }; // ensure the json data is an array if (!jsonObj.get("headers").isJsonArray()) { @@ -515,7 +510,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray jsonArrayheaders = jsonObj.getAsJsonArray("headers"); // validate the required field `headers` (array) for (int i = 0; i < jsonArrayheaders.size(); i++) { - Header.validateJsonElement(jsonArrayheaders.get(i)); + Header.validateJsonObject(jsonArrayheaders.get(i).getAsJsonObject()); }; // ensure the json data is an array if (!jsonObj.get("queryString").isJsonArray()) { @@ -525,11 +520,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray jsonArrayqueryString = jsonObj.getAsJsonArray("queryString"); // validate the required field `queryString` (array) for (int i = 0; i < jsonArrayqueryString.size(); i++) { - HarEntryRequestQueryStringInner.validateJsonElement(jsonArrayqueryString.get(i)); + HarEntryRequestQueryStringInner.validateJsonObject(jsonArrayqueryString.get(i).getAsJsonObject()); }; // validate the optional field `postData` if (jsonObj.get("postData") != null && !jsonObj.get("postData").isJsonNull()) { - HarEntryRequestPostData.validateJsonElement(jsonObj.get("postData")); + HarEntryRequestPostData.validateJsonObject(jsonObj.getAsJsonObject("postData")); } if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); @@ -573,9 +568,8 @@ else if (entry.getValue() instanceof Character) @Override public HarEntryRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); // store additional fields in the deserialized instance HarEntryRequest instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { diff --git a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequestCookiesInner.java b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequestCookiesInner.java index 1e744adb46..be10314337 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequestCookiesInner.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequestCookiesInner.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,13 +14,13 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,10 +32,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -98,6 +94,7 @@ public HarEntryRequestCookiesInner name(String name) { * @return name **/ @javax.annotation.Nonnull + public String getName() { return name; } @@ -119,6 +116,7 @@ public HarEntryRequestCookiesInner value(String value) { * @return value **/ @javax.annotation.Nonnull + public String getValue() { return value; } @@ -140,6 +138,7 @@ public HarEntryRequestCookiesInner path(String path) { * @return path **/ @javax.annotation.Nullable + public String getPath() { return path; } @@ -161,6 +160,7 @@ public HarEntryRequestCookiesInner domain(String domain) { * @return domain **/ @javax.annotation.Nullable + public String getDomain() { return domain; } @@ -182,6 +182,7 @@ public HarEntryRequestCookiesInner expires(String expires) { * @return expires **/ @javax.annotation.Nullable + public String getExpires() { return expires; } @@ -203,6 +204,7 @@ public HarEntryRequestCookiesInner httpOnly(Boolean httpOnly) { * @return httpOnly **/ @javax.annotation.Nullable + public Boolean getHttpOnly() { return httpOnly; } @@ -224,6 +226,7 @@ public HarEntryRequestCookiesInner secure(Boolean secure) { * @return secure **/ @javax.annotation.Nullable + public Boolean getSecure() { return secure; } @@ -245,6 +248,7 @@ public HarEntryRequestCookiesInner comment(String comment) { * @return comment **/ @javax.annotation.Nullable + public String getComment() { return comment; } @@ -330,33 +334,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HarEntryRequestCookiesInner + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to HarEntryRequestCookiesInner */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HarEntryRequestCookiesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!HarEntryRequestCookiesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in HarEntryRequestCookiesInner is not found in the empty JSON string", HarEntryRequestCookiesInner.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!HarEntryRequestCookiesInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntryRequestCookiesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntryRequestCookiesInner` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : HarEntryRequestCookiesInner.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -397,9 +400,9 @@ public void write(JsonWriter out, HarEntryRequestCookiesInner value) throws IOEx @Override public HarEntryRequestCookiesInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequestPostData.java b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequestPostData.java index d10d447262..c7c79be54a 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequestPostData.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequestPostData.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,6 +14,7 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.browserup.proxy_client.HarEntryRequestPostDataParamsInner; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -22,7 +23,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -35,10 +35,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -65,7 +61,7 @@ public class HarEntryRequestPostData { public static final String SERIALIZED_NAME_PARAMS = "params"; @SerializedName(SERIALIZED_NAME_PARAMS) - private List params; + private List params = new ArrayList<>(); public HarEntryRequestPostData() { } @@ -81,6 +77,7 @@ public HarEntryRequestPostData mimeType(String mimeType) { * @return mimeType **/ @javax.annotation.Nonnull + public String getMimeType() { return mimeType; } @@ -102,6 +99,7 @@ public HarEntryRequestPostData text(String text) { * @return text **/ @javax.annotation.Nullable + public String getText() { return text; } @@ -131,6 +129,7 @@ public HarEntryRequestPostData addParamsItem(HarEntryRequestPostDataParamsInner * @return params **/ @javax.annotation.Nullable + public List getParams() { return params; } @@ -200,33 +199,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HarEntryRequestPostData + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to HarEntryRequestPostData */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HarEntryRequestPostData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!HarEntryRequestPostData.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in HarEntryRequestPostData is not found in the empty JSON string", HarEntryRequestPostData.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!HarEntryRequestPostData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntryRequestPostData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntryRequestPostData` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : HarEntryRequestPostData.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("mimeType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `mimeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mimeType").toString())); } @@ -243,7 +241,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `params` (array) for (int i = 0; i < jsonArrayparams.size(); i++) { - HarEntryRequestPostDataParamsInner.validateJsonElement(jsonArrayparams.get(i)); + HarEntryRequestPostDataParamsInner.validateJsonObject(jsonArrayparams.get(i).getAsJsonObject()); }; } } @@ -269,9 +267,9 @@ public void write(JsonWriter out, HarEntryRequestPostData value) throws IOExcept @Override public HarEntryRequestPostData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequestPostDataParamsInner.java b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequestPostDataParamsInner.java index 56b18981e9..36fe170a24 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequestPostDataParamsInner.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequestPostDataParamsInner.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,13 +14,13 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,10 +32,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -86,6 +82,7 @@ public HarEntryRequestPostDataParamsInner name(String name) { * @return name **/ @javax.annotation.Nullable + public String getName() { return name; } @@ -107,6 +104,7 @@ public HarEntryRequestPostDataParamsInner value(String value) { * @return value **/ @javax.annotation.Nullable + public String getValue() { return value; } @@ -128,6 +126,7 @@ public HarEntryRequestPostDataParamsInner fileName(String fileName) { * @return fileName **/ @javax.annotation.Nullable + public String getFileName() { return fileName; } @@ -149,6 +148,7 @@ public HarEntryRequestPostDataParamsInner contentType(String contentType) { * @return contentType **/ @javax.annotation.Nullable + public String getContentType() { return contentType; } @@ -170,6 +170,7 @@ public HarEntryRequestPostDataParamsInner comment(String comment) { * @return comment **/ @javax.annotation.Nullable + public String getComment() { return comment; } @@ -244,26 +245,25 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HarEntryRequestPostDataParamsInner + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to HarEntryRequestPostDataParamsInner */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HarEntryRequestPostDataParamsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!HarEntryRequestPostDataParamsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in HarEntryRequestPostDataParamsInner is not found in the empty JSON string", HarEntryRequestPostDataParamsInner.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!HarEntryRequestPostDataParamsInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntryRequestPostDataParamsInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntryRequestPostDataParamsInner` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -301,9 +301,9 @@ public void write(JsonWriter out, HarEntryRequestPostDataParamsInner value) thro @Override public HarEntryRequestPostDataParamsInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequestQueryStringInner.java b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequestQueryStringInner.java index 510d275334..c1acf70286 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequestQueryStringInner.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryRequestQueryStringInner.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,13 +14,13 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,10 +32,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -78,6 +74,7 @@ public HarEntryRequestQueryStringInner name(String name) { * @return name **/ @javax.annotation.Nonnull + public String getName() { return name; } @@ -99,6 +96,7 @@ public HarEntryRequestQueryStringInner value(String value) { * @return value **/ @javax.annotation.Nonnull + public String getValue() { return value; } @@ -120,6 +118,7 @@ public HarEntryRequestQueryStringInner comment(String comment) { * @return comment **/ @javax.annotation.Nullable + public String getComment() { return comment; } @@ -190,33 +189,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HarEntryRequestQueryStringInner + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to HarEntryRequestQueryStringInner */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HarEntryRequestQueryStringInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!HarEntryRequestQueryStringInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in HarEntryRequestQueryStringInner is not found in the empty JSON string", HarEntryRequestQueryStringInner.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!HarEntryRequestQueryStringInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntryRequestQueryStringInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntryRequestQueryStringInner` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : HarEntryRequestQueryStringInner.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -248,9 +246,9 @@ public void write(JsonWriter out, HarEntryRequestQueryStringInner value) throws @Override public HarEntryRequestQueryStringInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryResponse.java b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryResponse.java index 646b7488a5..02b0248126 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryResponse.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryResponse.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,6 +14,7 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.browserup.proxy_client.HarEntryRequestCookiesInner; import com.browserup.proxy_client.HarEntryResponseContent; import com.browserup.proxy_client.Header; @@ -24,7 +25,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -37,10 +37,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -111,6 +107,7 @@ public HarEntryResponse status(Integer status) { * @return status **/ @javax.annotation.Nonnull + public Integer getStatus() { return status; } @@ -132,6 +129,7 @@ public HarEntryResponse statusText(String statusText) { * @return statusText **/ @javax.annotation.Nonnull + public String getStatusText() { return statusText; } @@ -153,6 +151,7 @@ public HarEntryResponse httpVersion(String httpVersion) { * @return httpVersion **/ @javax.annotation.Nonnull + public String getHttpVersion() { return httpVersion; } @@ -170,9 +169,6 @@ public HarEntryResponse cookies(List cookies) { } public HarEntryResponse addCookiesItem(HarEntryRequestCookiesInner cookiesItem) { - if (this.cookies == null) { - this.cookies = new ArrayList<>(); - } this.cookies.add(cookiesItem); return this; } @@ -182,6 +178,7 @@ public HarEntryResponse addCookiesItem(HarEntryRequestCookiesInner cookiesItem) * @return cookies **/ @javax.annotation.Nonnull + public List getCookies() { return cookies; } @@ -199,9 +196,6 @@ public HarEntryResponse headers(List
headers) { } public HarEntryResponse addHeadersItem(Header headersItem) { - if (this.headers == null) { - this.headers = new ArrayList<>(); - } this.headers.add(headersItem); return this; } @@ -211,6 +205,7 @@ public HarEntryResponse addHeadersItem(Header headersItem) { * @return headers **/ @javax.annotation.Nonnull + public List
getHeaders() { return headers; } @@ -232,6 +227,7 @@ public HarEntryResponse content(HarEntryResponseContent content) { * @return content **/ @javax.annotation.Nonnull + public HarEntryResponseContent getContent() { return content; } @@ -253,6 +249,7 @@ public HarEntryResponse redirectURL(String redirectURL) { * @return redirectURL **/ @javax.annotation.Nonnull + public String getRedirectURL() { return redirectURL; } @@ -274,6 +271,7 @@ public HarEntryResponse headersSize(Integer headersSize) { * @return headersSize **/ @javax.annotation.Nonnull + public Integer getHeadersSize() { return headersSize; } @@ -295,6 +293,7 @@ public HarEntryResponse bodySize(Integer bodySize) { * @return bodySize **/ @javax.annotation.Nonnull + public Integer getBodySize() { return bodySize; } @@ -316,6 +315,7 @@ public HarEntryResponse comment(String comment) { * @return comment **/ @javax.annotation.Nullable + public String getComment() { return comment; } @@ -460,25 +460,24 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HarEntryResponse + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to HarEntryResponse */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HarEntryResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!HarEntryResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in HarEntryResponse is not found in the empty JSON string", HarEntryResponse.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : HarEntryResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("statusText").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `statusText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("statusText").toString())); } @@ -493,7 +492,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray jsonArraycookies = jsonObj.getAsJsonArray("cookies"); // validate the required field `cookies` (array) for (int i = 0; i < jsonArraycookies.size(); i++) { - HarEntryRequestCookiesInner.validateJsonElement(jsonArraycookies.get(i)); + HarEntryRequestCookiesInner.validateJsonObject(jsonArraycookies.get(i).getAsJsonObject()); }; // ensure the json data is an array if (!jsonObj.get("headers").isJsonArray()) { @@ -503,10 +502,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray jsonArrayheaders = jsonObj.getAsJsonArray("headers"); // validate the required field `headers` (array) for (int i = 0; i < jsonArrayheaders.size(); i++) { - Header.validateJsonElement(jsonArrayheaders.get(i)); + Header.validateJsonObject(jsonArrayheaders.get(i).getAsJsonObject()); }; // validate the required field `content` - HarEntryResponseContent.validateJsonElement(jsonObj.get("content")); + HarEntryResponseContent.validateJsonObject(jsonObj.getAsJsonObject("content")); if (!jsonObj.get("redirectURL").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `redirectURL` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectURL").toString())); } @@ -552,9 +551,8 @@ else if (entry.getValue() instanceof Character) @Override public HarEntryResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); // store additional fields in the deserialized instance HarEntryResponse instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { diff --git a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryResponseContent.java b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryResponseContent.java index 25b7312e57..c9f02ffe14 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryResponseContent.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryResponseContent.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,13 +14,13 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,10 +32,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -122,6 +118,7 @@ public HarEntryResponseContent size(Integer size) { * @return size **/ @javax.annotation.Nonnull + public Integer getSize() { return size; } @@ -143,6 +140,7 @@ public HarEntryResponseContent compression(Integer compression) { * @return compression **/ @javax.annotation.Nullable + public Integer getCompression() { return compression; } @@ -164,6 +162,7 @@ public HarEntryResponseContent mimeType(String mimeType) { * @return mimeType **/ @javax.annotation.Nonnull + public String getMimeType() { return mimeType; } @@ -185,6 +184,7 @@ public HarEntryResponseContent text(String text) { * @return text **/ @javax.annotation.Nullable + public String getText() { return text; } @@ -206,6 +206,7 @@ public HarEntryResponseContent encoding(String encoding) { * @return encoding **/ @javax.annotation.Nullable + public String getEncoding() { return encoding; } @@ -228,6 +229,7 @@ public HarEntryResponseContent videoBufferedPercent(Long videoBufferedPercent) { * @return videoBufferedPercent **/ @javax.annotation.Nullable + public Long getVideoBufferedPercent() { return videoBufferedPercent; } @@ -250,6 +252,7 @@ public HarEntryResponseContent videoStallCount(Long videoStallCount) { * @return videoStallCount **/ @javax.annotation.Nullable + public Long getVideoStallCount() { return videoStallCount; } @@ -272,6 +275,7 @@ public HarEntryResponseContent videoDecodedByteCount(Long videoDecodedByteCount) * @return videoDecodedByteCount **/ @javax.annotation.Nullable + public Long getVideoDecodedByteCount() { return videoDecodedByteCount; } @@ -294,6 +298,7 @@ public HarEntryResponseContent videoWaitingCount(Long videoWaitingCount) { * @return videoWaitingCount **/ @javax.annotation.Nullable + public Long getVideoWaitingCount() { return videoWaitingCount; } @@ -316,6 +321,7 @@ public HarEntryResponseContent videoErrorCount(Long videoErrorCount) { * @return videoErrorCount **/ @javax.annotation.Nullable + public Long getVideoErrorCount() { return videoErrorCount; } @@ -338,6 +344,7 @@ public HarEntryResponseContent videoDroppedFrames(Long videoDroppedFrames) { * @return videoDroppedFrames **/ @javax.annotation.Nullable + public Long getVideoDroppedFrames() { return videoDroppedFrames; } @@ -360,6 +367,7 @@ public HarEntryResponseContent videoTotalFrames(Long videoTotalFrames) { * @return videoTotalFrames **/ @javax.annotation.Nullable + public Long getVideoTotalFrames() { return videoTotalFrames; } @@ -382,6 +390,7 @@ public HarEntryResponseContent videoAudioBytesDecoded(Long videoAudioBytesDecode * @return videoAudioBytesDecoded **/ @javax.annotation.Nullable + public Long getVideoAudioBytesDecoded() { return videoAudioBytesDecoded; } @@ -403,6 +412,7 @@ public HarEntryResponseContent comment(String comment) { * @return comment **/ @javax.annotation.Nullable + public String getComment() { return comment; } @@ -506,33 +516,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HarEntryResponseContent + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to HarEntryResponseContent */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HarEntryResponseContent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!HarEntryResponseContent.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in HarEntryResponseContent is not found in the empty JSON string", HarEntryResponseContent.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!HarEntryResponseContent.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntryResponseContent` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntryResponseContent` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : HarEntryResponseContent.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("mimeType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `mimeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mimeType").toString())); } @@ -567,9 +576,9 @@ public void write(JsonWriter out, HarEntryResponseContent value) throws IOExcept @Override public HarEntryResponseContent read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryTimings.java b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryTimings.java index 7890c2535d..9b83be9d9e 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/HarEntryTimings.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/HarEntryTimings.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,13 +14,13 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,10 +32,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -99,6 +95,7 @@ public HarEntryTimings dns(Long dns) { * @return dns **/ @javax.annotation.Nonnull + public Long getDns() { return dns; } @@ -121,6 +118,7 @@ public HarEntryTimings connect(Long connect) { * @return connect **/ @javax.annotation.Nonnull + public Long getConnect() { return connect; } @@ -143,6 +141,7 @@ public HarEntryTimings blocked(Long blocked) { * @return blocked **/ @javax.annotation.Nonnull + public Long getBlocked() { return blocked; } @@ -165,6 +164,7 @@ public HarEntryTimings send(Long send) { * @return send **/ @javax.annotation.Nonnull + public Long getSend() { return send; } @@ -187,6 +187,7 @@ public HarEntryTimings wait(Long wait) { * @return wait **/ @javax.annotation.Nonnull + public Long getWait() { return wait; } @@ -209,6 +210,7 @@ public HarEntryTimings receive(Long receive) { * @return receive **/ @javax.annotation.Nonnull + public Long getReceive() { return receive; } @@ -231,6 +233,7 @@ public HarEntryTimings ssl(Long ssl) { * @return ssl **/ @javax.annotation.Nonnull + public Long getSsl() { return ssl; } @@ -252,6 +255,7 @@ public HarEntryTimings comment(String comment) { * @return comment **/ @javax.annotation.Nullable + public String getComment() { return comment; } @@ -342,33 +346,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HarEntryTimings + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to HarEntryTimings */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HarEntryTimings.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!HarEntryTimings.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in HarEntryTimings is not found in the empty JSON string", HarEntryTimings.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!HarEntryTimings.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntryTimings` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarEntryTimings` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : HarEntryTimings.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); } @@ -394,9 +397,9 @@ public void write(JsonWriter out, HarEntryTimings value) throws IOException { @Override public HarEntryTimings read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/HarLog.java b/clients/java/src/main/java/com/browserup/proxy_client/HarLog.java index 85bb328734..2208b22ee9 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/HarLog.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/HarLog.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,6 +14,7 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.browserup.proxy_client.HarEntry; import com.browserup.proxy_client.HarLogCreator; import com.browserup.proxy_client.Page; @@ -24,7 +25,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -37,10 +37,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -95,6 +91,7 @@ public HarLog version(String version) { * @return version **/ @javax.annotation.Nonnull + public String getVersion() { return version; } @@ -116,6 +113,7 @@ public HarLog creator(HarLogCreator creator) { * @return creator **/ @javax.annotation.Nonnull + public HarLogCreator getCreator() { return creator; } @@ -137,6 +135,7 @@ public HarLog browser(HarLogCreator browser) { * @return browser **/ @javax.annotation.Nullable + public HarLogCreator getBrowser() { return browser; } @@ -154,9 +153,6 @@ public HarLog pages(List pages) { } public HarLog addPagesItem(Page pagesItem) { - if (this.pages == null) { - this.pages = new ArrayList<>(); - } this.pages.add(pagesItem); return this; } @@ -166,6 +162,7 @@ public HarLog addPagesItem(Page pagesItem) { * @return pages **/ @javax.annotation.Nonnull + public List getPages() { return pages; } @@ -183,9 +180,6 @@ public HarLog entries(List entries) { } public HarLog addEntriesItem(HarEntry entriesItem) { - if (this.entries == null) { - this.entries = new ArrayList<>(); - } this.entries.add(entriesItem); return this; } @@ -195,6 +189,7 @@ public HarLog addEntriesItem(HarEntry entriesItem) { * @return entries **/ @javax.annotation.Nonnull + public List getEntries() { return entries; } @@ -216,6 +211,7 @@ public HarLog comment(String comment) { * @return comment **/ @javax.annotation.Nullable + public String getComment() { return comment; } @@ -297,41 +293,40 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HarLog + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to HarLog */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HarLog.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!HarLog.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in HarLog is not found in the empty JSON string", HarLog.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!HarLog.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarLog` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarLog` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : HarLog.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("version").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `version` to be a primitive type in the JSON string but got `%s`", jsonObj.get("version").toString())); } // validate the required field `creator` - HarLogCreator.validateJsonElement(jsonObj.get("creator")); + HarLogCreator.validateJsonObject(jsonObj.getAsJsonObject("creator")); // validate the optional field `browser` if (jsonObj.get("browser") != null && !jsonObj.get("browser").isJsonNull()) { - HarLogCreator.validateJsonElement(jsonObj.get("browser")); + HarLogCreator.validateJsonObject(jsonObj.getAsJsonObject("browser")); } // ensure the required json array is present if (jsonObj.get("pages") == null) { @@ -347,7 +342,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray jsonArrayentries = jsonObj.getAsJsonArray("entries"); // validate the required field `entries` (array) for (int i = 0; i < jsonArrayentries.size(); i++) { - HarEntry.validateJsonElement(jsonArrayentries.get(i)); + HarEntry.validateJsonObject(jsonArrayentries.get(i).getAsJsonObject()); }; if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); @@ -374,9 +369,9 @@ public void write(JsonWriter out, HarLog value) throws IOException { @Override public HarLog read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/HarLogCreator.java b/clients/java/src/main/java/com/browserup/proxy_client/HarLogCreator.java index b26c4d6826..478c1075b2 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/HarLogCreator.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/HarLogCreator.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,13 +14,13 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,10 +32,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -78,6 +74,7 @@ public HarLogCreator name(String name) { * @return name **/ @javax.annotation.Nonnull + public String getName() { return name; } @@ -99,6 +96,7 @@ public HarLogCreator version(String version) { * @return version **/ @javax.annotation.Nonnull + public String getVersion() { return version; } @@ -120,6 +118,7 @@ public HarLogCreator comment(String comment) { * @return comment **/ @javax.annotation.Nullable + public String getComment() { return comment; } @@ -190,33 +189,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HarLogCreator + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to HarLogCreator */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HarLogCreator.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!HarLogCreator.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in HarLogCreator is not found in the empty JSON string", HarLogCreator.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!HarLogCreator.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarLogCreator` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HarLogCreator` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : HarLogCreator.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -248,9 +246,9 @@ public void write(JsonWriter out, HarLogCreator value) throws IOException { @Override public HarLogCreator read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/Header.java b/clients/java/src/main/java/com/browserup/proxy_client/Header.java index 38089a409c..b87e63d8af 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/Header.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/Header.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,13 +14,13 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,10 +32,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -78,6 +74,7 @@ public Header name(String name) { * @return name **/ @javax.annotation.Nonnull + public String getName() { return name; } @@ -99,6 +96,7 @@ public Header value(String value) { * @return value **/ @javax.annotation.Nonnull + public String getValue() { return value; } @@ -120,6 +118,7 @@ public Header comment(String comment) { * @return comment **/ @javax.annotation.Nullable + public String getComment() { return comment; } @@ -190,33 +189,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Header + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to Header */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Header.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!Header.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Header is not found in the empty JSON string", Header.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!Header.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Header` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Header` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Header.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -248,9 +246,9 @@ public void write(JsonWriter out, Header value) throws IOException { @Override public Header read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/JSON.java b/clients/java/src/main/java/com/browserup/proxy_client/JSON.java index d85f738cd3..9e49f3ec2f 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/JSON.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/JSON.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -95,12 +95,12 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.Action.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.Counter.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.Error.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.Har.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.HarEntry.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.HarEntryCache.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.HarEntryCacheBeforeRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.HarEntryCacheBeforeRequestOneOf.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.HarEntryRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.HarEntryRequestCookiesInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.HarEntryRequestPostData.CustomTypeAdapterFactory()); @@ -114,6 +114,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.Header.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.LargestContentfulPaint.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.MatchCriteria.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.MatchCriteriaRequestHeader.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.Metric.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.NameValuePair.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.Page.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.browserup.proxy_client.PageTiming.CustomTypeAdapterFactory()); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/LargestContentfulPaint.java b/clients/java/src/main/java/com/browserup/proxy_client/LargestContentfulPaint.java index 7abcb7b2b6..bc9fcfafa5 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/LargestContentfulPaint.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/LargestContentfulPaint.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,13 +14,13 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,10 +32,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -83,6 +79,7 @@ public LargestContentfulPaint startTime(Long startTime) { * @return startTime **/ @javax.annotation.Nullable + public Long getStartTime() { return startTime; } @@ -105,6 +102,7 @@ public LargestContentfulPaint size(Long size) { * @return size **/ @javax.annotation.Nullable + public Long getSize() { return size; } @@ -126,6 +124,7 @@ public LargestContentfulPaint domPath(String domPath) { * @return domPath **/ @javax.annotation.Nullable + public String getDomPath() { return domPath; } @@ -147,6 +146,7 @@ public LargestContentfulPaint tag(String tag) { * @return tag **/ @javax.annotation.Nullable + public String getTag() { return tag; } @@ -264,18 +264,17 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LargestContentfulPaint + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to LargestContentfulPaint */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LargestContentfulPaint.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!LargestContentfulPaint.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in LargestContentfulPaint is not found in the empty JSON string", LargestContentfulPaint.openapiRequiredFields.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("domPath") != null && !jsonObj.get("domPath").isJsonNull()) && !jsonObj.get("domPath").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `domPath` to be a primitive type in the JSON string but got `%s`", jsonObj.get("domPath").toString())); } @@ -321,9 +320,8 @@ else if (entry.getValue() instanceof Character) @Override public LargestContentfulPaint read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); // store additional fields in the deserialized instance LargestContentfulPaint instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { diff --git a/clients/java/src/main/java/com/browserup/proxy_client/MatchCriteria.java b/clients/java/src/main/java/com/browserup/proxy_client/MatchCriteria.java index 1ed0eae26c..5d4778859a 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/MatchCriteria.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/MatchCriteria.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,14 +14,14 @@ package com.browserup.proxy_client; import java.util.Objects; -import com.browserup.proxy_client.NameValuePair; +import java.util.Arrays; +import com.browserup.proxy_client.MatchCriteriaRequestHeader; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,10 +33,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -79,19 +75,19 @@ public class MatchCriteria { public static final String SERIALIZED_NAME_REQUEST_HEADER = "request_header"; @SerializedName(SERIALIZED_NAME_REQUEST_HEADER) - private NameValuePair requestHeader; + private MatchCriteriaRequestHeader requestHeader; public static final String SERIALIZED_NAME_REQUEST_COOKIE = "request_cookie"; @SerializedName(SERIALIZED_NAME_REQUEST_COOKIE) - private NameValuePair requestCookie; + private MatchCriteriaRequestHeader requestCookie; public static final String SERIALIZED_NAME_RESPONSE_HEADER = "response_header"; @SerializedName(SERIALIZED_NAME_RESPONSE_HEADER) - private NameValuePair responseHeader; + private MatchCriteriaRequestHeader responseHeader; public static final String SERIALIZED_NAME_RESPONSE_COOKIE = "response_cookie"; @SerializedName(SERIALIZED_NAME_RESPONSE_COOKIE) - private NameValuePair responseCookie; + private MatchCriteriaRequestHeader responseCookie; public static final String SERIALIZED_NAME_JSON_VALID = "json_valid"; @SerializedName(SERIALIZED_NAME_JSON_VALID) @@ -123,6 +119,7 @@ public MatchCriteria url(String url) { * @return url **/ @javax.annotation.Nullable + public String getUrl() { return url; } @@ -144,6 +141,7 @@ public MatchCriteria page(String page) { * @return page **/ @javax.annotation.Nullable + public String getPage() { return page; } @@ -165,6 +163,7 @@ public MatchCriteria status(String status) { * @return status **/ @javax.annotation.Nullable + public String getStatus() { return status; } @@ -186,6 +185,7 @@ public MatchCriteria content(String content) { * @return content **/ @javax.annotation.Nullable + public String getContent() { return content; } @@ -207,6 +207,7 @@ public MatchCriteria contentType(String contentType) { * @return contentType **/ @javax.annotation.Nullable + public String getContentType() { return contentType; } @@ -228,6 +229,7 @@ public MatchCriteria websocketMessage(String websocketMessage) { * @return websocketMessage **/ @javax.annotation.Nullable + public String getWebsocketMessage() { return websocketMessage; } @@ -238,7 +240,7 @@ public void setWebsocketMessage(String websocketMessage) { } - public MatchCriteria requestHeader(NameValuePair requestHeader) { + public MatchCriteria requestHeader(MatchCriteriaRequestHeader requestHeader) { this.requestHeader = requestHeader; return this; @@ -249,17 +251,18 @@ public MatchCriteria requestHeader(NameValuePair requestHeader) { * @return requestHeader **/ @javax.annotation.Nullable - public NameValuePair getRequestHeader() { + + public MatchCriteriaRequestHeader getRequestHeader() { return requestHeader; } - public void setRequestHeader(NameValuePair requestHeader) { + public void setRequestHeader(MatchCriteriaRequestHeader requestHeader) { this.requestHeader = requestHeader; } - public MatchCriteria requestCookie(NameValuePair requestCookie) { + public MatchCriteria requestCookie(MatchCriteriaRequestHeader requestCookie) { this.requestCookie = requestCookie; return this; @@ -270,17 +273,18 @@ public MatchCriteria requestCookie(NameValuePair requestCookie) { * @return requestCookie **/ @javax.annotation.Nullable - public NameValuePair getRequestCookie() { + + public MatchCriteriaRequestHeader getRequestCookie() { return requestCookie; } - public void setRequestCookie(NameValuePair requestCookie) { + public void setRequestCookie(MatchCriteriaRequestHeader requestCookie) { this.requestCookie = requestCookie; } - public MatchCriteria responseHeader(NameValuePair responseHeader) { + public MatchCriteria responseHeader(MatchCriteriaRequestHeader responseHeader) { this.responseHeader = responseHeader; return this; @@ -291,17 +295,18 @@ public MatchCriteria responseHeader(NameValuePair responseHeader) { * @return responseHeader **/ @javax.annotation.Nullable - public NameValuePair getResponseHeader() { + + public MatchCriteriaRequestHeader getResponseHeader() { return responseHeader; } - public void setResponseHeader(NameValuePair responseHeader) { + public void setResponseHeader(MatchCriteriaRequestHeader responseHeader) { this.responseHeader = responseHeader; } - public MatchCriteria responseCookie(NameValuePair responseCookie) { + public MatchCriteria responseCookie(MatchCriteriaRequestHeader responseCookie) { this.responseCookie = responseCookie; return this; @@ -312,12 +317,13 @@ public MatchCriteria responseCookie(NameValuePair responseCookie) { * @return responseCookie **/ @javax.annotation.Nullable - public NameValuePair getResponseCookie() { + + public MatchCriteriaRequestHeader getResponseCookie() { return responseCookie; } - public void setResponseCookie(NameValuePair responseCookie) { + public void setResponseCookie(MatchCriteriaRequestHeader responseCookie) { this.responseCookie = responseCookie; } @@ -333,6 +339,7 @@ public MatchCriteria jsonValid(Boolean jsonValid) { * @return jsonValid **/ @javax.annotation.Nullable + public Boolean getJsonValid() { return jsonValid; } @@ -354,6 +361,7 @@ public MatchCriteria jsonPath(String jsonPath) { * @return jsonPath **/ @javax.annotation.Nullable + public String getJsonPath() { return jsonPath; } @@ -375,6 +383,7 @@ public MatchCriteria jsonSchema(String jsonSchema) { * @return jsonSchema **/ @javax.annotation.Nullable + public String getJsonSchema() { return jsonSchema; } @@ -396,6 +405,7 @@ public MatchCriteria errorIfNoTraffic(Boolean errorIfNoTraffic) { * @return errorIfNoTraffic **/ @javax.annotation.Nullable + public Boolean getErrorIfNoTraffic() { return errorIfNoTraffic; } @@ -497,26 +507,25 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MatchCriteria + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to MatchCriteria */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MatchCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!MatchCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in MatchCriteria is not found in the empty JSON string", MatchCriteria.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!MatchCriteria.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MatchCriteria` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MatchCriteria` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } @@ -537,19 +546,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `request_header` if (jsonObj.get("request_header") != null && !jsonObj.get("request_header").isJsonNull()) { - NameValuePair.validateJsonElement(jsonObj.get("request_header")); + MatchCriteriaRequestHeader.validateJsonObject(jsonObj.getAsJsonObject("request_header")); } // validate the optional field `request_cookie` if (jsonObj.get("request_cookie") != null && !jsonObj.get("request_cookie").isJsonNull()) { - NameValuePair.validateJsonElement(jsonObj.get("request_cookie")); + MatchCriteriaRequestHeader.validateJsonObject(jsonObj.getAsJsonObject("request_cookie")); } // validate the optional field `response_header` if (jsonObj.get("response_header") != null && !jsonObj.get("response_header").isJsonNull()) { - NameValuePair.validateJsonElement(jsonObj.get("response_header")); + MatchCriteriaRequestHeader.validateJsonObject(jsonObj.getAsJsonObject("response_header")); } // validate the optional field `response_cookie` if (jsonObj.get("response_cookie") != null && !jsonObj.get("response_cookie").isJsonNull()) { - NameValuePair.validateJsonElement(jsonObj.get("response_cookie")); + MatchCriteriaRequestHeader.validateJsonObject(jsonObj.getAsJsonObject("response_cookie")); } if ((jsonObj.get("json_path") != null && !jsonObj.get("json_path").isJsonNull()) && !jsonObj.get("json_path").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `json_path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("json_path").toString())); @@ -579,9 +588,9 @@ public void write(JsonWriter out, MatchCriteria value) throws IOException { @Override public MatchCriteria read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/MatchCriteriaRequestHeader.java b/clients/java/src/main/java/com/browserup/proxy_client/MatchCriteriaRequestHeader.java index 5579803454..b94a5ee911 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/MatchCriteriaRequestHeader.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/MatchCriteriaRequestHeader.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -32,10 +32,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -74,6 +70,7 @@ public MatchCriteriaRequestHeader name(String name) { * @return name **/ @javax.annotation.Nullable + public String getName() { return name; } @@ -95,6 +92,7 @@ public MatchCriteriaRequestHeader value(String value) { * @return value **/ @javax.annotation.Nullable + public String getValue() { return value; } diff --git a/clients/java/src/main/java/com/browserup/proxy_client/Counter.java b/clients/java/src/main/java/com/browserup/proxy_client/Metric.java similarity index 67% rename from clients/java/src/main/java/com/browserup/proxy_client/Counter.java rename to clients/java/src/main/java/com/browserup/proxy_client/Metric.java index c92656a15e..78fcc61193 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/Counter.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/Metric.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,13 +14,13 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,10 +32,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -48,10 +44,10 @@ import com.browserup.proxy_client.JSON; /** - * Counter + * Metric */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Counter { +public class Metric { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -60,20 +56,21 @@ public class Counter { @SerializedName(SERIALIZED_NAME_VALUE) private Double value; - public Counter() { + public Metric() { } - public Counter name(String name) { + public Metric name(String name) { this.name = name; return this; } /** - * Name of Custom Counter to add to the page under _counters + * Name of Custom Metric to add to the page under _metrics * @return name **/ @javax.annotation.Nullable + public String getName() { return name; } @@ -84,17 +81,18 @@ public void setName(String name) { } - public Counter value(Double value) { + public Metric value(Double value) { this.value = value; return this; } /** - * Value for the counter + * Value for the metric * @return value **/ @javax.annotation.Nullable + public Double getValue() { return value; } @@ -114,9 +112,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Counter counter = (Counter) o; - return Objects.equals(this.name, counter.name) && - Objects.equals(this.value, counter.value); + Metric metric = (Metric) o; + return Objects.equals(this.name, metric.name) && + Objects.equals(this.value, metric.value); } @Override @@ -127,7 +125,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Counter {\n"); + sb.append("class Metric {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append("}"); @@ -160,26 +158,25 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Counter + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to Metric */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Counter.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Counter is not found in the empty JSON string", Counter.openapiRequiredFields.toString())); + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!Metric.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Metric is not found in the empty JSON string", Metric.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { - if (!Counter.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Counter` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!Metric.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Metric` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -189,25 +186,25 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!Counter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Counter' and its subtypes + if (!Metric.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Metric' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Counter.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Metric.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, Counter value) throws IOException { + public void write(JsonWriter out, Metric value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public Counter read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + public Metric read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); @@ -215,18 +212,18 @@ public Counter read(JsonReader in) throws IOException { } /** - * Create an instance of Counter given an JSON string + * Create an instance of Metric given an JSON string * * @param jsonString JSON string - * @return An instance of Counter - * @throws IOException if the JSON string is invalid with respect to Counter + * @return An instance of Metric + * @throws IOException if the JSON string is invalid with respect to Metric */ - public static Counter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Counter.class); + public static Metric fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Metric.class); } /** - * Convert an instance of Counter to an JSON string + * Convert an instance of Metric to an JSON string * * @return JSON string */ diff --git a/clients/java/src/main/java/com/browserup/proxy_client/NameValuePair.java b/clients/java/src/main/java/com/browserup/proxy_client/NameValuePair.java index bf08b3da48..b07f1a295e 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/NameValuePair.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/NameValuePair.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,13 +14,13 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,10 +32,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -74,6 +70,7 @@ public NameValuePair name(String name) { * @return name **/ @javax.annotation.Nullable + public String getName() { return name; } @@ -95,6 +92,7 @@ public NameValuePair value(String value) { * @return value **/ @javax.annotation.Nullable + public String getValue() { return value; } @@ -160,26 +158,25 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to NameValuePair + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to NameValuePair */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!NameValuePair.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!NameValuePair.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in NameValuePair is not found in the empty JSON string", NameValuePair.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!NameValuePair.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NameValuePair` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NameValuePair` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -208,9 +205,9 @@ public void write(JsonWriter out, NameValuePair value) throws IOException { @Override public NameValuePair read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/Page.java b/clients/java/src/main/java/com/browserup/proxy_client/Page.java index f5254c44ee..6661bdbe36 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/Page.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/Page.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,8 +14,9 @@ package com.browserup.proxy_client; import java.util.Objects; -import com.browserup.proxy_client.Counter; +import java.util.Arrays; import com.browserup.proxy_client.Error; +import com.browserup.proxy_client.Metric; import com.browserup.proxy_client.PageTimings; import com.browserup.proxy_client.VerifyResult; import com.google.gson.TypeAdapter; @@ -26,7 +27,6 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import com.google.gson.Gson; @@ -39,10 +39,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -73,15 +69,15 @@ public class Page { public static final String SERIALIZED_NAME_VERIFICATIONS = "_verifications"; @SerializedName(SERIALIZED_NAME_VERIFICATIONS) - private List verifications = new ArrayList<>(); + private List verifications = null; - public static final String SERIALIZED_NAME_COUNTERS = "_counters"; - @SerializedName(SERIALIZED_NAME_COUNTERS) - private List counters = new ArrayList<>(); + public static final String SERIALIZED_NAME_METRICS = "_metrics"; + @SerializedName(SERIALIZED_NAME_METRICS) + private List metrics = null; public static final String SERIALIZED_NAME_ERRORS = "_errors"; @SerializedName(SERIALIZED_NAME_ERRORS) - private List errors = new ArrayList<>(); + private List errors = null; public static final String SERIALIZED_NAME_PAGE_TIMINGS = "pageTimings"; @SerializedName(SERIALIZED_NAME_PAGE_TIMINGS) @@ -105,6 +101,7 @@ public Page startedDateTime(OffsetDateTime startedDateTime) { * @return startedDateTime **/ @javax.annotation.Nonnull + public OffsetDateTime getStartedDateTime() { return startedDateTime; } @@ -126,6 +123,7 @@ public Page id(String id) { * @return id **/ @javax.annotation.Nonnull + public String getId() { return id; } @@ -147,6 +145,7 @@ public Page title(String title) { * @return title **/ @javax.annotation.Nonnull + public String getTitle() { return title; } @@ -165,7 +164,7 @@ public Page verifications(List verifications) { public Page addVerificationsItem(VerifyResult verificationsItem) { if (this.verifications == null) { - this.verifications = new ArrayList<>(); + this.verifications = null; } this.verifications.add(verificationsItem); return this; @@ -176,6 +175,7 @@ public Page addVerificationsItem(VerifyResult verificationsItem) { * @return verifications **/ @javax.annotation.Nullable + public List getVerifications() { return verifications; } @@ -186,32 +186,33 @@ public void setVerifications(List verifications) { } - public Page counters(List counters) { + public Page metrics(List metrics) { - this.counters = counters; + this.metrics = metrics; return this; } - public Page addCountersItem(Counter countersItem) { - if (this.counters == null) { - this.counters = new ArrayList<>(); + public Page addMetricsItem(Metric metricsItem) { + if (this.metrics == null) { + this.metrics = null; } - this.counters.add(countersItem); + this.metrics.add(metricsItem); return this; } /** - * Get counters - * @return counters + * Get metrics + * @return metrics **/ @javax.annotation.Nullable - public List getCounters() { - return counters; + + public List getMetrics() { + return metrics; } - public void setCounters(List counters) { - this.counters = counters; + public void setMetrics(List metrics) { + this.metrics = metrics; } @@ -223,7 +224,7 @@ public Page errors(List errors) { public Page addErrorsItem(Error errorsItem) { if (this.errors == null) { - this.errors = new ArrayList<>(); + this.errors = null; } this.errors.add(errorsItem); return this; @@ -234,6 +235,7 @@ public Page addErrorsItem(Error errorsItem) { * @return errors **/ @javax.annotation.Nullable + public List getErrors() { return errors; } @@ -255,6 +257,7 @@ public Page pageTimings(PageTimings pageTimings) { * @return pageTimings **/ @javax.annotation.Nonnull + public PageTimings getPageTimings() { return pageTimings; } @@ -276,6 +279,7 @@ public Page comment(String comment) { * @return comment **/ @javax.annotation.Nullable + public String getComment() { return comment; } @@ -344,7 +348,7 @@ public boolean equals(Object o) { Objects.equals(this.id, page.id) && Objects.equals(this.title, page.title) && Objects.equals(this.verifications, page.verifications) && - Objects.equals(this.counters, page.counters) && + Objects.equals(this.metrics, page.metrics) && Objects.equals(this.errors, page.errors) && Objects.equals(this.pageTimings, page.pageTimings) && Objects.equals(this.comment, page.comment)&& @@ -353,7 +357,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(startedDateTime, id, title, verifications, counters, errors, pageTimings, comment, additionalProperties); + return Objects.hash(startedDateTime, id, title, verifications, metrics, errors, pageTimings, comment, additionalProperties); } @Override @@ -364,7 +368,7 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" verifications: ").append(toIndentedString(verifications)).append("\n"); - sb.append(" counters: ").append(toIndentedString(counters)).append("\n"); + sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" pageTimings: ").append(toIndentedString(pageTimings)).append("\n"); sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); @@ -395,7 +399,7 @@ private String toIndentedString(Object o) { openapiFields.add("id"); openapiFields.add("title"); openapiFields.add("_verifications"); - openapiFields.add("_counters"); + openapiFields.add("_metrics"); openapiFields.add("_errors"); openapiFields.add("pageTimings"); openapiFields.add("comment"); @@ -409,25 +413,24 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Page + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to Page */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Page.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!Page.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in Page is not found in the empty JSON string", Page.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Page.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } @@ -444,21 +447,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `_verifications` (array) for (int i = 0; i < jsonArrayverifications.size(); i++) { - VerifyResult.validateJsonElement(jsonArrayverifications.get(i)); + VerifyResult.validateJsonObject(jsonArrayverifications.get(i).getAsJsonObject()); }; } } - if (jsonObj.get("_counters") != null && !jsonObj.get("_counters").isJsonNull()) { - JsonArray jsonArraycounters = jsonObj.getAsJsonArray("_counters"); - if (jsonArraycounters != null) { + if (jsonObj.get("_metrics") != null && !jsonObj.get("_metrics").isJsonNull()) { + JsonArray jsonArraymetrics = jsonObj.getAsJsonArray("_metrics"); + if (jsonArraymetrics != null) { // ensure the json data is an array - if (!jsonObj.get("_counters").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `_counters` to be an array in the JSON string but got `%s`", jsonObj.get("_counters").toString())); + if (!jsonObj.get("_metrics").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `_metrics` to be an array in the JSON string but got `%s`", jsonObj.get("_metrics").toString())); } - // validate the optional field `_counters` (array) - for (int i = 0; i < jsonArraycounters.size(); i++) { - Counter.validateJsonElement(jsonArraycounters.get(i)); + // validate the optional field `_metrics` (array) + for (int i = 0; i < jsonArraymetrics.size(); i++) { + Metric.validateJsonObject(jsonArraymetrics.get(i).getAsJsonObject()); }; } } @@ -472,7 +475,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `_errors` (array) for (int i = 0; i < jsonArrayerrors.size(); i++) { - Error.validateJsonElement(jsonArrayerrors.get(i)); + Error.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); }; } } @@ -518,9 +521,8 @@ else if (entry.getValue() instanceof Character) @Override public Page read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); // store additional fields in the deserialized instance Page instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { diff --git a/clients/java/src/main/java/com/browserup/proxy_client/PageTiming.java b/clients/java/src/main/java/com/browserup/proxy_client/PageTiming.java index d25d4f2316..df8ed63173 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/PageTiming.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/PageTiming.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,6 +14,7 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,7 +22,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.math.BigDecimal; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,10 +33,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -115,6 +111,7 @@ public PageTiming onContentLoad(BigDecimal onContentLoad) { * @return onContentLoad **/ @javax.annotation.Nullable + public BigDecimal getOnContentLoad() { return onContentLoad; } @@ -136,6 +133,7 @@ public PageTiming onLoad(BigDecimal onLoad) { * @return onLoad **/ @javax.annotation.Nullable + public BigDecimal getOnLoad() { return onLoad; } @@ -157,6 +155,7 @@ public PageTiming firstInputDelay(BigDecimal firstInputDelay) { * @return firstInputDelay **/ @javax.annotation.Nullable + public BigDecimal getFirstInputDelay() { return firstInputDelay; } @@ -178,6 +177,7 @@ public PageTiming firstPaint(BigDecimal firstPaint) { * @return firstPaint **/ @javax.annotation.Nullable + public BigDecimal getFirstPaint() { return firstPaint; } @@ -199,6 +199,7 @@ public PageTiming cumulativeLayoutShift(BigDecimal cumulativeLayoutShift) { * @return cumulativeLayoutShift **/ @javax.annotation.Nullable + public BigDecimal getCumulativeLayoutShift() { return cumulativeLayoutShift; } @@ -220,6 +221,7 @@ public PageTiming largestContentfulPaint(BigDecimal largestContentfulPaint) { * @return largestContentfulPaint **/ @javax.annotation.Nullable + public BigDecimal getLargestContentfulPaint() { return largestContentfulPaint; } @@ -241,6 +243,7 @@ public PageTiming domInteractive(BigDecimal domInteractive) { * @return domInteractive **/ @javax.annotation.Nullable + public BigDecimal getDomInteractive() { return domInteractive; } @@ -262,6 +265,7 @@ public PageTiming firstContentfulPaint(BigDecimal firstContentfulPaint) { * @return firstContentfulPaint **/ @javax.annotation.Nullable + public BigDecimal getFirstContentfulPaint() { return firstContentfulPaint; } @@ -283,6 +287,7 @@ public PageTiming dns(BigDecimal dns) { * @return dns **/ @javax.annotation.Nullable + public BigDecimal getDns() { return dns; } @@ -304,6 +309,7 @@ public PageTiming ssl(BigDecimal ssl) { * @return ssl **/ @javax.annotation.Nullable + public BigDecimal getSsl() { return ssl; } @@ -325,6 +331,7 @@ public PageTiming timeToFirstByte(BigDecimal timeToFirstByte) { * @return timeToFirstByte **/ @javax.annotation.Nullable + public BigDecimal getTimeToFirstByte() { return timeToFirstByte; } @@ -346,6 +353,7 @@ public PageTiming href(String href) { * @return href **/ @javax.annotation.Nullable + public String getHref() { return href; } @@ -441,26 +449,25 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PageTiming + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to PageTiming */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PageTiming.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!PageTiming.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PageTiming is not found in the empty JSON string", PageTiming.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!PageTiming.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PageTiming` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PageTiming` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("_href") != null && !jsonObj.get("_href").isJsonNull()) && !jsonObj.get("_href").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `_href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("_href").toString())); } @@ -486,9 +493,9 @@ public void write(JsonWriter out, PageTiming value) throws IOException { @Override public PageTiming read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/PageTimings.java b/clients/java/src/main/java/com/browserup/proxy_client/PageTimings.java index 203dbad1f6..5fb5bbdadb 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/PageTimings.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/PageTimings.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,6 +14,7 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.browserup.proxy_client.LargestContentfulPaint; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -21,7 +22,6 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,10 +33,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -120,6 +116,7 @@ public PageTimings onContentLoad(Long onContentLoad) { * @return onContentLoad **/ @javax.annotation.Nonnull + public Long getOnContentLoad() { return onContentLoad; } @@ -142,6 +139,7 @@ public PageTimings onLoad(Long onLoad) { * @return onLoad **/ @javax.annotation.Nonnull + public Long getOnLoad() { return onLoad; } @@ -163,6 +161,7 @@ public PageTimings href(String href) { * @return href **/ @javax.annotation.Nullable + public String getHref() { return href; } @@ -185,6 +184,7 @@ public PageTimings dns(Long dns) { * @return dns **/ @javax.annotation.Nullable + public Long getDns() { return dns; } @@ -207,6 +207,7 @@ public PageTimings ssl(Long ssl) { * @return ssl **/ @javax.annotation.Nullable + public Long getSsl() { return ssl; } @@ -229,6 +230,7 @@ public PageTimings timeToFirstByte(Long timeToFirstByte) { * @return timeToFirstByte **/ @javax.annotation.Nullable + public Long getTimeToFirstByte() { return timeToFirstByte; } @@ -251,6 +253,7 @@ public PageTimings cumulativeLayoutShift(Float cumulativeLayoutShift) { * @return cumulativeLayoutShift **/ @javax.annotation.Nullable + public Float getCumulativeLayoutShift() { return cumulativeLayoutShift; } @@ -272,6 +275,7 @@ public PageTimings largestContentfulPaint(LargestContentfulPaint largestContentf * @return largestContentfulPaint **/ @javax.annotation.Nullable + public LargestContentfulPaint getLargestContentfulPaint() { return largestContentfulPaint; } @@ -294,6 +298,7 @@ public PageTimings firstPaint(Long firstPaint) { * @return firstPaint **/ @javax.annotation.Nullable + public Long getFirstPaint() { return firstPaint; } @@ -316,6 +321,7 @@ public PageTimings firstInputDelay(Float firstInputDelay) { * @return firstInputDelay **/ @javax.annotation.Nullable + public Float getFirstInputDelay() { return firstInputDelay; } @@ -338,6 +344,7 @@ public PageTimings domInteractive(Long domInteractive) { * @return domInteractive **/ @javax.annotation.Nullable + public Long getDomInteractive() { return domInteractive; } @@ -360,6 +367,7 @@ public PageTimings firstContentfulPaint(Long firstContentfulPaint) { * @return firstContentfulPaint **/ @javax.annotation.Nullable + public Long getFirstContentfulPaint() { return firstContentfulPaint; } @@ -381,6 +389,7 @@ public PageTimings comment(String comment) { * @return comment **/ @javax.annotation.Nullable + public String getComment() { return comment; } @@ -527,25 +536,24 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PageTimings + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to PageTimings */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PageTimings.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!PageTimings.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in PageTimings is not found in the empty JSON string", PageTimings.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : PageTimings.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("_href") != null && !jsonObj.get("_href").isJsonNull()) && !jsonObj.get("_href").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `_href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("_href").toString())); } @@ -591,9 +599,8 @@ else if (entry.getValue() instanceof Character) @Override public PageTimings read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); // store additional fields in the deserialized instance PageTimings instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { diff --git a/clients/java/src/main/java/com/browserup/proxy_client/Pair.java b/clients/java/src/main/java/com/browserup/proxy_client/Pair.java index 6b72854fc6..0acae26640 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/Pair.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/Pair.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/main/java/com/browserup/proxy_client/ProgressRequestBody.java b/clients/java/src/main/java/com/browserup/proxy_client/ProgressRequestBody.java index 6f7b18a75c..418d738f44 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/ProgressRequestBody.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/ProgressRequestBody.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/main/java/com/browserup/proxy_client/ProgressResponseBody.java b/clients/java/src/main/java/com/browserup/proxy_client/ProgressResponseBody.java index eca1597fef..d017f01f6f 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/ProgressResponseBody.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/ProgressResponseBody.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/main/java/com/browserup/proxy_client/StringUtil.java b/clients/java/src/main/java/com/browserup/proxy_client/StringUtil.java index b405063b8c..f9c1f016e5 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/StringUtil.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/StringUtil.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/main/java/com/browserup/proxy_client/VerifyResult.java b/clients/java/src/main/java/com/browserup/proxy_client/VerifyResult.java index 0c3edffd75..2a887e6956 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/VerifyResult.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/VerifyResult.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,13 +14,13 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -32,10 +32,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -78,6 +74,7 @@ public VerifyResult result(Boolean result) { * @return result **/ @javax.annotation.Nullable + public Boolean getResult() { return result; } @@ -99,6 +96,7 @@ public VerifyResult name(String name) { * @return name **/ @javax.annotation.Nullable + public String getName() { return name; } @@ -120,6 +118,7 @@ public VerifyResult type(String type) { * @return type **/ @javax.annotation.Nullable + public String getType() { return type; } @@ -188,26 +187,25 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to VerifyResult + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to VerifyResult */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!VerifyResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!VerifyResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in VerifyResult is not found in the empty JSON string", VerifyResult.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!VerifyResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VerifyResult` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `VerifyResult` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } @@ -236,9 +234,9 @@ public void write(JsonWriter out, VerifyResult value) throws IOException { @Override public VerifyResult read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/WebSocketMessage.java b/clients/java/src/main/java/com/browserup/proxy_client/WebSocketMessage.java index 3a7ca36fb9..7fac9c7a5e 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/WebSocketMessage.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/WebSocketMessage.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,6 +14,7 @@ package com.browserup.proxy_client; import java.util.Objects; +import java.util.Arrays; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,7 +22,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.math.BigDecimal; -import java.util.Arrays; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -33,10 +33,6 @@ import com.google.gson.JsonParseException; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; import java.lang.reflect.Type; import java.util.HashMap; @@ -83,6 +79,7 @@ public WebSocketMessage type(String type) { * @return type **/ @javax.annotation.Nonnull + public String getType() { return type; } @@ -104,6 +101,7 @@ public WebSocketMessage opcode(BigDecimal opcode) { * @return opcode **/ @javax.annotation.Nonnull + public BigDecimal getOpcode() { return opcode; } @@ -125,6 +123,7 @@ public WebSocketMessage data(String data) { * @return data **/ @javax.annotation.Nonnull + public String getData() { return data; } @@ -146,6 +145,7 @@ public WebSocketMessage time(BigDecimal time) { * @return time **/ @javax.annotation.Nonnull + public BigDecimal getTime() { return time; } @@ -221,33 +221,32 @@ private String toIndentedString(Object o) { } /** - * Validates the JSON Element and throws an exception if issues found + * Validates the JSON Object and throws an exception if issues found * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to WebSocketMessage + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to WebSocketMessage */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!WebSocketMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!WebSocketMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null throw new IllegalArgumentException(String.format("The required field(s) %s in WebSocketMessage is not found in the empty JSON string", WebSocketMessage.openapiRequiredFields.toString())); } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); + Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { if (!WebSocketMessage.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `WebSocketMessage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `WebSocketMessage` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : WebSocketMessage.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -276,9 +275,9 @@ public void write(JsonWriter out, WebSocketMessage value) throws IOException { @Override public WebSocketMessage read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); } }.nullSafe(); diff --git a/clients/java/src/main/java/com/browserup/proxy_client/auth/ApiKeyAuth.java b/clients/java/src/main/java/com/browserup/proxy_client/auth/ApiKeyAuth.java index a701f99285..b153f16fd9 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/auth/ApiKeyAuth.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/auth/ApiKeyAuth.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/main/java/com/browserup/proxy_client/auth/Authentication.java b/clients/java/src/main/java/com/browserup/proxy_client/auth/Authentication.java index a66ca96281..682e2fe0aa 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/auth/Authentication.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/auth/Authentication.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/main/java/com/browserup/proxy_client/auth/HttpBasicAuth.java b/clients/java/src/main/java/com/browserup/proxy_client/auth/HttpBasicAuth.java index 00b1bb2662..7560bfa561 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/auth/HttpBasicAuth.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/auth/HttpBasicAuth.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/main/java/com/browserup/proxy_client/auth/HttpBearerAuth.java b/clients/java/src/main/java/com/browserup/proxy_client/auth/HttpBearerAuth.java index 1918dee6fe..107da8f407 100644 --- a/clients/java/src/main/java/com/browserup/proxy_client/auth/HttpBearerAuth.java +++ b/clients/java/src/main/java/com/browserup/proxy_client/auth/HttpBearerAuth.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy/api/BrowserUpProxyApiTest.java b/clients/java/src/test/java/com/browserup/proxy/api/BrowserUpProxyApiTest.java index 300b57f091..8b8e6733a2 100644 --- a/clients/java/src/test/java/com/browserup/proxy/api/BrowserUpProxyApiTest.java +++ b/clients/java/src/test/java/com/browserup/proxy/api/BrowserUpProxyApiTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ package com.browserup.proxy.api; import com.browserup.proxy_client.ApiException; -import com.browserup.proxy_client.Counter; import com.browserup.proxy_client.Error; import com.browserup.proxy_client.Har; import com.browserup.proxy_client.MatchCriteria; +import com.browserup.proxy_client.Metric; import com.browserup.proxy_client.VerifyResult; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -36,26 +36,26 @@ public class BrowserUpProxyApiTest { private final BrowserUpProxyApi api = new BrowserUpProxyApi(); /** - * Add Custom Counter to the captured traffic har + * Add Custom Error to the captured traffic har * * @throws ApiException if the Api call fails */ @Test - public void addCounterTest() throws ApiException { - Counter counter = null; - api.addCounter(counter); + public void addErrorTest() throws ApiException { + Error error = null; + api.addError(error); // TODO: test validations } /** - * Add Custom Error to the captured traffic har + * Add Custom Metric to the captured traffic har * * @throws ApiException if the Api call fails */ @Test - public void addErrorTest() throws ApiException { - Error error = null; - api.addError(error); + public void addMetricTest() throws ApiException { + Metric metric = null; + api.addMetric(metric); // TODO: test validations } diff --git a/clients/java/src/test/java/com/browserup/proxy_client/ActionTest.java b/clients/java/src/test/java/com/browserup/proxy_client/ActionTest.java index 515ed51c85..d533000b13 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/ActionTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/ActionTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/ErrorTest.java b/clients/java/src/test/java/com/browserup/proxy_client/ErrorTest.java index 83592b6d39..a24cd70460 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/ErrorTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/ErrorTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -38,19 +38,19 @@ public void testError() { } /** - * Test the property 'details' + * Test the property 'name' */ @Test - public void detailsTest() { - // TODO: test details + public void nameTest() { + // TODO: test name } /** - * Test the property 'name' + * Test the property 'details' */ @Test - public void nameTest() { - // TODO: test name + public void detailsTest() { + // TODO: test details } } diff --git a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryCacheBeforeRequestOneOfTest.java b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryCacheBeforeRequestOneOfTest.java index 4cb856d8e7..308d9e366c 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryCacheBeforeRequestOneOfTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryCacheBeforeRequestOneOfTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryCacheBeforeRequestTest.java b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryCacheBeforeRequestTest.java index 8d994c4615..b464635d2b 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryCacheBeforeRequestTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryCacheBeforeRequestTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryCacheTest.java b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryCacheTest.java index b46f9c08ee..eadf37a0b8 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryCacheTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryCacheTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestCookiesInnerTest.java b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestCookiesInnerTest.java index 4d89e95d87..659dbb4865 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestCookiesInnerTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestCookiesInnerTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestPostDataParamsInnerTest.java b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestPostDataParamsInnerTest.java index bbb6ab0790..ce2cad94fe 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestPostDataParamsInnerTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestPostDataParamsInnerTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestPostDataTest.java b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestPostDataTest.java index 18063bd864..a0528c46a1 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestPostDataTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestPostDataTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestQueryStringInnerTest.java b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestQueryStringInnerTest.java index 16e6f228c3..60dd104b19 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestQueryStringInnerTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestQueryStringInnerTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestTest.java b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestTest.java index 9598ac3616..52643081c8 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryRequestTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -23,7 +23,6 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.net.URI; import java.util.ArrayList; import java.util.List; import org.junit.jupiter.api.Disabled; diff --git a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryResponseContentTest.java b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryResponseContentTest.java index 24cd5756d7..22b352a0dd 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryResponseContentTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryResponseContentTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -77,6 +77,70 @@ public void encodingTest() { // TODO: test encoding } + /** + * Test the property 'videoBufferedPercent' + */ + @Test + public void videoBufferedPercentTest() { + // TODO: test videoBufferedPercent + } + + /** + * Test the property 'videoStallCount' + */ + @Test + public void videoStallCountTest() { + // TODO: test videoStallCount + } + + /** + * Test the property 'videoDecodedByteCount' + */ + @Test + public void videoDecodedByteCountTest() { + // TODO: test videoDecodedByteCount + } + + /** + * Test the property 'videoWaitingCount' + */ + @Test + public void videoWaitingCountTest() { + // TODO: test videoWaitingCount + } + + /** + * Test the property 'videoErrorCount' + */ + @Test + public void videoErrorCountTest() { + // TODO: test videoErrorCount + } + + /** + * Test the property 'videoDroppedFrames' + */ + @Test + public void videoDroppedFramesTest() { + // TODO: test videoDroppedFrames + } + + /** + * Test the property 'videoTotalFrames' + */ + @Test + public void videoTotalFramesTest() { + // TODO: test videoTotalFrames + } + + /** + * Test the property 'videoAudioBytesDecoded' + */ + @Test + public void videoAudioBytesDecodedTest() { + // TODO: test videoAudioBytesDecoded + } + /** * Test the property 'comment' */ diff --git a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryResponseTest.java b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryResponseTest.java index 02f233c253..56b0e6955a 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryResponseTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryResponseTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryTest.java b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryTest.java index d9d365f075..b737456c01 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryTimingsTest.java b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryTimingsTest.java index d9c4bd75a8..1d11223531 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/HarEntryTimingsTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/HarEntryTimingsTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/HarLogCreatorTest.java b/clients/java/src/test/java/com/browserup/proxy_client/HarLogCreatorTest.java index 3c7fae4a0b..1d7cc6d664 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/HarLogCreatorTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/HarLogCreatorTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/HarLogTest.java b/clients/java/src/test/java/com/browserup/proxy_client/HarLogTest.java index 0c9ff8e312..f419c8b085 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/HarLogTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/HarLogTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/HarTest.java b/clients/java/src/test/java/com/browserup/proxy_client/HarTest.java index 0c10d33222..d59fe8fb70 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/HarTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/HarTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/HeaderTest.java b/clients/java/src/test/java/com/browserup/proxy_client/HeaderTest.java index 5effb7d5d9..f088eab39b 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/HeaderTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/HeaderTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/LargestContentfulPaintTest.java b/clients/java/src/test/java/com/browserup/proxy_client/LargestContentfulPaintTest.java index 2ed38a1672..bedfc08f36 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/LargestContentfulPaintTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/LargestContentfulPaintTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/MatchCriteriaRequestHeaderTest.java b/clients/java/src/test/java/com/browserup/proxy_client/MatchCriteriaRequestHeaderTest.java index 10802f0c7b..7c27143c82 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/MatchCriteriaRequestHeaderTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/MatchCriteriaRequestHeaderTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -38,19 +38,19 @@ public void testMatchCriteriaRequestHeader() { } /** - * Test the property 'value' + * Test the property 'name' */ @Test - public void valueTest() { - // TODO: test value + public void nameTest() { + // TODO: test name } /** - * Test the property 'name' + * Test the property 'value' */ @Test - public void nameTest() { - // TODO: test name + public void valueTest() { + // TODO: test value } } diff --git a/clients/java/src/test/java/com/browserup/proxy_client/MatchCriteriaTest.java b/clients/java/src/test/java/com/browserup/proxy_client/MatchCriteriaTest.java index 398bfb4c55..44ce24c877 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/MatchCriteriaTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/MatchCriteriaTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/CounterTest.java b/clients/java/src/test/java/com/browserup/proxy_client/MetricTest.java similarity index 81% rename from clients/java/src/test/java/com/browserup/proxy_client/CounterTest.java rename to clients/java/src/test/java/com/browserup/proxy_client/MetricTest.java index 98946038e9..be94891b84 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/CounterTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/MetricTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -24,33 +24,33 @@ /** - * Model tests for Counter + * Model tests for Metric */ -public class CounterTest { - private final Counter model = new Counter(); +public class MetricTest { + private final Metric model = new Metric(); /** - * Model tests for Counter + * Model tests for Metric */ @Test - public void testCounter() { - // TODO: test Counter + public void testMetric() { + // TODO: test Metric } /** - * Test the property 'value' + * Test the property 'name' */ @Test - public void valueTest() { - // TODO: test value + public void nameTest() { + // TODO: test name } /** - * Test the property 'name' + * Test the property 'value' */ @Test - public void nameTest() { - // TODO: test name + public void valueTest() { + // TODO: test value } } diff --git a/clients/java/src/test/java/com/browserup/proxy_client/NameValuePairTest.java b/clients/java/src/test/java/com/browserup/proxy_client/NameValuePairTest.java index 761925f494..3655d483ad 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/NameValuePairTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/NameValuePairTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -38,19 +38,19 @@ public void testNameValuePair() { } /** - * Test the property 'value' + * Test the property 'name' */ @Test - public void valueTest() { - // TODO: test value + public void nameTest() { + // TODO: test name } /** - * Test the property 'name' + * Test the property 'value' */ @Test - public void nameTest() { - // TODO: test name + public void valueTest() { + // TODO: test value } } diff --git a/clients/java/src/test/java/com/browserup/proxy_client/PageTest.java b/clients/java/src/test/java/com/browserup/proxy_client/PageTest.java index ea39001996..f43b46ecef 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/PageTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/PageTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,8 +13,8 @@ package com.browserup.proxy_client; -import com.browserup.proxy_client.Counter; import com.browserup.proxy_client.Error; +import com.browserup.proxy_client.Metric; import com.browserup.proxy_client.PageTimings; import com.browserup.proxy_client.VerifyResult; import com.google.gson.TypeAdapter; @@ -77,11 +77,11 @@ public void verificationsTest() { } /** - * Test the property 'counters' + * Test the property 'metrics' */ @Test - public void countersTest() { - // TODO: test counters + public void metricsTest() { + // TODO: test metrics } /** diff --git a/clients/java/src/test/java/com/browserup/proxy_client/PageTimingTest.java b/clients/java/src/test/java/com/browserup/proxy_client/PageTimingTest.java index 7d866c68d9..966c95d460 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/PageTimingTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/PageTimingTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -39,99 +39,99 @@ public void testPageTiming() { } /** - * Test the property 'firstInputDelay' + * Test the property 'onContentLoad' */ @Test - public void firstInputDelayTest() { - // TODO: test firstInputDelay + public void onContentLoadTest() { + // TODO: test onContentLoad } /** - * Test the property 'domInteractive' + * Test the property 'onLoad' */ @Test - public void domInteractiveTest() { - // TODO: test domInteractive + public void onLoadTest() { + // TODO: test onLoad } /** - * Test the property 'cumulativeLayoutShift' + * Test the property 'firstInputDelay' */ @Test - public void cumulativeLayoutShiftTest() { - // TODO: test cumulativeLayoutShift + public void firstInputDelayTest() { + // TODO: test firstInputDelay } /** - * Test the property 'dns' + * Test the property 'firstPaint' */ @Test - public void dnsTest() { - // TODO: test dns + public void firstPaintTest() { + // TODO: test firstPaint } /** - * Test the property 'href' + * Test the property 'cumulativeLayoutShift' */ @Test - public void hrefTest() { - // TODO: test href + public void cumulativeLayoutShiftTest() { + // TODO: test cumulativeLayoutShift } /** - * Test the property 'firstPaint' + * Test the property 'largestContentfulPaint' */ @Test - public void firstPaintTest() { - // TODO: test firstPaint + public void largestContentfulPaintTest() { + // TODO: test largestContentfulPaint } /** - * Test the property 'largestContentfulPaint' + * Test the property 'domInteractive' */ @Test - public void largestContentfulPaintTest() { - // TODO: test largestContentfulPaint + public void domInteractiveTest() { + // TODO: test domInteractive } /** - * Test the property 'timeToFirstByte' + * Test the property 'firstContentfulPaint' */ @Test - public void timeToFirstByteTest() { - // TODO: test timeToFirstByte + public void firstContentfulPaintTest() { + // TODO: test firstContentfulPaint } /** - * Test the property 'ssl' + * Test the property 'dns' */ @Test - public void sslTest() { - // TODO: test ssl + public void dnsTest() { + // TODO: test dns } /** - * Test the property 'firstContentfulPaint' + * Test the property 'ssl' */ @Test - public void firstContentfulPaintTest() { - // TODO: test firstContentfulPaint + public void sslTest() { + // TODO: test ssl } /** - * Test the property 'onLoad' + * Test the property 'timeToFirstByte' */ @Test - public void onLoadTest() { - // TODO: test onLoad + public void timeToFirstByteTest() { + // TODO: test timeToFirstByte } /** - * Test the property 'onContentLoad' + * Test the property 'href' */ @Test - public void onContentLoadTest() { - // TODO: test onContentLoad + public void hrefTest() { + // TODO: test href } } diff --git a/clients/java/src/test/java/com/browserup/proxy_client/PageTimingsTest.java b/clients/java/src/test/java/com/browserup/proxy_client/PageTimingsTest.java index 4154474b97..6d233a45a9 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/PageTimingsTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/PageTimingsTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/java/src/test/java/com/browserup/proxy_client/VerifyResultTest.java b/clients/java/src/test/java/com/browserup/proxy_client/VerifyResultTest.java index 34d09672a8..e09356a1ff 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/VerifyResultTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/VerifyResultTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -38,11 +38,11 @@ public void testVerifyResult() { } /** - * Test the property 'type' + * Test the property 'result' */ @Test - public void typeTest() { - // TODO: test type + public void resultTest() { + // TODO: test result } /** @@ -54,11 +54,11 @@ public void nameTest() { } /** - * Test the property 'result' + * Test the property 'type' */ @Test - public void resultTest() { - // TODO: test result + public void typeTest() { + // TODO: test type } } diff --git a/clients/java/src/test/java/com/browserup/proxy_client/WebSocketMessageTest.java b/clients/java/src/test/java/com/browserup/proxy_client/WebSocketMessageTest.java index f8236308d6..380b3e961d 100644 --- a/clients/java/src/test/java/com/browserup/proxy_client/WebSocketMessageTest.java +++ b/clients/java/src/test/java/com/browserup/proxy_client/WebSocketMessageTest.java @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/.openapi-generator/FILES b/clients/javascript/.openapi-generator/FILES index 6395fce201..2ee870c6f8 100644 --- a/clients/javascript/.openapi-generator/FILES +++ b/clients/javascript/.openapi-generator/FILES @@ -3,8 +3,8 @@ .openapi-generator-ignore .travis.yml README.md +docs/Action.md docs/BrowserUpProxyApi.md -docs/Counter.md docs/Error.md docs/Har.md docs/HarEntry.md @@ -25,6 +25,7 @@ docs/Header.md docs/LargestContentfulPaint.md docs/MatchCriteria.md docs/MatchCriteriaRequestHeader.md +docs/Metric.md docs/NameValuePair.md docs/Page.md docs/PageTiming.md @@ -37,7 +38,7 @@ package.json src/BrowserUpMitmProxyClient/ApiClient.js src/BrowserUpMitmProxyClient/browserup-mitmproxy-client/BrowserUpProxyApi.js src/BrowserUpMitmProxyClient/index.js -src/BrowserUpMitmProxyClient/model/Counter.js +src/BrowserUpMitmProxyClient/model/Action.js src/BrowserUpMitmProxyClient/model/Error.js src/BrowserUpMitmProxyClient/model/Har.js src/BrowserUpMitmProxyClient/model/HarEntry.js @@ -58,6 +59,7 @@ src/BrowserUpMitmProxyClient/model/Header.js src/BrowserUpMitmProxyClient/model/LargestContentfulPaint.js src/BrowserUpMitmProxyClient/model/MatchCriteria.js src/BrowserUpMitmProxyClient/model/MatchCriteriaRequestHeader.js +src/BrowserUpMitmProxyClient/model/Metric.js src/BrowserUpMitmProxyClient/model/NameValuePair.js src/BrowserUpMitmProxyClient/model/Page.js src/BrowserUpMitmProxyClient/model/PageTiming.js @@ -65,7 +67,7 @@ src/BrowserUpMitmProxyClient/model/PageTimings.js src/BrowserUpMitmProxyClient/model/VerifyResult.js src/BrowserUpMitmProxyClient/model/WebSocketMessage.js test/BrowserUpMitmProxyClient/api/BrowserUpProxyApi.spec.js -test/BrowserUpMitmProxyClient/model/Counter.spec.js +test/BrowserUpMitmProxyClient/model/Action.spec.js test/BrowserUpMitmProxyClient/model/Error.spec.js test/BrowserUpMitmProxyClient/model/Har.spec.js test/BrowserUpMitmProxyClient/model/HarEntry.spec.js @@ -86,6 +88,7 @@ test/BrowserUpMitmProxyClient/model/Header.spec.js test/BrowserUpMitmProxyClient/model/LargestContentfulPaint.spec.js test/BrowserUpMitmProxyClient/model/MatchCriteria.spec.js test/BrowserUpMitmProxyClient/model/MatchCriteriaRequestHeader.spec.js +test/BrowserUpMitmProxyClient/model/Metric.spec.js test/BrowserUpMitmProxyClient/model/NameValuePair.spec.js test/BrowserUpMitmProxyClient/model/Page.spec.js test/BrowserUpMitmProxyClient/model/PageTiming.spec.js diff --git a/clients/javascript/README.md b/clients/javascript/README.md index f85ed3d90e..d2aafc2648 100644 --- a/clients/javascript/README.md +++ b/clients/javascript/README.md @@ -9,7 +9,7 @@ ___ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 1.0.0 +- API version: 1.24 - Package version: 1.0.0 - Build package: org.openapitools.codegen.languages.JavascriptClientCodegen @@ -107,7 +107,7 @@ var BrowserUpMitmProxyClient = require('browserup-mitmproxy-client'); var api = new BrowserUpMitmProxyClient.BrowserUpProxyApi() -var counter = new BrowserUpMitmProxyClient.Counter(); // {Counter} Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key +var error = new BrowserUpMitmProxyClient.Error(); // {Error} Receives an error to track. Internally, the error is stored in an array in the har under the _errors key var callback = function(error, data, response) { if (error) { console.error(error); @@ -115,7 +115,7 @@ var callback = function(error, data, response) { console.log('API called successfully.'); } }; -api.addCounter(counter, callback); +api.addError(error, callback); ``` @@ -125,8 +125,8 @@ All URIs are relative to *http://localhost:48088* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*BrowserUpMitmProxyClient.BrowserUpProxyApi* | [**addCounter**](docs/BrowserUpProxyApi.md#addCounter) | **POST** /har/counters | *BrowserUpMitmProxyClient.BrowserUpProxyApi* | [**addError**](docs/BrowserUpProxyApi.md#addError) | **POST** /har/errors | +*BrowserUpMitmProxyClient.BrowserUpProxyApi* | [**addMetric**](docs/BrowserUpProxyApi.md#addMetric) | **POST** /har/metrics | *BrowserUpMitmProxyClient.BrowserUpProxyApi* | [**getHarLog**](docs/BrowserUpProxyApi.md#getHarLog) | **GET** /har | *BrowserUpMitmProxyClient.BrowserUpProxyApi* | [**healthcheck**](docs/BrowserUpProxyApi.md#healthcheck) | **GET** /healthcheck | *BrowserUpMitmProxyClient.BrowserUpProxyApi* | [**newPage**](docs/BrowserUpProxyApi.md#newPage) | **POST** /har/page | @@ -139,7 +139,7 @@ Class | Method | HTTP request | Description ## Documentation for Models - - [BrowserUpMitmProxyClient.Counter](docs/Counter.md) + - [BrowserUpMitmProxyClient.Action](docs/Action.md) - [BrowserUpMitmProxyClient.Error](docs/Error.md) - [BrowserUpMitmProxyClient.Har](docs/Har.md) - [BrowserUpMitmProxyClient.HarEntry](docs/HarEntry.md) @@ -160,6 +160,7 @@ Class | Method | HTTP request | Description - [BrowserUpMitmProxyClient.LargestContentfulPaint](docs/LargestContentfulPaint.md) - [BrowserUpMitmProxyClient.MatchCriteria](docs/MatchCriteria.md) - [BrowserUpMitmProxyClient.MatchCriteriaRequestHeader](docs/MatchCriteriaRequestHeader.md) + - [BrowserUpMitmProxyClient.Metric](docs/Metric.md) - [BrowserUpMitmProxyClient.NameValuePair](docs/NameValuePair.md) - [BrowserUpMitmProxyClient.Page](docs/Page.md) - [BrowserUpMitmProxyClient.PageTiming](docs/PageTiming.md) diff --git a/clients/javascript/docs/Action.md b/clients/javascript/docs/Action.md new file mode 100644 index 0000000000..a981c87e59 --- /dev/null +++ b/clients/javascript/docs/Action.md @@ -0,0 +1,16 @@ +# BrowserUpMitmProxyClient.Action + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] +**id** | **String** | | [optional] +**className** | **String** | | [optional] +**tagName** | **String** | | [optional] +**xpath** | **String** | | [optional] +**dataAttributes** | **String** | | [optional] +**formName** | **String** | | [optional] +**content** | **String** | | [optional] + + diff --git a/clients/javascript/docs/BrowserUpProxyApi.md b/clients/javascript/docs/BrowserUpProxyApi.md index ac2baf8b14..e9f76cfca3 100644 --- a/clients/javascript/docs/BrowserUpProxyApi.md +++ b/clients/javascript/docs/BrowserUpProxyApi.md @@ -4,8 +4,8 @@ All URIs are relative to *http://localhost:48088* Method | HTTP request | Description ------------- | ------------- | ------------- -[**addCounter**](BrowserUpProxyApi.md#addCounter) | **POST** /har/counters | [**addError**](BrowserUpProxyApi.md#addError) | **POST** /har/errors | +[**addMetric**](BrowserUpProxyApi.md#addMetric) | **POST** /har/metrics | [**getHarLog**](BrowserUpProxyApi.md#getHarLog) | **GET** /har | [**healthcheck**](BrowserUpProxyApi.md#healthcheck) | **GET** /healthcheck | [**newPage**](BrowserUpProxyApi.md#newPage) | **POST** /har/page | @@ -17,13 +17,13 @@ Method | HTTP request | Description -## addCounter +## addError -> addCounter(counter) +> addError(error) -Add Custom Counter to the captured traffic har +Add Custom Error to the captured traffic har ### Example @@ -31,8 +31,8 @@ Add Custom Counter to the captured traffic har import BrowserUpMitmProxyClient from 'browserup-mitmproxy-client'; let apiInstance = new BrowserUpMitmProxyClient.BrowserUpProxyApi(); -let counter = new BrowserUpMitmProxyClient.Counter(); // Counter | Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key -apiInstance.addCounter(counter, (error, data, response) => { +let error = new BrowserUpMitmProxyClient.Error(); // Error | Receives an error to track. Internally, the error is stored in an array in the har under the _errors key +apiInstance.addError(error, (error, data, response) => { if (error) { console.error(error); } else { @@ -46,7 +46,7 @@ apiInstance.addCounter(counter, (error, data, response) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **counter** | [**Counter**](Counter.md)| Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key | + **error** | [**Error**](Error.md)| Receives an error to track. Internally, the error is stored in an array in the har under the _errors key | ### Return type @@ -62,13 +62,13 @@ No authorization required - **Accept**: Not defined -## addError +## addMetric -> addError(error) +> addMetric(metric) -Add Custom Error to the captured traffic har +Add Custom Metric to the captured traffic har ### Example @@ -76,8 +76,8 @@ Add Custom Error to the captured traffic har import BrowserUpMitmProxyClient from 'browserup-mitmproxy-client'; let apiInstance = new BrowserUpMitmProxyClient.BrowserUpProxyApi(); -let error = new BrowserUpMitmProxyClient.Error(); // Error | Receives an error to track. Internally, the error is stored in an array in the har under the _errors key -apiInstance.addError(error, (error, data, response) => { +let metric = new BrowserUpMitmProxyClient.Metric(); // Metric | Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key +apiInstance.addMetric(metric, (error, data, response) => { if (error) { console.error(error); } else { @@ -91,7 +91,7 @@ apiInstance.addError(error, (error, data, response) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **error** | [**Error**](Error.md)| Receives an error to track. Internally, the error is stored in an array in the har under the _errors key | + **metric** | [**Metric**](Metric.md)| Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key | ### Return type diff --git a/clients/javascript/docs/Counter.md b/clients/javascript/docs/Counter.md deleted file mode 100644 index 882e0f4569..0000000000 --- a/clients/javascript/docs/Counter.md +++ /dev/null @@ -1,10 +0,0 @@ -# BrowserUpMitmProxyClient.Counter - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **Number** | Value for the counter | [optional] -**name** | **String** | Name of Custom Counter to add to the page under _counters | [optional] - - diff --git a/clients/javascript/docs/Error.md b/clients/javascript/docs/Error.md index 4d724e2b43..20307b2064 100644 --- a/clients/javascript/docs/Error.md +++ b/clients/javascript/docs/Error.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**details** | **String** | Short details of the error | [optional] **name** | **String** | Name of the Error to add. Stored in har under _errors | [optional] +**details** | **String** | Short details of the error | [optional] diff --git a/clients/javascript/docs/HarEntryResponseContent.md b/clients/javascript/docs/HarEntryResponseContent.md index daa344d024..1ee6ac8545 100644 --- a/clients/javascript/docs/HarEntryResponseContent.md +++ b/clients/javascript/docs/HarEntryResponseContent.md @@ -9,6 +9,14 @@ Name | Type | Description | Notes **mimeType** | **String** | | **text** | **String** | | [optional] **encoding** | **String** | | [optional] +**videoBufferedPercent** | **Number** | | [optional] [default to -1] +**videoStallCount** | **Number** | | [optional] [default to -1] +**videoDecodedByteCount** | **Number** | | [optional] [default to -1] +**videoWaitingCount** | **Number** | | [optional] [default to -1] +**videoErrorCount** | **Number** | | [optional] [default to -1] +**videoDroppedFrames** | **Number** | | [optional] [default to -1] +**videoTotalFrames** | **Number** | | [optional] [default to -1] +**videoAudioBytesDecoded** | **Number** | | [optional] [default to -1] **comment** | **String** | | [optional] diff --git a/clients/javascript/docs/MatchCriteriaRequestHeader.md b/clients/javascript/docs/MatchCriteriaRequestHeader.md index 1f54825153..159257100b 100644 --- a/clients/javascript/docs/MatchCriteriaRequestHeader.md +++ b/clients/javascript/docs/MatchCriteriaRequestHeader.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **String** | Value to match | [optional] **name** | **String** | Name to match | [optional] +**value** | **String** | Value to match | [optional] diff --git a/clients/javascript/docs/Metric.md b/clients/javascript/docs/Metric.md new file mode 100644 index 0000000000..1a2821e998 --- /dev/null +++ b/clients/javascript/docs/Metric.md @@ -0,0 +1,10 @@ +# BrowserUpMitmProxyClient.Metric + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of Custom Metric to add to the page under _metrics | [optional] +**value** | **Number** | Value for the metric | [optional] + + diff --git a/clients/javascript/docs/NameValuePair.md b/clients/javascript/docs/NameValuePair.md index 850dad2ffd..fe38de474d 100644 --- a/clients/javascript/docs/NameValuePair.md +++ b/clients/javascript/docs/NameValuePair.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | **String** | Value to match | [optional] **name** | **String** | Name to match | [optional] +**value** | **String** | Value to match | [optional] diff --git a/clients/javascript/docs/Page.md b/clients/javascript/docs/Page.md index b34d177e76..4d29335cb8 100644 --- a/clients/javascript/docs/Page.md +++ b/clients/javascript/docs/Page.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **id** | **String** | | **title** | **String** | | **verifications** | [**[VerifyResult]**](VerifyResult.md) | | [optional] -**counters** | [**[Counter]**](Counter.md) | | [optional] +**metrics** | [**[Metric]**](Metric.md) | | [optional] **errors** | [**[Error]**](Error.md) | | [optional] **pageTimings** | [**PageTimings**](PageTimings.md) | | **comment** | **String** | | [optional] diff --git a/clients/javascript/docs/PageTiming.md b/clients/javascript/docs/PageTiming.md index 6e228701e7..01e3432e9e 100644 --- a/clients/javascript/docs/PageTiming.md +++ b/clients/javascript/docs/PageTiming.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**onContentLoad** | **Number** | onContentLoad per the browser | [optional] +**onLoad** | **Number** | onLoad per the browser | [optional] **firstInputDelay** | **Number** | firstInputDelay from the browser | [optional] -**domInteractive** | **Number** | domInteractive from the browser | [optional] -**cumulativeLayoutShift** | **Number** | cumulativeLayoutShift metric from the browser | [optional] -**dns** | **Number** | dns lookup time from the browser | [optional] -**href** | **String** | Top level href, including hashtag, etc per the browser | [optional] **firstPaint** | **Number** | firstPaint from the browser | [optional] +**cumulativeLayoutShift** | **Number** | cumulativeLayoutShift metric from the browser | [optional] **largestContentfulPaint** | **Number** | largestContentfulPaint from the browser | [optional] -**timeToFirstByte** | **Number** | Time to first byte of the page's first request per the browser | [optional] -**ssl** | **Number** | Ssl connect time from the browser | [optional] +**domInteractive** | **Number** | domInteractive from the browser | [optional] **firstContentfulPaint** | **Number** | firstContentfulPaint from the browser | [optional] -**onLoad** | **Number** | onLoad per the browser | [optional] -**onContentLoad** | **Number** | onContentLoad per the browser | [optional] +**dns** | **Number** | dns lookup time from the browser | [optional] +**ssl** | **Number** | Ssl connect time from the browser | [optional] +**timeToFirstByte** | **Number** | Time to first byte of the page's first request per the browser | [optional] +**href** | **String** | Top level href, including hashtag, etc per the browser | [optional] diff --git a/clients/javascript/docs/VerifyResult.md b/clients/javascript/docs/VerifyResult.md index e7dd553d71..9e5bcc077e 100644 --- a/clients/javascript/docs/VerifyResult.md +++ b/clients/javascript/docs/VerifyResult.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **String** | Type | [optional] -**name** | **String** | Name | [optional] **result** | **Boolean** | Result True / False | [optional] +**name** | **String** | Name | [optional] +**type** | **String** | Type | [optional] diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/ApiClient.js b/clients/javascript/src/BrowserUpMitmProxyClient/ApiClient.js index 05c7cf43bc..8739fefc31 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/ApiClient.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/ApiClient.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/browserup-mitmproxy-client/BrowserUpProxyApi.js b/clients/javascript/src/BrowserUpMitmProxyClient/browserup-mitmproxy-client/BrowserUpProxyApi.js index 9ddef7d76a..15bc21775f 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/browserup-mitmproxy-client/BrowserUpProxyApi.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/browserup-mitmproxy-client/BrowserUpProxyApi.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,10 +13,10 @@ import ApiClient from "../ApiClient"; -import Counter from '../model/Counter'; import Error from '../model/Error'; import Har from '../model/Har'; import MatchCriteria from '../model/MatchCriteria'; +import Metric from '../model/Metric'; import VerifyResult from '../model/VerifyResult'; /** @@ -39,23 +39,23 @@ export default class BrowserUpProxyApi { /** - * Callback function to receive the result of the addCounter operation. - * @callback module:BrowserUpMitmProxyClient/browserup-mitmproxy-client/BrowserUpProxyApi~addCounterCallback + * Callback function to receive the result of the addError operation. + * @callback module:BrowserUpMitmProxyClient/browserup-mitmproxy-client/BrowserUpProxyApi~addErrorCallback * @param {String} error Error message, if any. * @param data This operation does not return a value. * @param {String} response The complete HTTP response. */ /** - * Add Custom Counter to the captured traffic har - * @param {module:BrowserUpMitmProxyClient/model/Counter} counter Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key - * @param {module:BrowserUpMitmProxyClient/browserup-mitmproxy-client/BrowserUpProxyApi~addCounterCallback} callback The callback function, accepting three arguments: error, data, response + * Add Custom Error to the captured traffic har + * @param {module:BrowserUpMitmProxyClient/model/Error} error Receives an error to track. Internally, the error is stored in an array in the har under the _errors key + * @param {module:BrowserUpMitmProxyClient/browserup-mitmproxy-client/BrowserUpProxyApi~addErrorCallback} callback The callback function, accepting three arguments: error, data, response */ - addCounter(counter, callback) { - let postBody = counter; - // verify the required parameter 'counter' is set - if (counter === undefined || counter === null) { - throw new Error("Missing the required parameter 'counter' when calling addCounter"); + addError(error, callback) { + let postBody = error; + // verify the required parameter 'error' is set + if (error === undefined || error === null) { + throw new Error("Missing the required parameter 'error' when calling addError"); } let pathParams = { @@ -72,30 +72,30 @@ export default class BrowserUpProxyApi { let accepts = []; let returnType = null; return this.apiClient.callApi( - '/har/counters', 'POST', + '/har/errors', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback ); } /** - * Callback function to receive the result of the addError operation. - * @callback module:BrowserUpMitmProxyClient/browserup-mitmproxy-client/BrowserUpProxyApi~addErrorCallback + * Callback function to receive the result of the addMetric operation. + * @callback module:BrowserUpMitmProxyClient/browserup-mitmproxy-client/BrowserUpProxyApi~addMetricCallback * @param {String} error Error message, if any. * @param data This operation does not return a value. * @param {String} response The complete HTTP response. */ /** - * Add Custom Error to the captured traffic har - * @param {module:BrowserUpMitmProxyClient/model/Error} error Receives an error to track. Internally, the error is stored in an array in the har under the _errors key - * @param {module:BrowserUpMitmProxyClient/browserup-mitmproxy-client/BrowserUpProxyApi~addErrorCallback} callback The callback function, accepting three arguments: error, data, response + * Add Custom Metric to the captured traffic har + * @param {module:BrowserUpMitmProxyClient/model/Metric} metric Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key + * @param {module:BrowserUpMitmProxyClient/browserup-mitmproxy-client/BrowserUpProxyApi~addMetricCallback} callback The callback function, accepting three arguments: error, data, response */ - addError(error, callback) { - let postBody = error; - // verify the required parameter 'error' is set - if (error === undefined || error === null) { - throw new Error("Missing the required parameter 'error' when calling addError"); + addMetric(metric, callback) { + let postBody = metric; + // verify the required parameter 'metric' is set + if (metric === undefined || metric === null) { + throw new Error("Missing the required parameter 'metric' when calling addMetric"); } let pathParams = { @@ -112,7 +112,7 @@ export default class BrowserUpProxyApi { let accepts = []; let returnType = null; return this.apiClient.callApi( - '/har/errors', 'POST', + '/har/metrics', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback ); diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/index.js b/clients/javascript/src/BrowserUpMitmProxyClient/index.js index 816947afae..23c08c1c9d 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/index.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/index.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,7 @@ import ApiClient from './ApiClient'; -import Counter from './model/Counter'; +import Action from './model/Action'; import Error from './model/Error'; import Har from './model/Har'; import HarEntry from './model/HarEntry'; @@ -34,6 +34,7 @@ import Header from './model/Header'; import LargestContentfulPaint from './model/LargestContentfulPaint'; import MatchCriteria from './model/MatchCriteria'; import MatchCriteriaRequestHeader from './model/MatchCriteriaRequestHeader'; +import Metric from './model/Metric'; import NameValuePair from './model/NameValuePair'; import Page from './model/Page'; import PageTiming from './model/PageTiming'; @@ -82,10 +83,10 @@ export { ApiClient, /** - * The Counter model constructor. - * @property {module:BrowserUpMitmProxyClient/model/Counter} + * The Action model constructor. + * @property {module:BrowserUpMitmProxyClient/model/Action} */ - Counter, + Action, /** * The Error model constructor. @@ -207,6 +208,12 @@ export { */ MatchCriteriaRequestHeader, + /** + * The Metric model constructor. + * @property {module:BrowserUpMitmProxyClient/model/Metric} + */ + Metric, + /** * The NameValuePair model constructor. * @property {module:BrowserUpMitmProxyClient/model/NameValuePair} diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/Action.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/Action.js new file mode 100644 index 0000000000..b3735133c4 --- /dev/null +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/Action.js @@ -0,0 +1,171 @@ +/** + * BrowserUp MitmProxy + * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ + * + * The version of the OpenAPI document: 1.24 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The Action model module. + * @module BrowserUpMitmProxyClient/model/Action + * @version 1.0.0 + */ +class Action { + /** + * Constructs a new Action. + * @alias module:BrowserUpMitmProxyClient/model/Action + */ + constructor() { + + Action.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a Action from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:BrowserUpMitmProxyClient/model/Action} obj Optional instance to populate. + * @return {module:BrowserUpMitmProxyClient/model/Action} The populated Action instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Action(); + + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('className')) { + obj['className'] = ApiClient.convertToType(data['className'], 'String'); + } + if (data.hasOwnProperty('tagName')) { + obj['tagName'] = ApiClient.convertToType(data['tagName'], 'String'); + } + if (data.hasOwnProperty('xpath')) { + obj['xpath'] = ApiClient.convertToType(data['xpath'], 'String'); + } + if (data.hasOwnProperty('dataAttributes')) { + obj['dataAttributes'] = ApiClient.convertToType(data['dataAttributes'], 'String'); + } + if (data.hasOwnProperty('formName')) { + obj['formName'] = ApiClient.convertToType(data['formName'], 'String'); + } + if (data.hasOwnProperty('content')) { + obj['content'] = ApiClient.convertToType(data['content'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to Action. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to Action. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { + throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); + } + // ensure the json data is a string + if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { + throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); + } + // ensure the json data is a string + if (data['className'] && !(typeof data['className'] === 'string' || data['className'] instanceof String)) { + throw new Error("Expected the field `className` to be a primitive type in the JSON string but got " + data['className']); + } + // ensure the json data is a string + if (data['tagName'] && !(typeof data['tagName'] === 'string' || data['tagName'] instanceof String)) { + throw new Error("Expected the field `tagName` to be a primitive type in the JSON string but got " + data['tagName']); + } + // ensure the json data is a string + if (data['xpath'] && !(typeof data['xpath'] === 'string' || data['xpath'] instanceof String)) { + throw new Error("Expected the field `xpath` to be a primitive type in the JSON string but got " + data['xpath']); + } + // ensure the json data is a string + if (data['dataAttributes'] && !(typeof data['dataAttributes'] === 'string' || data['dataAttributes'] instanceof String)) { + throw new Error("Expected the field `dataAttributes` to be a primitive type in the JSON string but got " + data['dataAttributes']); + } + // ensure the json data is a string + if (data['formName'] && !(typeof data['formName'] === 'string' || data['formName'] instanceof String)) { + throw new Error("Expected the field `formName` to be a primitive type in the JSON string but got " + data['formName']); + } + // ensure the json data is a string + if (data['content'] && !(typeof data['content'] === 'string' || data['content'] instanceof String)) { + throw new Error("Expected the field `content` to be a primitive type in the JSON string but got " + data['content']); + } + + return true; + } + + +} + + + +/** + * @member {String} name + */ +Action.prototype['name'] = undefined; + +/** + * @member {String} id + */ +Action.prototype['id'] = undefined; + +/** + * @member {String} className + */ +Action.prototype['className'] = undefined; + +/** + * @member {String} tagName + */ +Action.prototype['tagName'] = undefined; + +/** + * @member {String} xpath + */ +Action.prototype['xpath'] = undefined; + +/** + * @member {String} dataAttributes + */ +Action.prototype['dataAttributes'] = undefined; + +/** + * @member {String} formName + */ +Action.prototype['formName'] = undefined; + +/** + * @member {String} content + */ +Action.prototype['content'] = undefined; + + + + + + +export default Action; + diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/Error.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/Error.js index 4b812afe79..a14efaa12e 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/Error.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/Error.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -47,12 +47,12 @@ class Error { if (data) { obj = obj || new Error(); - if (data.hasOwnProperty('details')) { - obj['details'] = ApiClient.convertToType(data['details'], 'String'); - } if (data.hasOwnProperty('name')) { obj['name'] = ApiClient.convertToType(data['name'], 'String'); } + if (data.hasOwnProperty('details')) { + obj['details'] = ApiClient.convertToType(data['details'], 'String'); + } } return obj; } @@ -63,14 +63,14 @@ class Error { * @return {boolean} to indicate whether the JSON data is valid with respect to Error. */ static validateJSON(data) { - // ensure the json data is a string - if (data['details'] && !(typeof data['details'] === 'string' || data['details'] instanceof String)) { - throw new Error("Expected the field `details` to be a primitive type in the JSON string but got " + data['details']); - } // ensure the json data is a string if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); } + // ensure the json data is a string + if (data['details'] && !(typeof data['details'] === 'string' || data['details'] instanceof String)) { + throw new Error("Expected the field `details` to be a primitive type in the JSON string but got " + data['details']); + } return true; } @@ -80,18 +80,18 @@ class Error { -/** - * Short details of the error - * @member {String} details - */ -Error.prototype['details'] = undefined; - /** * Name of the Error to add. Stored in har under _errors * @member {String} name */ Error.prototype['name'] = undefined; +/** + * Short details of the error + * @member {String} details + */ +Error.prototype['details'] = undefined; + diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/Har.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/Har.js index e4fd5a8810..b5eef0ceae 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/Har.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/Har.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntry.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntry.js index 8fccc20bfd..5338c49877 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntry.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntry.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryCache.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryCache.js index 86e4c9f752..b6bb9bad03 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryCache.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryCache.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryCacheBeforeRequest.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryCacheBeforeRequest.js index a67ab470cb..dceea73a5e 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryCacheBeforeRequest.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryCacheBeforeRequest.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryCacheBeforeRequestOneOf.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryCacheBeforeRequestOneOf.js index a52f0f852d..cf693e76a7 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryCacheBeforeRequestOneOf.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryCacheBeforeRequestOneOf.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequest.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequest.js index 450f066561..c001ccd520 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequest.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequest.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequestCookiesInner.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequestCookiesInner.js index 97dfb18d4c..7e47ad7fe2 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequestCookiesInner.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequestCookiesInner.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequestPostData.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequestPostData.js index 51db35f02f..eb233faba8 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequestPostData.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequestPostData.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequestPostDataParamsInner.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequestPostDataParamsInner.js index 28b23b787c..ab4e39173d 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequestPostDataParamsInner.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequestPostDataParamsInner.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequestQueryStringInner.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequestQueryStringInner.js index 548d6073b6..80adae3042 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequestQueryStringInner.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryRequestQueryStringInner.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryResponse.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryResponse.js index 2047c8e0c3..0e8d5f86d9 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryResponse.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryResponse.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryResponseContent.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryResponseContent.js index cfbad856c9..5190536140 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryResponseContent.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryResponseContent.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -66,6 +66,30 @@ class HarEntryResponseContent { if (data.hasOwnProperty('encoding')) { obj['encoding'] = ApiClient.convertToType(data['encoding'], 'String'); } + if (data.hasOwnProperty('_videoBufferedPercent')) { + obj['_videoBufferedPercent'] = ApiClient.convertToType(data['_videoBufferedPercent'], 'Number'); + } + if (data.hasOwnProperty('_videoStallCount')) { + obj['_videoStallCount'] = ApiClient.convertToType(data['_videoStallCount'], 'Number'); + } + if (data.hasOwnProperty('_videoDecodedByteCount')) { + obj['_videoDecodedByteCount'] = ApiClient.convertToType(data['_videoDecodedByteCount'], 'Number'); + } + if (data.hasOwnProperty('_videoWaitingCount')) { + obj['_videoWaitingCount'] = ApiClient.convertToType(data['_videoWaitingCount'], 'Number'); + } + if (data.hasOwnProperty('_videoErrorCount')) { + obj['_videoErrorCount'] = ApiClient.convertToType(data['_videoErrorCount'], 'Number'); + } + if (data.hasOwnProperty('_videoDroppedFrames')) { + obj['_videoDroppedFrames'] = ApiClient.convertToType(data['_videoDroppedFrames'], 'Number'); + } + if (data.hasOwnProperty('_videoTotalFrames')) { + obj['_videoTotalFrames'] = ApiClient.convertToType(data['_videoTotalFrames'], 'Number'); + } + if (data.hasOwnProperty('_videoAudioBytesDecoded')) { + obj['_videoAudioBytesDecoded'] = ApiClient.convertToType(data['_videoAudioBytesDecoded'], 'Number'); + } if (data.hasOwnProperty('comment')) { obj['comment'] = ApiClient.convertToType(data['comment'], 'String'); } @@ -135,6 +159,54 @@ HarEntryResponseContent.prototype['text'] = undefined; */ HarEntryResponseContent.prototype['encoding'] = undefined; +/** + * @member {Number} _videoBufferedPercent + * @default -1 + */ +HarEntryResponseContent.prototype['_videoBufferedPercent'] = -1; + +/** + * @member {Number} _videoStallCount + * @default -1 + */ +HarEntryResponseContent.prototype['_videoStallCount'] = -1; + +/** + * @member {Number} _videoDecodedByteCount + * @default -1 + */ +HarEntryResponseContent.prototype['_videoDecodedByteCount'] = -1; + +/** + * @member {Number} _videoWaitingCount + * @default -1 + */ +HarEntryResponseContent.prototype['_videoWaitingCount'] = -1; + +/** + * @member {Number} _videoErrorCount + * @default -1 + */ +HarEntryResponseContent.prototype['_videoErrorCount'] = -1; + +/** + * @member {Number} _videoDroppedFrames + * @default -1 + */ +HarEntryResponseContent.prototype['_videoDroppedFrames'] = -1; + +/** + * @member {Number} _videoTotalFrames + * @default -1 + */ +HarEntryResponseContent.prototype['_videoTotalFrames'] = -1; + +/** + * @member {Number} _videoAudioBytesDecoded + * @default -1 + */ +HarEntryResponseContent.prototype['_videoAudioBytesDecoded'] = -1; + /** * @member {String} comment */ diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryTimings.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryTimings.js index 378a83f919..e1fd7b6512 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryTimings.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarEntryTimings.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarLog.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarLog.js index a287992c88..782c1eb88f 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarLog.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarLog.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarLogCreator.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarLogCreator.js index f2a0f3fc6a..aced457e7e 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/HarLogCreator.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/HarLogCreator.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/Header.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/Header.js index c3eec64cf0..4d8c50e3be 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/Header.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/Header.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/LargestContentfulPaint.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/LargestContentfulPaint.js index 024d8cf8c1..40396f5af8 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/LargestContentfulPaint.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/LargestContentfulPaint.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/MatchCriteria.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/MatchCriteria.js index fa750d6568..d7342b7333 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/MatchCriteria.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/MatchCriteria.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/MatchCriteriaRequestHeader.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/MatchCriteriaRequestHeader.js index a02eb63ffd..5ab43317d6 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/MatchCriteriaRequestHeader.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/MatchCriteriaRequestHeader.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -50,12 +50,12 @@ class MatchCriteriaRequestHeader { obj = obj || new MatchCriteriaRequestHeader(); NameValuePair.constructFromObject(data, obj); - if (data.hasOwnProperty('value')) { - obj['value'] = ApiClient.convertToType(data['value'], 'String'); - } if (data.hasOwnProperty('name')) { obj['name'] = ApiClient.convertToType(data['name'], 'String'); } + if (data.hasOwnProperty('value')) { + obj['value'] = ApiClient.convertToType(data['value'], 'String'); + } } return obj; } @@ -66,14 +66,14 @@ class MatchCriteriaRequestHeader { * @return {boolean} to indicate whether the JSON data is valid with respect to MatchCriteriaRequestHeader. */ static validateJSON(data) { - // ensure the json data is a string - if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) { - throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']); - } // ensure the json data is a string if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); } + // ensure the json data is a string + if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) { + throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']); + } return true; } @@ -83,30 +83,30 @@ class MatchCriteriaRequestHeader { -/** - * Value to match - * @member {String} value - */ -MatchCriteriaRequestHeader.prototype['value'] = undefined; - /** * Name to match * @member {String} name */ MatchCriteriaRequestHeader.prototype['name'] = undefined; - -// Implement NameValuePair interface: /** * Value to match * @member {String} value */ -NameValuePair.prototype['value'] = undefined; +MatchCriteriaRequestHeader.prototype['value'] = undefined; + + +// Implement NameValuePair interface: /** * Name to match * @member {String} name */ NameValuePair.prototype['name'] = undefined; +/** + * Value to match + * @member {String} value + */ +NameValuePair.prototype['value'] = undefined; diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/Counter.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/Metric.js similarity index 68% rename from clients/javascript/src/BrowserUpMitmProxyClient/model/Counter.js rename to clients/javascript/src/BrowserUpMitmProxyClient/model/Metric.js index b2d622cc7d..1a126b03aa 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/Counter.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/Metric.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,18 +14,18 @@ import ApiClient from '../ApiClient'; /** - * The Counter model module. - * @module BrowserUpMitmProxyClient/model/Counter + * The Metric model module. + * @module BrowserUpMitmProxyClient/model/Metric * @version 1.0.0 */ -class Counter { +class Metric { /** - * Constructs a new Counter. - * @alias module:BrowserUpMitmProxyClient/model/Counter + * Constructs a new Metric. + * @alias module:BrowserUpMitmProxyClient/model/Metric */ constructor() { - Counter.initialize(this); + Metric.initialize(this); } /** @@ -37,30 +37,30 @@ class Counter { } /** - * Constructs a Counter from a plain JavaScript object, optionally creating a new instance. + * Constructs a Metric from a plain JavaScript object, optionally creating a new instance. * Copies all relevant properties from data to obj if supplied or a new instance if not. * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:BrowserUpMitmProxyClient/model/Counter} obj Optional instance to populate. - * @return {module:BrowserUpMitmProxyClient/model/Counter} The populated Counter instance. + * @param {module:BrowserUpMitmProxyClient/model/Metric} obj Optional instance to populate. + * @return {module:BrowserUpMitmProxyClient/model/Metric} The populated Metric instance. */ static constructFromObject(data, obj) { if (data) { - obj = obj || new Counter(); + obj = obj || new Metric(); - if (data.hasOwnProperty('value')) { - obj['value'] = ApiClient.convertToType(data['value'], 'Number'); - } if (data.hasOwnProperty('name')) { obj['name'] = ApiClient.convertToType(data['name'], 'String'); } + if (data.hasOwnProperty('value')) { + obj['value'] = ApiClient.convertToType(data['value'], 'Number'); + } } return obj; } /** - * Validates the JSON data with respect to Counter. + * Validates the JSON data with respect to Metric. * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to Counter. + * @return {boolean} to indicate whether the JSON data is valid with respect to Metric. */ static validateJSON(data) { // ensure the json data is a string @@ -77,21 +77,21 @@ class Counter { /** - * Value for the counter - * @member {Number} value + * Name of Custom Metric to add to the page under _metrics + * @member {String} name */ -Counter.prototype['value'] = undefined; +Metric.prototype['name'] = undefined; /** - * Name of Custom Counter to add to the page under _counters - * @member {String} name + * Value for the metric + * @member {Number} value */ -Counter.prototype['name'] = undefined; +Metric.prototype['value'] = undefined; -export default Counter; +export default Metric; diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/NameValuePair.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/NameValuePair.js index f23e569a74..9662f1a799 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/NameValuePair.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/NameValuePair.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -47,12 +47,12 @@ class NameValuePair { if (data) { obj = obj || new NameValuePair(); - if (data.hasOwnProperty('value')) { - obj['value'] = ApiClient.convertToType(data['value'], 'String'); - } if (data.hasOwnProperty('name')) { obj['name'] = ApiClient.convertToType(data['name'], 'String'); } + if (data.hasOwnProperty('value')) { + obj['value'] = ApiClient.convertToType(data['value'], 'String'); + } } return obj; } @@ -63,14 +63,14 @@ class NameValuePair { * @return {boolean} to indicate whether the JSON data is valid with respect to NameValuePair. */ static validateJSON(data) { - // ensure the json data is a string - if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) { - throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']); - } // ensure the json data is a string if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); } + // ensure the json data is a string + if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) { + throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']); + } return true; } @@ -80,18 +80,18 @@ class NameValuePair { -/** - * Value to match - * @member {String} value - */ -NameValuePair.prototype['value'] = undefined; - /** * Name to match * @member {String} name */ NameValuePair.prototype['name'] = undefined; +/** + * Value to match + * @member {String} value + */ +NameValuePair.prototype['value'] = undefined; + diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/Page.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/Page.js index 1957615c75..54948d4f28 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/Page.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/Page.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -12,8 +12,8 @@ */ import ApiClient from '../ApiClient'; -import Counter from './Counter'; import Error from './Error'; +import Metric from './Metric'; import PageTimings from './PageTimings'; import VerifyResult from './VerifyResult'; @@ -75,8 +75,8 @@ class Page { if (data.hasOwnProperty('_verifications')) { obj['_verifications'] = ApiClient.convertToType(data['_verifications'], [VerifyResult]); } - if (data.hasOwnProperty('_counters')) { - obj['_counters'] = ApiClient.convertToType(data['_counters'], [Counter]); + if (data.hasOwnProperty('_metrics')) { + obj['_metrics'] = ApiClient.convertToType(data['_metrics'], [Metric]); } if (data.hasOwnProperty('_errors')) { obj['_errors'] = ApiClient.convertToType(data['_errors'], [Error]); @@ -121,14 +121,14 @@ class Page { VerifyResult.validateJSON(item); }; } - if (data['_counters']) { // data not null + if (data['_metrics']) { // data not null // ensure the json data is an array - if (!Array.isArray(data['_counters'])) { - throw new Error("Expected the field `_counters` to be an array in the JSON data but got " + data['_counters']); + if (!Array.isArray(data['_metrics'])) { + throw new Error("Expected the field `_metrics` to be an array in the JSON data but got " + data['_metrics']); } - // validate the optional field `_counters` (array) - for (const item of data['_counters']) { - Counter.validateJSON(item); + // validate the optional field `_metrics` (array) + for (const item of data['_metrics']) { + Metric.validateJSON(item); }; } if (data['_errors']) { // data not null @@ -175,9 +175,9 @@ Page.prototype['title'] = undefined; Page.prototype['_verifications'] = undefined; /** - * @member {Array.} _counters + * @member {Array.} _metrics */ -Page.prototype['_counters'] = undefined; +Page.prototype['_metrics'] = undefined; /** * @member {Array.} _errors diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/PageTiming.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/PageTiming.js index 3bc3871b4f..f5408f9d63 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/PageTiming.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/PageTiming.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -47,41 +47,41 @@ class PageTiming { if (data) { obj = obj || new PageTiming(); + if (data.hasOwnProperty('onContentLoad')) { + obj['onContentLoad'] = ApiClient.convertToType(data['onContentLoad'], 'Number'); + } + if (data.hasOwnProperty('onLoad')) { + obj['onLoad'] = ApiClient.convertToType(data['onLoad'], 'Number'); + } if (data.hasOwnProperty('_firstInputDelay')) { obj['_firstInputDelay'] = ApiClient.convertToType(data['_firstInputDelay'], 'Number'); } - if (data.hasOwnProperty('_domInteractive')) { - obj['_domInteractive'] = ApiClient.convertToType(data['_domInteractive'], 'Number'); + if (data.hasOwnProperty('_firstPaint')) { + obj['_firstPaint'] = ApiClient.convertToType(data['_firstPaint'], 'Number'); } if (data.hasOwnProperty('_cumulativeLayoutShift')) { obj['_cumulativeLayoutShift'] = ApiClient.convertToType(data['_cumulativeLayoutShift'], 'Number'); } - if (data.hasOwnProperty('_dns')) { - obj['_dns'] = ApiClient.convertToType(data['_dns'], 'Number'); - } - if (data.hasOwnProperty('_href')) { - obj['_href'] = ApiClient.convertToType(data['_href'], 'String'); - } - if (data.hasOwnProperty('_firstPaint')) { - obj['_firstPaint'] = ApiClient.convertToType(data['_firstPaint'], 'Number'); - } if (data.hasOwnProperty('_largestContentfulPaint')) { obj['_largestContentfulPaint'] = ApiClient.convertToType(data['_largestContentfulPaint'], 'Number'); } - if (data.hasOwnProperty('_timeToFirstByte')) { - obj['_timeToFirstByte'] = ApiClient.convertToType(data['_timeToFirstByte'], 'Number'); - } - if (data.hasOwnProperty('_ssl')) { - obj['_ssl'] = ApiClient.convertToType(data['_ssl'], 'Number'); + if (data.hasOwnProperty('_domInteractive')) { + obj['_domInteractive'] = ApiClient.convertToType(data['_domInteractive'], 'Number'); } if (data.hasOwnProperty('_firstContentfulPaint')) { obj['_firstContentfulPaint'] = ApiClient.convertToType(data['_firstContentfulPaint'], 'Number'); } - if (data.hasOwnProperty('onLoad')) { - obj['onLoad'] = ApiClient.convertToType(data['onLoad'], 'Number'); + if (data.hasOwnProperty('_dns')) { + obj['_dns'] = ApiClient.convertToType(data['_dns'], 'Number'); } - if (data.hasOwnProperty('onContentLoad')) { - obj['onContentLoad'] = ApiClient.convertToType(data['onContentLoad'], 'Number'); + if (data.hasOwnProperty('_ssl')) { + obj['_ssl'] = ApiClient.convertToType(data['_ssl'], 'Number'); + } + if (data.hasOwnProperty('_timeToFirstByte')) { + obj['_timeToFirstByte'] = ApiClient.convertToType(data['_timeToFirstByte'], 'Number'); + } + if (data.hasOwnProperty('_href')) { + obj['_href'] = ApiClient.convertToType(data['_href'], 'String'); } } return obj; @@ -106,6 +106,18 @@ class PageTiming { +/** + * onContentLoad per the browser + * @member {Number} onContentLoad + */ +PageTiming.prototype['onContentLoad'] = undefined; + +/** + * onLoad per the browser + * @member {Number} onLoad + */ +PageTiming.prototype['onLoad'] = undefined; + /** * firstInputDelay from the browser * @member {Number} _firstInputDelay @@ -113,10 +125,10 @@ class PageTiming { PageTiming.prototype['_firstInputDelay'] = undefined; /** - * domInteractive from the browser - * @member {Number} _domInteractive + * firstPaint from the browser + * @member {Number} _firstPaint */ -PageTiming.prototype['_domInteractive'] = undefined; +PageTiming.prototype['_firstPaint'] = undefined; /** * cumulativeLayoutShift metric from the browser @@ -125,34 +137,28 @@ PageTiming.prototype['_domInteractive'] = undefined; PageTiming.prototype['_cumulativeLayoutShift'] = undefined; /** - * dns lookup time from the browser - * @member {Number} _dns - */ -PageTiming.prototype['_dns'] = undefined; - -/** - * Top level href, including hashtag, etc per the browser - * @member {String} _href + * largestContentfulPaint from the browser + * @member {Number} _largestContentfulPaint */ -PageTiming.prototype['_href'] = undefined; +PageTiming.prototype['_largestContentfulPaint'] = undefined; /** - * firstPaint from the browser - * @member {Number} _firstPaint + * domInteractive from the browser + * @member {Number} _domInteractive */ -PageTiming.prototype['_firstPaint'] = undefined; +PageTiming.prototype['_domInteractive'] = undefined; /** - * largestContentfulPaint from the browser - * @member {Number} _largestContentfulPaint + * firstContentfulPaint from the browser + * @member {Number} _firstContentfulPaint */ -PageTiming.prototype['_largestContentfulPaint'] = undefined; +PageTiming.prototype['_firstContentfulPaint'] = undefined; /** - * Time to first byte of the page's first request per the browser - * @member {Number} _timeToFirstByte + * dns lookup time from the browser + * @member {Number} _dns */ -PageTiming.prototype['_timeToFirstByte'] = undefined; +PageTiming.prototype['_dns'] = undefined; /** * Ssl connect time from the browser @@ -161,22 +167,16 @@ PageTiming.prototype['_timeToFirstByte'] = undefined; PageTiming.prototype['_ssl'] = undefined; /** - * firstContentfulPaint from the browser - * @member {Number} _firstContentfulPaint - */ -PageTiming.prototype['_firstContentfulPaint'] = undefined; - -/** - * onLoad per the browser - * @member {Number} onLoad + * Time to first byte of the page's first request per the browser + * @member {Number} _timeToFirstByte */ -PageTiming.prototype['onLoad'] = undefined; +PageTiming.prototype['_timeToFirstByte'] = undefined; /** - * onContentLoad per the browser - * @member {Number} onContentLoad + * Top level href, including hashtag, etc per the browser + * @member {String} _href */ -PageTiming.prototype['onContentLoad'] = undefined; +PageTiming.prototype['_href'] = undefined; diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/PageTimings.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/PageTimings.js index 1e6c07f703..4562accd46 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/PageTimings.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/PageTimings.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/VerifyResult.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/VerifyResult.js index eae9a5877e..0ee557abba 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/VerifyResult.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/VerifyResult.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -47,14 +47,14 @@ class VerifyResult { if (data) { obj = obj || new VerifyResult(); - if (data.hasOwnProperty('type')) { - obj['type'] = ApiClient.convertToType(data['type'], 'String'); + if (data.hasOwnProperty('result')) { + obj['result'] = ApiClient.convertToType(data['result'], 'Boolean'); } if (data.hasOwnProperty('name')) { obj['name'] = ApiClient.convertToType(data['name'], 'String'); } - if (data.hasOwnProperty('result')) { - obj['result'] = ApiClient.convertToType(data['result'], 'Boolean'); + if (data.hasOwnProperty('type')) { + obj['type'] = ApiClient.convertToType(data['type'], 'String'); } } return obj; @@ -66,14 +66,14 @@ class VerifyResult { * @return {boolean} to indicate whether the JSON data is valid with respect to VerifyResult. */ static validateJSON(data) { - // ensure the json data is a string - if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { - throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); - } // ensure the json data is a string if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); } + // ensure the json data is a string + if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { + throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); + } return true; } @@ -84,10 +84,10 @@ class VerifyResult { /** - * Type - * @member {String} type + * Result True / False + * @member {Boolean} result */ -VerifyResult.prototype['type'] = undefined; +VerifyResult.prototype['result'] = undefined; /** * Name @@ -96,10 +96,10 @@ VerifyResult.prototype['type'] = undefined; VerifyResult.prototype['name'] = undefined; /** - * Result True / False - * @member {Boolean} result + * Type + * @member {String} type */ -VerifyResult.prototype['result'] = undefined; +VerifyResult.prototype['type'] = undefined; diff --git a/clients/javascript/src/BrowserUpMitmProxyClient/model/WebSocketMessage.js b/clients/javascript/src/BrowserUpMitmProxyClient/model/WebSocketMessage.js index d094a9407f..0fc9400b88 100644 --- a/clients/javascript/src/BrowserUpMitmProxyClient/model/WebSocketMessage.js +++ b/clients/javascript/src/BrowserUpMitmProxyClient/model/WebSocketMessage.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/api/BrowserUpProxyApi.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/api/BrowserUpProxyApi.spec.js index 36eb75fd50..a7e749aa29 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/api/BrowserUpProxyApi.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/api/BrowserUpProxyApi.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -48,20 +48,20 @@ } describe('BrowserUpProxyApi', function() { - describe('addCounter', function() { - it('should call addCounter successfully', function(done) { - //uncomment below and update the code to test addCounter - //instance.addCounter(function(error) { + describe('addError', function() { + it('should call addError successfully', function(done) { + //uncomment below and update the code to test addError + //instance.addError(function(error) { // if (error) throw error; //expect().to.be(); //}); done(); }); }); - describe('addError', function() { - it('should call addError successfully', function(done) { - //uncomment below and update the code to test addError - //instance.addError(function(error) { + describe('addMetric', function() { + it('should call addMetric successfully', function(done) { + //uncomment below and update the code to test addMetric + //instance.addMetric(function(error) { // if (error) throw error; //expect().to.be(); //}); diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/Action.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/Action.spec.js new file mode 100644 index 0000000000..1f18e7142c --- /dev/null +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/Action.spec.js @@ -0,0 +1,107 @@ +/** + * BrowserUp MitmProxy + * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ + * + * The version of the OpenAPI document: 1.24 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/BrowserUpMitmProxyClient/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/BrowserUpMitmProxyClient/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.BrowserUpMitmProxyClient); + } +}(this, function(expect, BrowserUpMitmProxyClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new BrowserUpMitmProxyClient.Action(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Action', function() { + it('should create an instance of Action', function() { + // uncomment below and update the code to test Action + //var instance = new BrowserUpMitmProxyClient.Action(); + //expect(instance).to.be.a(BrowserUpMitmProxyClient.Action); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new BrowserUpMitmProxyClient.Action(); + //expect(instance).to.be(); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new BrowserUpMitmProxyClient.Action(); + //expect(instance).to.be(); + }); + + it('should have the property className (base name: "className")', function() { + // uncomment below and update the code to test the property className + //var instance = new BrowserUpMitmProxyClient.Action(); + //expect(instance).to.be(); + }); + + it('should have the property tagName (base name: "tagName")', function() { + // uncomment below and update the code to test the property tagName + //var instance = new BrowserUpMitmProxyClient.Action(); + //expect(instance).to.be(); + }); + + it('should have the property xpath (base name: "xpath")', function() { + // uncomment below and update the code to test the property xpath + //var instance = new BrowserUpMitmProxyClient.Action(); + //expect(instance).to.be(); + }); + + it('should have the property dataAttributes (base name: "dataAttributes")', function() { + // uncomment below and update the code to test the property dataAttributes + //var instance = new BrowserUpMitmProxyClient.Action(); + //expect(instance).to.be(); + }); + + it('should have the property formName (base name: "formName")', function() { + // uncomment below and update the code to test the property formName + //var instance = new BrowserUpMitmProxyClient.Action(); + //expect(instance).to.be(); + }); + + it('should have the property content (base name: "content")', function() { + // uncomment below and update the code to test the property content + //var instance = new BrowserUpMitmProxyClient.Action(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/Error.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/Error.spec.js index 4aa6bd6fa1..1a2cca93b4 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/Error.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/Error.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -54,14 +54,14 @@ //expect(instance).to.be.a(BrowserUpMitmProxyClient.Error); }); - it('should have the property details (base name: "details")', function() { - // uncomment below and update the code to test the property details + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name //var instance = new BrowserUpMitmProxyClient.Error(); //expect(instance).to.be(); }); - it('should have the property name (base name: "name")', function() { - // uncomment below and update the code to test the property name + it('should have the property details (base name: "details")', function() { + // uncomment below and update the code to test the property details //var instance = new BrowserUpMitmProxyClient.Error(); //expect(instance).to.be(); }); diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/Har.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/Har.spec.js index a38ac56b16..c31d3a20dc 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/Har.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/Har.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntry.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntry.spec.js index fbe30abe3b..5edba67f1b 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntry.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntry.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryCache.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryCache.spec.js index 802a12b716..45ced80c5d 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryCache.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryCache.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryCacheBeforeRequest.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryCacheBeforeRequest.spec.js index 40249e4b42..5c0a25f507 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryCacheBeforeRequest.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryCacheBeforeRequest.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryCacheBeforeRequestOneOf.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryCacheBeforeRequestOneOf.spec.js index 2522b6d1ec..67a01d139f 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryCacheBeforeRequestOneOf.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryCacheBeforeRequestOneOf.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequest.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequest.spec.js index 602e932a1c..5695e3e6e2 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequest.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequest.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequestCookiesInner.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequestCookiesInner.spec.js index ea71149dd4..cb06c492da 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequestCookiesInner.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequestCookiesInner.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequestPostData.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequestPostData.spec.js index abed6f4705..ce553c1f1b 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequestPostData.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequestPostData.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequestPostDataParamsInner.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequestPostDataParamsInner.spec.js index 73379da32d..482a05f5b4 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequestPostDataParamsInner.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequestPostDataParamsInner.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequestQueryStringInner.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequestQueryStringInner.spec.js index 725a1099f6..476a7d41b6 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequestQueryStringInner.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryRequestQueryStringInner.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryResponse.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryResponse.spec.js index 9f2602b23c..1ff0cc84fb 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryResponse.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryResponse.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryResponseContent.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryResponseContent.spec.js index f26d42be2b..523a8c4515 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryResponseContent.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryResponseContent.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -84,6 +84,54 @@ //expect(instance).to.be(); }); + it('should have the property videoBufferedPercent (base name: "_videoBufferedPercent")', function() { + // uncomment below and update the code to test the property videoBufferedPercent + //var instance = new BrowserUpMitmProxyClient.HarEntryResponseContent(); + //expect(instance).to.be(); + }); + + it('should have the property videoStallCount (base name: "_videoStallCount")', function() { + // uncomment below and update the code to test the property videoStallCount + //var instance = new BrowserUpMitmProxyClient.HarEntryResponseContent(); + //expect(instance).to.be(); + }); + + it('should have the property videoDecodedByteCount (base name: "_videoDecodedByteCount")', function() { + // uncomment below and update the code to test the property videoDecodedByteCount + //var instance = new BrowserUpMitmProxyClient.HarEntryResponseContent(); + //expect(instance).to.be(); + }); + + it('should have the property videoWaitingCount (base name: "_videoWaitingCount")', function() { + // uncomment below and update the code to test the property videoWaitingCount + //var instance = new BrowserUpMitmProxyClient.HarEntryResponseContent(); + //expect(instance).to.be(); + }); + + it('should have the property videoErrorCount (base name: "_videoErrorCount")', function() { + // uncomment below and update the code to test the property videoErrorCount + //var instance = new BrowserUpMitmProxyClient.HarEntryResponseContent(); + //expect(instance).to.be(); + }); + + it('should have the property videoDroppedFrames (base name: "_videoDroppedFrames")', function() { + // uncomment below and update the code to test the property videoDroppedFrames + //var instance = new BrowserUpMitmProxyClient.HarEntryResponseContent(); + //expect(instance).to.be(); + }); + + it('should have the property videoTotalFrames (base name: "_videoTotalFrames")', function() { + // uncomment below and update the code to test the property videoTotalFrames + //var instance = new BrowserUpMitmProxyClient.HarEntryResponseContent(); + //expect(instance).to.be(); + }); + + it('should have the property videoAudioBytesDecoded (base name: "_videoAudioBytesDecoded")', function() { + // uncomment below and update the code to test the property videoAudioBytesDecoded + //var instance = new BrowserUpMitmProxyClient.HarEntryResponseContent(); + //expect(instance).to.be(); + }); + it('should have the property comment (base name: "comment")', function() { // uncomment below and update the code to test the property comment //var instance = new BrowserUpMitmProxyClient.HarEntryResponseContent(); diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryTimings.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryTimings.spec.js index cbd19123ed..f8078a12a5 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryTimings.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarEntryTimings.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarLog.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarLog.spec.js index c6b692c612..3b2544590e 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarLog.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarLog.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarLogCreator.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarLogCreator.spec.js index fae286fd1d..15721c9b90 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/HarLogCreator.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/HarLogCreator.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/Header.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/Header.spec.js index 980dc267ba..d117b201af 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/Header.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/Header.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/LargestContentfulPaint.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/LargestContentfulPaint.spec.js index c700ee76e6..0c5d56741b 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/LargestContentfulPaint.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/LargestContentfulPaint.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/MatchCriteria.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/MatchCriteria.spec.js index 0679fb6c97..c9aa6c4126 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/MatchCriteria.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/MatchCriteria.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/MatchCriteriaRequestHeader.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/MatchCriteriaRequestHeader.spec.js index 8a631f10e2..018a688d68 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/MatchCriteriaRequestHeader.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/MatchCriteriaRequestHeader.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -54,14 +54,14 @@ //expect(instance).to.be.a(BrowserUpMitmProxyClient.MatchCriteriaRequestHeader); }); - it('should have the property value (base name: "value")', function() { - // uncomment below and update the code to test the property value + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name //var instance = new BrowserUpMitmProxyClient.MatchCriteriaRequestHeader(); //expect(instance).to.be(); }); - it('should have the property name (base name: "name")', function() { - // uncomment below and update the code to test the property name + it('should have the property value (base name: "value")', function() { + // uncomment below and update the code to test the property value //var instance = new BrowserUpMitmProxyClient.MatchCriteriaRequestHeader(); //expect(instance).to.be(); }); diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/Counter.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/Metric.spec.js similarity index 79% rename from clients/javascript/test/BrowserUpMitmProxyClient/model/Counter.spec.js rename to clients/javascript/test/BrowserUpMitmProxyClient/model/Metric.spec.js index bef068f31b..582958fd9b 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/Counter.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/Metric.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,7 +28,7 @@ var instance; beforeEach(function() { - instance = new BrowserUpMitmProxyClient.Counter(); + instance = new BrowserUpMitmProxyClient.Metric(); }); var getProperty = function(object, getter, property) { @@ -47,22 +47,22 @@ object[property] = value; } - describe('Counter', function() { - it('should create an instance of Counter', function() { - // uncomment below and update the code to test Counter - //var instance = new BrowserUpMitmProxyClient.Counter(); - //expect(instance).to.be.a(BrowserUpMitmProxyClient.Counter); + describe('Metric', function() { + it('should create an instance of Metric', function() { + // uncomment below and update the code to test Metric + //var instance = new BrowserUpMitmProxyClient.Metric(); + //expect(instance).to.be.a(BrowserUpMitmProxyClient.Metric); }); - it('should have the property value (base name: "value")', function() { - // uncomment below and update the code to test the property value - //var instance = new BrowserUpMitmProxyClient.Counter(); + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new BrowserUpMitmProxyClient.Metric(); //expect(instance).to.be(); }); - it('should have the property name (base name: "name")', function() { - // uncomment below and update the code to test the property name - //var instance = new BrowserUpMitmProxyClient.Counter(); + it('should have the property value (base name: "value")', function() { + // uncomment below and update the code to test the property value + //var instance = new BrowserUpMitmProxyClient.Metric(); //expect(instance).to.be(); }); diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/NameValuePair.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/NameValuePair.spec.js index f186684efe..7f59651d65 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/NameValuePair.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/NameValuePair.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -54,14 +54,14 @@ //expect(instance).to.be.a(BrowserUpMitmProxyClient.NameValuePair); }); - it('should have the property value (base name: "value")', function() { - // uncomment below and update the code to test the property value + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name //var instance = new BrowserUpMitmProxyClient.NameValuePair(); //expect(instance).to.be(); }); - it('should have the property name (base name: "name")', function() { - // uncomment below and update the code to test the property name + it('should have the property value (base name: "value")', function() { + // uncomment below and update the code to test the property value //var instance = new BrowserUpMitmProxyClient.NameValuePair(); //expect(instance).to.be(); }); diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/Page.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/Page.spec.js index bd31ecbe87..7d8eaa49dd 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/Page.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/Page.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -78,8 +78,8 @@ //expect(instance).to.be(); }); - it('should have the property counters (base name: "_counters")', function() { - // uncomment below and update the code to test the property counters + it('should have the property metrics (base name: "_metrics")', function() { + // uncomment below and update the code to test the property metrics //var instance = new BrowserUpMitmProxyClient.Page(); //expect(instance).to.be(); }); diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/PageTiming.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/PageTiming.spec.js index 6722b9c011..02d4610f8c 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/PageTiming.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/PageTiming.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -54,74 +54,74 @@ //expect(instance).to.be.a(BrowserUpMitmProxyClient.PageTiming); }); - it('should have the property firstInputDelay (base name: "_firstInputDelay")', function() { - // uncomment below and update the code to test the property firstInputDelay + it('should have the property onContentLoad (base name: "onContentLoad")', function() { + // uncomment below and update the code to test the property onContentLoad //var instance = new BrowserUpMitmProxyClient.PageTiming(); //expect(instance).to.be(); }); - it('should have the property domInteractive (base name: "_domInteractive")', function() { - // uncomment below and update the code to test the property domInteractive + it('should have the property onLoad (base name: "onLoad")', function() { + // uncomment below and update the code to test the property onLoad //var instance = new BrowserUpMitmProxyClient.PageTiming(); //expect(instance).to.be(); }); - it('should have the property cumulativeLayoutShift (base name: "_cumulativeLayoutShift")', function() { - // uncomment below and update the code to test the property cumulativeLayoutShift + it('should have the property firstInputDelay (base name: "_firstInputDelay")', function() { + // uncomment below and update the code to test the property firstInputDelay //var instance = new BrowserUpMitmProxyClient.PageTiming(); //expect(instance).to.be(); }); - it('should have the property dns (base name: "_dns")', function() { - // uncomment below and update the code to test the property dns + it('should have the property firstPaint (base name: "_firstPaint")', function() { + // uncomment below and update the code to test the property firstPaint //var instance = new BrowserUpMitmProxyClient.PageTiming(); //expect(instance).to.be(); }); - it('should have the property href (base name: "_href")', function() { - // uncomment below and update the code to test the property href + it('should have the property cumulativeLayoutShift (base name: "_cumulativeLayoutShift")', function() { + // uncomment below and update the code to test the property cumulativeLayoutShift //var instance = new BrowserUpMitmProxyClient.PageTiming(); //expect(instance).to.be(); }); - it('should have the property firstPaint (base name: "_firstPaint")', function() { - // uncomment below and update the code to test the property firstPaint + it('should have the property largestContentfulPaint (base name: "_largestContentfulPaint")', function() { + // uncomment below and update the code to test the property largestContentfulPaint //var instance = new BrowserUpMitmProxyClient.PageTiming(); //expect(instance).to.be(); }); - it('should have the property largestContentfulPaint (base name: "_largestContentfulPaint")', function() { - // uncomment below and update the code to test the property largestContentfulPaint + it('should have the property domInteractive (base name: "_domInteractive")', function() { + // uncomment below and update the code to test the property domInteractive //var instance = new BrowserUpMitmProxyClient.PageTiming(); //expect(instance).to.be(); }); - it('should have the property timeToFirstByte (base name: "_timeToFirstByte")', function() { - // uncomment below and update the code to test the property timeToFirstByte + it('should have the property firstContentfulPaint (base name: "_firstContentfulPaint")', function() { + // uncomment below and update the code to test the property firstContentfulPaint //var instance = new BrowserUpMitmProxyClient.PageTiming(); //expect(instance).to.be(); }); - it('should have the property ssl (base name: "_ssl")', function() { - // uncomment below and update the code to test the property ssl + it('should have the property dns (base name: "_dns")', function() { + // uncomment below and update the code to test the property dns //var instance = new BrowserUpMitmProxyClient.PageTiming(); //expect(instance).to.be(); }); - it('should have the property firstContentfulPaint (base name: "_firstContentfulPaint")', function() { - // uncomment below and update the code to test the property firstContentfulPaint + it('should have the property ssl (base name: "_ssl")', function() { + // uncomment below and update the code to test the property ssl //var instance = new BrowserUpMitmProxyClient.PageTiming(); //expect(instance).to.be(); }); - it('should have the property onLoad (base name: "onLoad")', function() { - // uncomment below and update the code to test the property onLoad + it('should have the property timeToFirstByte (base name: "_timeToFirstByte")', function() { + // uncomment below and update the code to test the property timeToFirstByte //var instance = new BrowserUpMitmProxyClient.PageTiming(); //expect(instance).to.be(); }); - it('should have the property onContentLoad (base name: "onContentLoad")', function() { - // uncomment below and update the code to test the property onContentLoad + it('should have the property href (base name: "_href")', function() { + // uncomment below and update the code to test the property href //var instance = new BrowserUpMitmProxyClient.PageTiming(); //expect(instance).to.be(); }); diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/PageTimings.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/PageTimings.spec.js index 94d2ea77ea..394e2e72a9 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/PageTimings.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/PageTimings.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/VerifyResult.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/VerifyResult.spec.js index a8f954b051..61cdff16cb 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/VerifyResult.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/VerifyResult.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -54,8 +54,8 @@ //expect(instance).to.be.a(BrowserUpMitmProxyClient.VerifyResult); }); - it('should have the property type (base name: "type")', function() { - // uncomment below and update the code to test the property type + it('should have the property result (base name: "result")', function() { + // uncomment below and update the code to test the property result //var instance = new BrowserUpMitmProxyClient.VerifyResult(); //expect(instance).to.be(); }); @@ -66,8 +66,8 @@ //expect(instance).to.be(); }); - it('should have the property result (base name: "result")', function() { - // uncomment below and update the code to test the property result + it('should have the property type (base name: "type")', function() { + // uncomment below and update the code to test the property type //var instance = new BrowserUpMitmProxyClient.VerifyResult(); //expect(instance).to.be(); }); diff --git a/clients/javascript/test/BrowserUpMitmProxyClient/model/WebSocketMessage.spec.js b/clients/javascript/test/BrowserUpMitmProxyClient/model/WebSocketMessage.spec.js index 56121b4d4b..59467cc7ac 100644 --- a/clients/javascript/test/BrowserUpMitmProxyClient/model/WebSocketMessage.spec.js +++ b/clients/javascript/test/BrowserUpMitmProxyClient/model/WebSocketMessage.spec.js @@ -2,7 +2,7 @@ * BrowserUp MitmProxy * ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: 1.24 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/clients/markdown/.openapi-generator/FILES b/clients/markdown/.openapi-generator/FILES index 4514cb0639..e99b00bece 100644 --- a/clients/markdown/.openapi-generator/FILES +++ b/clients/markdown/.openapi-generator/FILES @@ -1,11 +1,12 @@ +.openapi-generator-ignore Apis/BrowserUpProxyApi.md Models/Action.md -Models/Counter.md Models/Error.md Models/Har.md Models/HarEntry.md Models/HarEntry_cache.md Models/HarEntry_cache_beforeRequest.md +Models/HarEntry_cache_beforeRequest_oneOf.md Models/HarEntry_request.md Models/HarEntry_request_cookies_inner.md Models/HarEntry_request_postData.md @@ -19,6 +20,8 @@ Models/Har_log_creator.md Models/Header.md Models/LargestContentfulPaint.md Models/MatchCriteria.md +Models/MatchCriteria_request_header.md +Models/Metric.md Models/NameValuePair.md Models/Page.md Models/PageTiming.md diff --git a/clients/markdown/.openapi-generator/VERSION b/clients/markdown/.openapi-generator/VERSION index 4122521804..c0be8a7992 100644 --- a/clients/markdown/.openapi-generator/VERSION +++ b/clients/markdown/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.0 \ No newline at end of file +6.4.0 \ No newline at end of file diff --git a/clients/markdown/Apis/BrowserUpProxyApi.md b/clients/markdown/Apis/BrowserUpProxyApi.md index 7213afe10a..faecb211e0 100644 --- a/clients/markdown/Apis/BrowserUpProxyApi.md +++ b/clients/markdown/Apis/BrowserUpProxyApi.md @@ -4,8 +4,8 @@ All URIs are relative to *http://localhost:48088* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**addCounter**](BrowserUpProxyApi.md#addCounter) | **POST** /har/counters | | | [**addError**](BrowserUpProxyApi.md#addError) | **POST** /har/errors | | +| [**addMetric**](BrowserUpProxyApi.md#addMetric) | **POST** /har/metrics | | | [**getHarLog**](BrowserUpProxyApi.md#getHarLog) | **GET** /har | | | [**healthcheck**](BrowserUpProxyApi.md#healthcheck) | **GET** /healthcheck | | | [**newPage**](BrowserUpProxyApi.md#newPage) | **POST** /har/page | | @@ -16,19 +16,19 @@ All URIs are relative to *http://localhost:48088* | [**verifySize**](BrowserUpProxyApi.md#verifySize) | **POST** /verify/size/{size}/{name} | | - -# **addCounter** -> addCounter(Counter) + +# **addError** +> addError(Error) - Add Custom Counter to the captured traffic har + Add Custom Error to the captured traffic har ### Parameters |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **Counter** | [**Counter**](../Models/Counter.md)| Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key | | +| **Error** | [**Error**](../Models/Error.md)| Receives an error to track. Internally, the error is stored in an array in the har under the _errors key | | ### Return type @@ -43,19 +43,19 @@ No authorization required - **Content-Type**: application/json - **Accept**: Not defined - -# **addError** -> addError(Error) + +# **addMetric** +> addMetric(Metric) - Add Custom Error to the captured traffic har + Add Custom Metric to the captured traffic har ### Parameters |Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **Error** | [**Error**](../Models/Error.md)| Receives an error to track. Internally, the error is stored in an array in the har under the _errors key | | +| **Metric** | [**Metric**](../Models/Metric.md)| Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key | | ### Return type diff --git a/clients/markdown/Models/HarEntry_request.md b/clients/markdown/Models/HarEntry_request.md index bd3afbc417..68a9bebcec 100644 --- a/clients/markdown/Models/HarEntry_request.md +++ b/clients/markdown/Models/HarEntry_request.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **method** | **String** | | [default to null] | -| **url** | **URI** | | [default to null] | +| **url** | **String** | | [default to null] | | **httpVersion** | **String** | | [default to null] | | **cookies** | [**List**](HarEntry_request_cookies_inner.md) | | [default to null] | | **headers** | [**List**](Header.md) | | [default to null] | diff --git a/clients/markdown/Models/MatchCriteria.md b/clients/markdown/Models/MatchCriteria.md index 238ecbb697..ab23a94822 100644 --- a/clients/markdown/Models/MatchCriteria.md +++ b/clients/markdown/Models/MatchCriteria.md @@ -9,10 +9,10 @@ | **content** | **String** | Body content regexp content to match | [optional] [default to null] | | **content\_type** | **String** | Content type | [optional] [default to null] | | **websocket\_message** | **String** | Websocket message text to match | [optional] [default to null] | -| **request\_header** | [**NameValuePair**](NameValuePair.md) | | [optional] [default to null] | -| **request\_cookie** | [**NameValuePair**](NameValuePair.md) | | [optional] [default to null] | -| **response\_header** | [**NameValuePair**](NameValuePair.md) | | [optional] [default to null] | -| **response\_cookie** | [**NameValuePair**](NameValuePair.md) | | [optional] [default to null] | +| **request\_header** | [**MatchCriteria_request_header**](MatchCriteria_request_header.md) | | [optional] [default to null] | +| **request\_cookie** | [**MatchCriteria_request_header**](MatchCriteria_request_header.md) | | [optional] [default to null] | +| **response\_header** | [**MatchCriteria_request_header**](MatchCriteria_request_header.md) | | [optional] [default to null] | +| **response\_cookie** | [**MatchCriteria_request_header**](MatchCriteria_request_header.md) | | [optional] [default to null] | | **json\_valid** | **Boolean** | Is valid JSON | [optional] [default to null] | | **json\_path** | **String** | Has JSON path | [optional] [default to null] | | **json\_schema** | **String** | Validates against passed JSON schema | [optional] [default to null] | diff --git a/clients/markdown/Models/Counter.md b/clients/markdown/Models/Metric.md similarity index 57% rename from clients/markdown/Models/Counter.md rename to clients/markdown/Models/Metric.md index a360e5b46f..4a150c4aff 100644 --- a/clients/markdown/Models/Counter.md +++ b/clients/markdown/Models/Metric.md @@ -1,10 +1,10 @@ -# Counter +# Metric ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **name** | **String** | Name of Custom Counter to add to the page under _counters | [optional] [default to null] | -| **value** | **Double** | Value for the counter | [optional] [default to null] | +| **name** | **String** | Name of Custom Metric to add to the page under _metrics | [optional] [default to null] | +| **value** | **Double** | Value for the metric | [optional] [default to null] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/markdown/Models/Page.md b/clients/markdown/Models/Page.md index c0c68107dd..020a3c5b88 100644 --- a/clients/markdown/Models/Page.md +++ b/clients/markdown/Models/Page.md @@ -7,7 +7,7 @@ | **id** | **String** | | [default to null] | | **title** | **String** | | [default to null] | | **\_verifications** | [**List**](VerifyResult.md) | | [optional] [default to []] | -| **\_counters** | [**List**](Counter.md) | | [optional] [default to []] | +| **\_metrics** | [**List**](Metric.md) | | [optional] [default to []] | | **\_errors** | [**List**](Error.md) | | [optional] [default to []] | | **pageTimings** | [**PageTimings**](PageTimings.md) | | [default to null] | | **comment** | **String** | | [optional] [default to null] | diff --git a/clients/markdown/README.md b/clients/markdown/README.md index 078379ef0d..6e801ba11e 100644 --- a/clients/markdown/README.md +++ b/clients/markdown/README.md @@ -7,8 +7,8 @@ All URIs are relative to *http://localhost:48088* | Class | Method | HTTP request | Description | |------------ | ------------- | ------------- | -------------| -| *BrowserUpProxyApi* | [**addCounter**](Apis/BrowserUpProxyApi.md#addcounter) | **POST** /har/counters | Add Custom Counter to the captured traffic har | -*BrowserUpProxyApi* | [**addError**](Apis/BrowserUpProxyApi.md#adderror) | **POST** /har/errors | Add Custom Error to the captured traffic har | +| *BrowserUpProxyApi* | [**addError**](Apis/BrowserUpProxyApi.md#adderror) | **POST** /har/errors | Add Custom Error to the captured traffic har | +*BrowserUpProxyApi* | [**addMetric**](Apis/BrowserUpProxyApi.md#addmetric) | **POST** /har/metrics | Add Custom Metric to the captured traffic har | *BrowserUpProxyApi* | [**getHarLog**](Apis/BrowserUpProxyApi.md#getharlog) | **GET** /har | Get the current HAR. | *BrowserUpProxyApi* | [**healthcheck**](Apis/BrowserUpProxyApi.md#healthcheck) | **GET** /healthcheck | Get the healthcheck | *BrowserUpProxyApi* | [**newPage**](Apis/BrowserUpProxyApi.md#newpage) | **POST** /har/page | Starts a fresh HAR Page (Step) in the current active HAR to group requests. | @@ -23,12 +23,12 @@ All URIs are relative to *http://localhost:48088* ## Documentation for Models - [Action](./Models/Action.md) - - [Counter](./Models/Counter.md) - [Error](./Models/Error.md) - [Har](./Models/Har.md) - [HarEntry](./Models/HarEntry.md) - [HarEntry_cache](./Models/HarEntry_cache.md) - [HarEntry_cache_beforeRequest](./Models/HarEntry_cache_beforeRequest.md) + - [HarEntry_cache_beforeRequest_oneOf](./Models/HarEntry_cache_beforeRequest_oneOf.md) - [HarEntry_request](./Models/HarEntry_request.md) - [HarEntry_request_cookies_inner](./Models/HarEntry_request_cookies_inner.md) - [HarEntry_request_postData](./Models/HarEntry_request_postData.md) @@ -42,6 +42,8 @@ All URIs are relative to *http://localhost:48088* - [Header](./Models/Header.md) - [LargestContentfulPaint](./Models/LargestContentfulPaint.md) - [MatchCriteria](./Models/MatchCriteria.md) + - [MatchCriteria_request_header](./Models/MatchCriteria_request_header.md) + - [Metric](./Models/Metric.md) - [NameValuePair](./Models/NameValuePair.md) - [Page](./Models/Page.md) - [PageTiming](./Models/PageTiming.md) diff --git a/clients/python/.github/workflows/python.yml b/clients/python/.github/workflows/python.yml deleted file mode 100644 index 905412bc89..0000000000 --- a/clients/python/.github/workflows/python.yml +++ /dev/null @@ -1,37 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: BrowserUpMitmProxyClient Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/clients/python/.gitignore b/clients/python/.gitignore deleted file mode 100644 index 43995bd42f..0000000000 --- a/clients/python/.gitignore +++ /dev/null @@ -1,66 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ -venv/ -.venv/ -.python-version -.pytest_cache - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -#Ipython Notebook -.ipynb_checkpoints diff --git a/clients/python/.gitlab-ci.yml b/clients/python/.gitlab-ci.yml deleted file mode 100644 index 1e1aad5f77..0000000000 --- a/clients/python/.gitlab-ci.yml +++ /dev/null @@ -1,25 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=BrowserUpMitmProxyClient - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine \ No newline at end of file diff --git a/clients/python/.openapi-generator-ignore b/clients/python/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a..0000000000 --- a/clients/python/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/clients/python/.openapi-generator/FILES b/clients/python/.openapi-generator/FILES deleted file mode 100644 index 1510ce433f..0000000000 --- a/clients/python/.openapi-generator/FILES +++ /dev/null @@ -1,78 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.travis.yml -BrowserUpMitmProxyClient/__init__.py -BrowserUpMitmProxyClient/api/__init__.py -BrowserUpMitmProxyClient/api/browser_up_proxy_api.py -BrowserUpMitmProxyClient/api_client.py -BrowserUpMitmProxyClient/api_response.py -BrowserUpMitmProxyClient/configuration.py -BrowserUpMitmProxyClient/exceptions.py -BrowserUpMitmProxyClient/models/__init__.py -BrowserUpMitmProxyClient/models/action.py -BrowserUpMitmProxyClient/models/counter.py -BrowserUpMitmProxyClient/models/error.py -BrowserUpMitmProxyClient/models/har.py -BrowserUpMitmProxyClient/models/har_entry.py -BrowserUpMitmProxyClient/models/har_entry_cache.py -BrowserUpMitmProxyClient/models/har_entry_cache_before_request.py -BrowserUpMitmProxyClient/models/har_entry_request.py -BrowserUpMitmProxyClient/models/har_entry_request_cookies_inner.py -BrowserUpMitmProxyClient/models/har_entry_request_post_data.py -BrowserUpMitmProxyClient/models/har_entry_request_post_data_params_inner.py -BrowserUpMitmProxyClient/models/har_entry_request_query_string_inner.py -BrowserUpMitmProxyClient/models/har_entry_response.py -BrowserUpMitmProxyClient/models/har_entry_response_content.py -BrowserUpMitmProxyClient/models/har_entry_timings.py -BrowserUpMitmProxyClient/models/har_log.py -BrowserUpMitmProxyClient/models/har_log_creator.py -BrowserUpMitmProxyClient/models/header.py -BrowserUpMitmProxyClient/models/largest_contentful_paint.py -BrowserUpMitmProxyClient/models/match_criteria.py -BrowserUpMitmProxyClient/models/name_value_pair.py -BrowserUpMitmProxyClient/models/page.py -BrowserUpMitmProxyClient/models/page_timing.py -BrowserUpMitmProxyClient/models/page_timings.py -BrowserUpMitmProxyClient/models/verify_result.py -BrowserUpMitmProxyClient/models/web_socket_message.py -BrowserUpMitmProxyClient/py.typed -BrowserUpMitmProxyClient/rest.py -LICENSE -README.md -docs/Action.md -docs/BrowserUpProxyApi.md -docs/Counter.md -docs/Error.md -docs/Har.md -docs/HarEntry.md -docs/HarEntryCache.md -docs/HarEntryCacheBeforeRequest.md -docs/HarEntryRequest.md -docs/HarEntryRequestCookiesInner.md -docs/HarEntryRequestPostData.md -docs/HarEntryRequestPostDataParamsInner.md -docs/HarEntryRequestQueryStringInner.md -docs/HarEntryResponse.md -docs/HarEntryResponseContent.md -docs/HarEntryTimings.md -docs/HarLog.md -docs/HarLogCreator.md -docs/Header.md -docs/LargestContentfulPaint.md -docs/MatchCriteria.md -docs/NameValuePair.md -docs/Page.md -docs/PageTiming.md -docs/PageTimings.md -docs/VerifyResult.md -docs/WebSocketMessage.md -git_push.sh -pyproject.toml -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -tox.ini diff --git a/clients/python/.openapi-generator/VERSION b/clients/python/.openapi-generator/VERSION deleted file mode 100644 index 4122521804..0000000000 --- a/clients/python/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.0.0 \ No newline at end of file diff --git a/clients/python/.travis.yml b/clients/python/.travis.yml deleted file mode 100644 index 1ab5ba56fe..0000000000 --- a/clients/python/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=BrowserUpMitmProxyClient diff --git a/clients/python/BrowserUpMitmProxyClient/__init__.py b/clients/python/BrowserUpMitmProxyClient/__init__.py deleted file mode 100644 index c96a7de418..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/__init__.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -__version__ = "1.0.1" - -# import apis into sdk package -from BrowserUpMitmProxyClient.api.browser_up_proxy_api import BrowserUpProxyApi - -# import ApiClient -from BrowserUpMitmProxyClient.api_response import ApiResponse -from BrowserUpMitmProxyClient.api_client import ApiClient -from BrowserUpMitmProxyClient.configuration import Configuration -from BrowserUpMitmProxyClient.exceptions import OpenApiException -from BrowserUpMitmProxyClient.exceptions import ApiTypeError -from BrowserUpMitmProxyClient.exceptions import ApiValueError -from BrowserUpMitmProxyClient.exceptions import ApiKeyError -from BrowserUpMitmProxyClient.exceptions import ApiAttributeError -from BrowserUpMitmProxyClient.exceptions import ApiException - -# import models into sdk package -from BrowserUpMitmProxyClient.models.action import Action -from BrowserUpMitmProxyClient.models.counter import Counter -from BrowserUpMitmProxyClient.models.error import Error -from BrowserUpMitmProxyClient.models.har import Har -from BrowserUpMitmProxyClient.models.har_entry import HarEntry -from BrowserUpMitmProxyClient.models.har_entry_cache import HarEntryCache -from BrowserUpMitmProxyClient.models.har_entry_cache_before_request import ( - HarEntryCacheBeforeRequest, -) -from BrowserUpMitmProxyClient.models.har_entry_request import HarEntryRequest -from BrowserUpMitmProxyClient.models.har_entry_request_cookies_inner import ( - HarEntryRequestCookiesInner, -) -from BrowserUpMitmProxyClient.models.har_entry_request_post_data import ( - HarEntryRequestPostData, -) -from BrowserUpMitmProxyClient.models.har_entry_request_post_data_params_inner import ( - HarEntryRequestPostDataParamsInner, -) -from BrowserUpMitmProxyClient.models.har_entry_request_query_string_inner import ( - HarEntryRequestQueryStringInner, -) -from BrowserUpMitmProxyClient.models.har_entry_response import HarEntryResponse -from BrowserUpMitmProxyClient.models.har_entry_response_content import ( - HarEntryResponseContent, -) -from BrowserUpMitmProxyClient.models.har_entry_timings import HarEntryTimings -from BrowserUpMitmProxyClient.models.har_log import HarLog -from BrowserUpMitmProxyClient.models.har_log_creator import HarLogCreator -from BrowserUpMitmProxyClient.models.header import Header -from BrowserUpMitmProxyClient.models.largest_contentful_paint import ( - LargestContentfulPaint, -) -from BrowserUpMitmProxyClient.models.match_criteria import MatchCriteria -from BrowserUpMitmProxyClient.models.name_value_pair import NameValuePair -from BrowserUpMitmProxyClient.models.page import Page -from BrowserUpMitmProxyClient.models.page_timing import PageTiming -from BrowserUpMitmProxyClient.models.page_timings import PageTimings -from BrowserUpMitmProxyClient.models.verify_result import VerifyResult -from BrowserUpMitmProxyClient.models.web_socket_message import WebSocketMessage diff --git a/clients/python/BrowserUpMitmProxyClient/api/__init__.py b/clients/python/BrowserUpMitmProxyClient/api/__init__.py deleted file mode 100644 index 5d2d67bfb5..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/api/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# flake8: noqa - -# import apis into api package -from BrowserUpMitmProxyClient.api.browser_up_proxy_api import BrowserUpProxyApi diff --git a/clients/python/BrowserUpMitmProxyClient/api/browser_up_proxy_api.py b/clients/python/BrowserUpMitmProxyClient/api/browser_up_proxy_api.py deleted file mode 100644 index 85ad934305..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/api/browser_up_proxy_api.py +++ /dev/null @@ -1,1693 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import re # noqa: F401 - -from pydantic import conint -from pydantic import constr -from pydantic import Field -from pydantic import validate_arguments -from typing_extensions import Annotated - -from BrowserUpMitmProxyClient.api_client import ApiClient -from BrowserUpMitmProxyClient.api_response import ApiResponse -from BrowserUpMitmProxyClient.exceptions import ApiTypeError # noqa: F401 -from BrowserUpMitmProxyClient.exceptions import ApiValueError # noqa: F401 -from BrowserUpMitmProxyClient.models.counter import Counter -from BrowserUpMitmProxyClient.models.error import Error -from BrowserUpMitmProxyClient.models.har import Har -from BrowserUpMitmProxyClient.models.match_criteria import MatchCriteria -from BrowserUpMitmProxyClient.models.verify_result import VerifyResult - - -class BrowserUpProxyApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def add_counter( - self, - counter: Annotated[ - Counter, - Field( - ..., - description="Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key", - ), - ], - **kwargs, - ) -> None: # noqa: E501 - """add_counter # noqa: E501 - - Add Custom Counter to the captured traffic har # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_counter(counter, async_req=True) - >>> result = thread.get() - - :param counter: Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key (required) - :type counter: Counter - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the add_counter_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.add_counter_with_http_info(counter, **kwargs) # noqa: E501 - - @validate_arguments - def add_counter_with_http_info( - self, - counter: Annotated[ - Counter, - Field( - ..., - description="Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key", - ), - ], - **kwargs, - ) -> ApiResponse: # noqa: E501 - """add_counter # noqa: E501 - - Add Custom Counter to the captured traffic har # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_counter_with_http_info(counter, async_req=True) - >>> result = thread.get() - - :param counter: Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key (required) - :type counter: Counter - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = ["counter"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method add_counter" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params["counter"] is not None: - _body_params = _params["counter"] - - # set the HTTP header `Content-Type` - _content_types_list = _params.get( - "_content_type", - self.api_client.select_header_content_type(["application/json"]), - ) - if _content_types_list: - _header_params["Content-Type"] = _content_types_list - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - "/har/counters", - "POST", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) - - @validate_arguments - def add_error( - self, - error: Annotated[ - Error, - Field( - ..., - description="Receives an error to track. Internally, the error is stored in an array in the har under the _errors key", - ), - ], - **kwargs, - ) -> None: # noqa: E501 - """add_error # noqa: E501 - - Add Custom Error to the captured traffic har # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_error(error, async_req=True) - >>> result = thread.get() - - :param error: Receives an error to track. Internally, the error is stored in an array in the har under the _errors key (required) - :type error: Error - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the add_error_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.add_error_with_http_info(error, **kwargs) # noqa: E501 - - @validate_arguments - def add_error_with_http_info( - self, - error: Annotated[ - Error, - Field( - ..., - description="Receives an error to track. Internally, the error is stored in an array in the har under the _errors key", - ), - ], - **kwargs, - ) -> ApiResponse: # noqa: E501 - """add_error # noqa: E501 - - Add Custom Error to the captured traffic har # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.add_error_with_http_info(error, async_req=True) - >>> result = thread.get() - - :param error: Receives an error to track. Internally, the error is stored in an array in the har under the _errors key (required) - :type error: Error - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = ["error"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method add_error" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params["error"] is not None: - _body_params = _params["error"] - - # set the HTTP header `Content-Type` - _content_types_list = _params.get( - "_content_type", - self.api_client.select_header_content_type(["application/json"]), - ) - if _content_types_list: - _header_params["Content-Type"] = _content_types_list - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - "/har/errors", - "POST", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) - - @validate_arguments - def get_har_log(self, **kwargs) -> Har: # noqa: E501 - """get_har_log # noqa: E501 - - Get the current HAR. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_har_log(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Har - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the get_har_log_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.get_har_log_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_har_log_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """get_har_log # noqa: E501 - - Get the current HAR. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_har_log_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Har, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_har_log" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "Har", - } - - return self.api_client.call_api( - "/har", - "GET", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) - - @validate_arguments - def healthcheck(self, **kwargs) -> None: # noqa: E501 - """healthcheck # noqa: E501 - - Get the healthcheck # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.healthcheck(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the healthcheck_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.healthcheck_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def healthcheck_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """healthcheck # noqa: E501 - - Get the healthcheck # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.healthcheck_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: None - """ - - _params = locals() - - _all_params = [] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method healthcheck" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = {} - - return self.api_client.call_api( - "/healthcheck", - "GET", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) - - @validate_arguments - def new_page( - self, - title: Annotated[ - constr(strict=True), - Field(..., description="The unique title for this har page/step."), - ], - **kwargs, - ) -> Har: # noqa: E501 - """new_page # noqa: E501 - - Starts a fresh HAR Page (Step) in the current active HAR to group requests. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.new_page(title, async_req=True) - >>> result = thread.get() - - :param title: The unique title for this har page/step. (required) - :type title: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Har - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the new_page_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.new_page_with_http_info(title, **kwargs) # noqa: E501 - - @validate_arguments - def new_page_with_http_info( - self, - title: Annotated[ - constr(strict=True), - Field(..., description="The unique title for this har page/step."), - ], - **kwargs, - ) -> ApiResponse: # noqa: E501 - """new_page # noqa: E501 - - Starts a fresh HAR Page (Step) in the current active HAR to group requests. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.new_page_with_http_info(title, async_req=True) - >>> result = thread.get() - - :param title: The unique title for this har page/step. (required) - :type title: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Har, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["title"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method new_page" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params["title"]: - _path_params["title"] = _params["title"] - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "Har", - } - - return self.api_client.call_api( - "/har/page", - "POST", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) - - @validate_arguments - def reset_har_log(self, **kwargs) -> Har: # noqa: E501 - """reset_har_log # noqa: E501 - - Starts a fresh HAR capture session. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.reset_har_log(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Har - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the reset_har_log_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.reset_har_log_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def reset_har_log_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 - """reset_har_log # noqa: E501 - - Starts a fresh HAR capture session. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.reset_har_log_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Har, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method reset_har_log" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "Har", - } - - return self.api_client.call_api( - "/har", - "PUT", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) - - @validate_arguments - def verify_not_present( - self, - name: Annotated[ - constr(strict=True), - Field(..., description="The unique name for this verification operation"), - ], - match_criteria: Annotated[ - MatchCriteria, - Field( - ..., - description="Match criteria to select requests - response pairs for size tests", - ), - ], - **kwargs, - ) -> VerifyResult: # noqa: E501 - """verify_not_present # noqa: E501 - - Verify no matching items are present in the captured traffic # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.verify_not_present(name, match_criteria, async_req=True) - >>> result = thread.get() - - :param name: The unique name for this verification operation (required) - :type name: str - :param match_criteria: Match criteria to select requests - response pairs for size tests (required) - :type match_criteria: MatchCriteria - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: VerifyResult - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the verify_not_present_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.verify_not_present_with_http_info(name, match_criteria, **kwargs) # noqa: E501 - - @validate_arguments - def verify_not_present_with_http_info( - self, - name: Annotated[ - constr(strict=True), - Field(..., description="The unique name for this verification operation"), - ], - match_criteria: Annotated[ - MatchCriteria, - Field( - ..., - description="Match criteria to select requests - response pairs for size tests", - ), - ], - **kwargs, - ) -> ApiResponse: # noqa: E501 - """verify_not_present # noqa: E501 - - Verify no matching items are present in the captured traffic # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.verify_not_present_with_http_info(name, match_criteria, async_req=True) - >>> result = thread.get() - - :param name: The unique name for this verification operation (required) - :type name: str - :param match_criteria: Match criteria to select requests - response pairs for size tests (required) - :type match_criteria: MatchCriteria - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(VerifyResult, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["name", "match_criteria"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method verify_not_present" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params["name"]: - _path_params["name"] = _params["name"] - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params["match_criteria"] is not None: - _body_params = _params["match_criteria"] - - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get( - "_content_type", - self.api_client.select_header_content_type(["application/json"]), - ) - if _content_types_list: - _header_params["Content-Type"] = _content_types_list - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "VerifyResult", - "422": None, - } - - return self.api_client.call_api( - "/verify/not_present/{name}", - "POST", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) - - @validate_arguments - def verify_present( - self, - name: Annotated[ - constr(strict=True), - Field(..., description="The unique name for this verification operation"), - ], - match_criteria: Annotated[ - MatchCriteria, - Field( - ..., - description="Match criteria to select requests - response pairs for size tests", - ), - ], - **kwargs, - ) -> VerifyResult: # noqa: E501 - """verify_present # noqa: E501 - - Verify at least one matching item is present in the captured traffic # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.verify_present(name, match_criteria, async_req=True) - >>> result = thread.get() - - :param name: The unique name for this verification operation (required) - :type name: str - :param match_criteria: Match criteria to select requests - response pairs for size tests (required) - :type match_criteria: MatchCriteria - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: VerifyResult - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the verify_present_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.verify_present_with_http_info(name, match_criteria, **kwargs) # noqa: E501 - - @validate_arguments - def verify_present_with_http_info( - self, - name: Annotated[ - constr(strict=True), - Field(..., description="The unique name for this verification operation"), - ], - match_criteria: Annotated[ - MatchCriteria, - Field( - ..., - description="Match criteria to select requests - response pairs for size tests", - ), - ], - **kwargs, - ) -> ApiResponse: # noqa: E501 - """verify_present # noqa: E501 - - Verify at least one matching item is present in the captured traffic # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.verify_present_with_http_info(name, match_criteria, async_req=True) - >>> result = thread.get() - - :param name: The unique name for this verification operation (required) - :type name: str - :param match_criteria: Match criteria to select requests - response pairs for size tests (required) - :type match_criteria: MatchCriteria - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(VerifyResult, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["name", "match_criteria"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method verify_present" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params["name"]: - _path_params["name"] = _params["name"] - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params["match_criteria"] is not None: - _body_params = _params["match_criteria"] - - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get( - "_content_type", - self.api_client.select_header_content_type(["application/json"]), - ) - if _content_types_list: - _header_params["Content-Type"] = _content_types_list - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "VerifyResult", - "422": None, - } - - return self.api_client.call_api( - "/verify/present/{name}", - "POST", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) - - @validate_arguments - def verify_size( - self, - size: Annotated[ - conint(strict=True, ge=0), - Field(..., description="The size used for comparison, in kilobytes"), - ], - name: Annotated[ - constr(strict=True), - Field(..., description="The unique name for this verification operation"), - ], - match_criteria: Annotated[ - MatchCriteria, - Field( - ..., - description="Match criteria to select requests - response pairs for size tests", - ), - ], - **kwargs, - ) -> VerifyResult: # noqa: E501 - """verify_size # noqa: E501 - - Verify matching items in the captured traffic meet the size criteria # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.verify_size(size, name, match_criteria, async_req=True) - >>> result = thread.get() - - :param size: The size used for comparison, in kilobytes (required) - :type size: int - :param name: The unique name for this verification operation (required) - :type name: str - :param match_criteria: Match criteria to select requests - response pairs for size tests (required) - :type match_criteria: MatchCriteria - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: VerifyResult - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the verify_size_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.verify_size_with_http_info(size, name, match_criteria, **kwargs) # noqa: E501 - - @validate_arguments - def verify_size_with_http_info( - self, - size: Annotated[ - conint(strict=True, ge=0), - Field(..., description="The size used for comparison, in kilobytes"), - ], - name: Annotated[ - constr(strict=True), - Field(..., description="The unique name for this verification operation"), - ], - match_criteria: Annotated[ - MatchCriteria, - Field( - ..., - description="Match criteria to select requests - response pairs for size tests", - ), - ], - **kwargs, - ) -> ApiResponse: # noqa: E501 - """verify_size # noqa: E501 - - Verify matching items in the captured traffic meet the size criteria # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.verify_size_with_http_info(size, name, match_criteria, async_req=True) - >>> result = thread.get() - - :param size: The size used for comparison, in kilobytes (required) - :type size: int - :param name: The unique name for this verification operation (required) - :type name: str - :param match_criteria: Match criteria to select requests - response pairs for size tests (required) - :type match_criteria: MatchCriteria - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(VerifyResult, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["size", "name", "match_criteria"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method verify_size" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params["size"]: - _path_params["size"] = _params["size"] - - if _params["name"]: - _path_params["name"] = _params["name"] - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params["match_criteria"] is not None: - _body_params = _params["match_criteria"] - - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get( - "_content_type", - self.api_client.select_header_content_type(["application/json"]), - ) - if _content_types_list: - _header_params["Content-Type"] = _content_types_list - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "VerifyResult", - "422": None, - } - - return self.api_client.call_api( - "/verify/size/{size}/{name}", - "POST", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) - - @validate_arguments - def verify_sla( - self, - time: Annotated[ - conint(strict=True, ge=0), - Field(..., description="The time used for comparison"), - ], - name: Annotated[ - constr(strict=True), - Field(..., description="The unique name for this verification operation"), - ], - match_criteria: Annotated[ - MatchCriteria, - Field( - ..., - description="Match criteria to select requests - response pairs for size tests", - ), - ], - **kwargs, - ) -> VerifyResult: # noqa: E501 - """verify_sla # noqa: E501 - - Verify each traffic item matching the criteria meets is below SLA time # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.verify_sla(time, name, match_criteria, async_req=True) - >>> result = thread.get() - - :param time: The time used for comparison (required) - :type time: int - :param name: The unique name for this verification operation (required) - :type name: str - :param match_criteria: Match criteria to select requests - response pairs for size tests (required) - :type match_criteria: MatchCriteria - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: VerifyResult - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the verify_sla_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.verify_sla_with_http_info(time, name, match_criteria, **kwargs) # noqa: E501 - - @validate_arguments - def verify_sla_with_http_info( - self, - time: Annotated[ - conint(strict=True, ge=0), - Field(..., description="The time used for comparison"), - ], - name: Annotated[ - constr(strict=True), - Field(..., description="The unique name for this verification operation"), - ], - match_criteria: Annotated[ - MatchCriteria, - Field( - ..., - description="Match criteria to select requests - response pairs for size tests", - ), - ], - **kwargs, - ) -> ApiResponse: # noqa: E501 - """verify_sla # noqa: E501 - - Verify each traffic item matching the criteria meets is below SLA time # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.verify_sla_with_http_info(time, name, match_criteria, async_req=True) - >>> result = thread.get() - - :param time: The time used for comparison (required) - :type time: int - :param name: The unique name for this verification operation (required) - :type name: str - :param match_criteria: Match criteria to select requests - response pairs for size tests (required) - :type match_criteria: MatchCriteria - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(VerifyResult, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["time", "name", "match_criteria"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method verify_sla" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params["time"]: - _path_params["time"] = _params["time"] - - if _params["name"]: - _path_params["name"] = _params["name"] - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params["match_criteria"] is not None: - _body_params = _params["match_criteria"] - - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json"] - ) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get( - "_content_type", - self.api_client.select_header_content_type(["application/json"]), - ) - if _content_types_list: - _header_params["Content-Type"] = _content_types_list - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "VerifyResult", - "422": None, - } - - return self.api_client.call_api( - "/verify/sla/{time}/{name}", - "POST", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) diff --git a/clients/python/BrowserUpMitmProxyClient/api_client.py b/clients/python/BrowserUpMitmProxyClient/api_client.py deleted file mode 100644 index aed4b10518..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/api_client.py +++ /dev/null @@ -1,834 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import atexit -import datetime -import json -import mimetypes -import os -import re -import tempfile -from multiprocessing.pool import ThreadPool -from urllib.parse import quote - -from dateutil.parser import parse - -import BrowserUpMitmProxyClient.models -from BrowserUpMitmProxyClient import rest -from BrowserUpMitmProxyClient.api_response import ApiResponse -from BrowserUpMitmProxyClient.configuration import Configuration -from BrowserUpMitmProxyClient.exceptions import ApiException -from BrowserUpMitmProxyClient.exceptions import ApiValueError - - -class ApiClient(object): - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - "int": int, - "long": int, # TODO remove as only py3 is supported? - "float": float, - "str": str, - "bool": bool, - "date": datetime.date, - "datetime": datetime.datetime, - "object": object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None, - pool_threads=1, - ): - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - self.pool_threads = pool_threads - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/1.0.1/python" - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, "unregister"): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers["User-Agent"] - - @user_agent.setter - def user_agent(self, value): - self.default_headers["User-Agent"] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def __call_api( - self, - resource_path, - method, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, - response_types_map=None, - auth_settings=None, - _return_http_data_only=None, - collection_formats=None, - _preload_content=True, - _request_timeout=None, - _host=None, - _request_auth=None, - ): - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params["Cookie"] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params, collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - "{%s}" % k, quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, collection_formats) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth, - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query(query_params, collection_formats) - url += "?" + url_query - - try: - # perform request and return response - response_data = self.request( - method, - url, - query_params=query_params, - headers=header_params, - post_params=post_params, - body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - ) - except ApiException as e: - if e.body: - e.body = e.body.decode("utf-8") - raise e - - self.last_response = response_data - - return_data = None # assuming derialization is not needed - # data needs deserialization or returns HTTP data (deserialized) only - if _preload_content or _return_http_data_only: - response_type = response_types_map.get(str(response_data.status), None) - - if response_type == "bytearray": - response_data.data = response_data.data - else: - match = None - content_type = response_data.getheader("content-type") - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_data.data = response_data.data.decode(encoding) - - # deserialize response data - if response_type == "bytearray": - return_data = response_data.data - elif response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return return_data - else: - return ApiResponse( - status_code=response_data.status, - data=return_data, - headers=response_data.getheaders(), - raw_data=response_data.data, - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) for key, val in obj_dict.items() - } - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) is str: - if klass.startswith("List["): - sub_kls = re.match(r"List\[(.*)]", klass).group(1) - return [self.__deserialize(sub_data, sub_kls) for sub_data in data] - - if klass.startswith("Dict["): - sub_kls = re.match(r"Dict\[([^,]*), (.*)]", klass).group(2) - return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(BrowserUpMitmProxyClient.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass is object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api( - self, - resource_path, - method, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, - response_types_map=None, - auth_settings=None, - async_req=None, - _return_http_data_only=None, - collection_formats=None, - _preload_content=True, - _request_timeout=None, - _host=None, - _request_auth=None, - ): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async_req request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_token: dict, optional - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api( - resource_path, - method, - path_params, - query_params, - header_params, - body, - post_params, - files, - response_types_map, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, - _request_auth, - ) - - return self.pool.apply_async( - self.__call_api, - ( - resource_path, - method, - path_params, - query_params, - header_params, - body, - post_params, - files, - response_types_map, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, - _request_auth, - ), - ) - - def request( - self, - method, - url, - query_params=None, - headers=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.get_request( - url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers, - ) - elif method == "HEAD": - return self.rest_client.head_request( - url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers, - ) - elif method == "OPTIONS": - return self.rest_client.options_request( - url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - ) - elif method == "POST": - return self.rest_client.post_request( - url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - elif method == "PUT": - return self.rest_client.put_request( - url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - elif method == "PATCH": - return self.rest_client.patch_request( - url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - elif method == "DELETE": - return self.rest_client.delete_request( - url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == "multi": - new_params.extend((k, value) for value in v) - else: - if collection_format == "ssv": - delimiter = " " - elif collection_format == "tsv": - delimiter = "\t" - elif collection_format == "pipes": - delimiter = "|" - else: # csv is the default - delimiter = "," - new_params.append((k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == "multi": - new_params.extend((k, value) for value in v) - else: - if collection_format == "ssv": - delimiter = " " - elif collection_format == "tsv": - delimiter = "\t" - elif collection_format == "pipes": - delimiter = "|" - else: # csv is the default - delimiter = "," - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, "rb") as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or "application/octet-stream" - ) - params.append(tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - for accept in accepts: - if re.search("json", accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search("json", content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None, - ): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, queries, resource_path, method, body, request_auth - ) - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, queries, resource_path, method, body, auth_setting - ) - - def _apply_auth_params( - self, headers, queries, resource_path, method, body, auth_setting - ): - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting["in"] == "cookie": - headers["Cookie"] = auth_setting["value"] - elif auth_setting["in"] == "header": - if auth_setting["type"] != "http-signature": - headers[auth_setting["key"]] = auth_setting["value"] - elif auth_setting["in"] == "query": - queries.append((auth_setting["key"], auth_setting["value"])) - else: - raise ApiValueError("Authentication token must be in `query` or `header`") - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=("Failed to parse `{0}` as datetime object".format(string)), - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/clients/python/BrowserUpMitmProxyClient/api_response.py b/clients/python/BrowserUpMitmProxyClient/api_response.py deleted file mode 100644 index d72c9280e5..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/api_response.py +++ /dev/null @@ -1,32 +0,0 @@ -"""API response object.""" - -from __future__ import annotations - -from typing import Any -from typing import Dict -from typing import Optional - -from pydantic import Field -from pydantic import StrictInt -from pydantic import StrictStr - - -class ApiResponse: - """ - API response object - """ - - status_code: Optional[StrictInt] = Field(None, description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field( - None, description="HTTP headers" - ) - data: Optional[Any] = Field( - None, description="Deserialized data given the data type" - ) - raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") - - def __init__(self, status_code=None, headers=None, data=None, raw_data=None): - self.status_code = status_code - self.headers = headers - self.data = data - self.raw_data = raw_data diff --git a/clients/python/BrowserUpMitmProxyClient/configuration.py b/clients/python/BrowserUpMitmProxyClient/configuration.py deleted file mode 100644 index b2f6bbb288..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/configuration.py +++ /dev/null @@ -1,458 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import copy -import http.client as httplib -import logging -import multiprocessing -import sys - -import urllib3 - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - "multipleOf", - "maximum", - "exclusiveMaximum", - "minimum", - "exclusiveMinimum", - "maxLength", - "minLength", - "pattern", - "maxItems", - "minItems", -} - - -class Configuration(object): - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - """ - - _default = None - - def __init__( - self, - host=None, - api_key=None, - api_key_prefix=None, - username=None, - password=None, - access_token=None, - server_index=None, - server_variables=None, - server_operation_index=None, - server_operation_variables=None, - ssl_ca_cert=None, - ): - """Constructor""" - self._base_path = "http://localhost:48088" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("BrowserUpMitmProxyClient") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = "%(asctime)s %(levelname)s %(message)s" - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = "" - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ("logger", "logger_file_handler"): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get( - identifier, self.api_key.get(alias) if alias is not None else None - ) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers(basic_auth=username + ":" + password).get( - "authorization" - ) - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return ( - "Python SDK Debug Report:\n" - "OS: {env}\n" - "Python Version: {pyversion}\n" - "Version of the API: 1.0.0\n" - "SDK Package Version: 1.0.1".format(env=sys.platform, pyversion=sys.version) - ) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - "url": "http://localhost:{port}", - "description": "The development API server", - "variables": { - "port": { - "description": "No description provided", - "default_value": "48088", - "enum_values": ["48088"], - } - }, - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers)) - ) - - url = server["url"] - - # go through variables and replace placeholders - for variable_name, variable in server.get("variables", {}).items(): - used_value = variables.get(variable_name, variable["default_value"]) - - if "enum_values" in variable and used_value not in variable["enum_values"]: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], variable["enum_values"] - ) - ) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings( - self.server_index, variables=self.server_variables - ) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/clients/python/BrowserUpMitmProxyClient/exceptions.py b/clients/python/BrowserUpMitmProxyClient/exceptions.py deleted file mode 100644 index 34d2bcffeb..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/exceptions.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None): - """Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format(self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - - -class BadRequestException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): - super(BadRequestException, self).__init__(status, reason, http_resp) - - -class NotFoundException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/clients/python/BrowserUpMitmProxyClient/models/__init__.py b/clients/python/BrowserUpMitmProxyClient/models/__init__.py deleted file mode 100644 index cc1f99f0a6..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/__init__.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -# import models into model package -from BrowserUpMitmProxyClient.models.action import Action -from BrowserUpMitmProxyClient.models.counter import Counter -from BrowserUpMitmProxyClient.models.error import Error -from BrowserUpMitmProxyClient.models.har import Har -from BrowserUpMitmProxyClient.models.har_entry import HarEntry -from BrowserUpMitmProxyClient.models.har_entry_cache import HarEntryCache -from BrowserUpMitmProxyClient.models.har_entry_cache_before_request import ( - HarEntryCacheBeforeRequest, -) -from BrowserUpMitmProxyClient.models.har_entry_request import HarEntryRequest -from BrowserUpMitmProxyClient.models.har_entry_request_cookies_inner import ( - HarEntryRequestCookiesInner, -) -from BrowserUpMitmProxyClient.models.har_entry_request_post_data import ( - HarEntryRequestPostData, -) -from BrowserUpMitmProxyClient.models.har_entry_request_post_data_params_inner import ( - HarEntryRequestPostDataParamsInner, -) -from BrowserUpMitmProxyClient.models.har_entry_request_query_string_inner import ( - HarEntryRequestQueryStringInner, -) -from BrowserUpMitmProxyClient.models.har_entry_response import HarEntryResponse -from BrowserUpMitmProxyClient.models.har_entry_response_content import ( - HarEntryResponseContent, -) -from BrowserUpMitmProxyClient.models.har_entry_timings import HarEntryTimings -from BrowserUpMitmProxyClient.models.har_log import HarLog -from BrowserUpMitmProxyClient.models.har_log_creator import HarLogCreator -from BrowserUpMitmProxyClient.models.header import Header -from BrowserUpMitmProxyClient.models.largest_contentful_paint import ( - LargestContentfulPaint, -) -from BrowserUpMitmProxyClient.models.match_criteria import MatchCriteria -from BrowserUpMitmProxyClient.models.name_value_pair import NameValuePair -from BrowserUpMitmProxyClient.models.page import Page -from BrowserUpMitmProxyClient.models.page_timing import PageTiming -from BrowserUpMitmProxyClient.models.page_timings import PageTimings -from BrowserUpMitmProxyClient.models.verify_result import VerifyResult -from BrowserUpMitmProxyClient.models.web_socket_message import WebSocketMessage diff --git a/clients/python/BrowserUpMitmProxyClient/models/action.py b/clients/python/BrowserUpMitmProxyClient/models/action.py deleted file mode 100644 index b10d5b2d25..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/action.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional - -from pydantic import BaseModel -from pydantic import Field -from pydantic import StrictStr - - -class Action(BaseModel): - """ - Action - """ - - name: Optional[StrictStr] = None - id: Optional[StrictStr] = None - class_name: Optional[StrictStr] = Field(None, alias="className") - tag_name: Optional[StrictStr] = Field(None, alias="tagName") - xpath: Optional[StrictStr] = None - data_attributes: Optional[StrictStr] = Field(None, alias="dataAttributes") - form_name: Optional[StrictStr] = Field(None, alias="formName") - content: Optional[StrictStr] = None - __properties = [ - "name", - "id", - "className", - "tagName", - "xpath", - "dataAttributes", - "formName", - "content", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Action: - """Create an instance of Action from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Action: - """Create an instance of Action from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Action.parse_obj(obj) - - _obj = Action.parse_obj( - { - "name": obj.get("name"), - "id": obj.get("id"), - "class_name": obj.get("className"), - "tag_name": obj.get("tagName"), - "xpath": obj.get("xpath"), - "data_attributes": obj.get("dataAttributes"), - "form_name": obj.get("formName"), - "content": obj.get("content"), - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/counter.py b/clients/python/BrowserUpMitmProxyClient/models/counter.py deleted file mode 100644 index 814263692b..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/counter.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional -from typing import Union - -from pydantic import BaseModel -from pydantic import Field -from pydantic import StrictFloat -from pydantic import StrictInt -from pydantic import StrictStr - - -class Counter(BaseModel): - """ - Counter - """ - - name: Optional[StrictStr] = Field( - None, description="Name of Custom Counter to add to the page under _counters" - ) - value: Optional[Union[StrictFloat, StrictInt]] = Field( - None, description="Value for the counter" - ) - __properties = ["name", "value"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Counter: - """Create an instance of Counter from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Counter: - """Create an instance of Counter from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Counter.parse_obj(obj) - - _obj = Counter.parse_obj({"name": obj.get("name"), "value": obj.get("value")}) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/error.py b/clients/python/BrowserUpMitmProxyClient/models/error.py deleted file mode 100644 index c08609a5e9..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/error.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional - -from pydantic import BaseModel -from pydantic import Field -from pydantic import StrictStr - - -class Error(BaseModel): - """ - Error - """ - - name: Optional[StrictStr] = Field( - None, description="Name of the Error to add. Stored in har under _errors" - ) - details: Optional[StrictStr] = Field(None, description="Short details of the error") - __properties = ["name", "details"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Error: - """Create an instance of Error from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Error: - """Create an instance of Error from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Error.parse_obj(obj) - - _obj = Error.parse_obj({"name": obj.get("name"), "details": obj.get("details")}) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/har.py b/clients/python/BrowserUpMitmProxyClient/models/har.py deleted file mode 100644 index f1fb8a162e..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/har.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Any - -from pydantic import BaseModel -from pydantic import Field - -from BrowserUpMitmProxyClient.models.har_log import HarLog - - -class Har(BaseModel): - """ - Har - """ - - log: HarLog = Field(...) - additional_properties: dict[str, Any] = {} - __properties = ["log"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Har: - """Create an instance of Har from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict( - by_alias=True, exclude={"additional_properties"}, exclude_none=True - ) - # override the default output from pydantic by calling `to_dict()` of log - if self.log: - _dict["log"] = self.log.to_dict() - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Har: - """Create an instance of Har from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Har.parse_obj(obj) - - _obj = Har.parse_obj( - { - "log": HarLog.from_dict(obj.get("log")) - if obj.get("log") is not None - else None - } - ) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/har_entry.py b/clients/python/BrowserUpMitmProxyClient/models/har_entry.py deleted file mode 100644 index 40f8a97b16..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/har_entry.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from datetime import datetime -from typing import Optional - -from pydantic import BaseModel -from pydantic import conint -from pydantic import conlist -from pydantic import Field -from pydantic import StrictStr - -from BrowserUpMitmProxyClient.models.har_entry_cache import HarEntryCache -from BrowserUpMitmProxyClient.models.har_entry_request import HarEntryRequest -from BrowserUpMitmProxyClient.models.har_entry_response import HarEntryResponse -from BrowserUpMitmProxyClient.models.har_entry_timings import HarEntryTimings -from BrowserUpMitmProxyClient.models.web_socket_message import WebSocketMessage - - -class HarEntry(BaseModel): - """ - HarEntry - """ - - pageref: Optional[StrictStr] = None - started_date_time: datetime = Field(..., alias="startedDateTime") - time: conint(strict=True, ge=0) = Field(...) - request: HarEntryRequest = Field(...) - response: HarEntryResponse = Field(...) - cache: HarEntryCache = Field(...) - timings: HarEntryTimings = Field(...) - server_ip_address: Optional[StrictStr] = Field(None, alias="serverIPAddress") - web_socket_messages: Optional[conlist(WebSocketMessage)] = Field( - None, alias="_webSocketMessages" - ) - connection: Optional[StrictStr] = None - comment: Optional[StrictStr] = None - __properties = [ - "pageref", - "startedDateTime", - "time", - "request", - "response", - "cache", - "timings", - "serverIPAddress", - "_webSocketMessages", - "connection", - "comment", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> HarEntry: - """Create an instance of HarEntry from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of request - if self.request: - _dict["request"] = self.request.to_dict() - # override the default output from pydantic by calling `to_dict()` of response - if self.response: - _dict["response"] = self.response.to_dict() - # override the default output from pydantic by calling `to_dict()` of cache - if self.cache: - _dict["cache"] = self.cache.to_dict() - # override the default output from pydantic by calling `to_dict()` of timings - if self.timings: - _dict["timings"] = self.timings.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in web_socket_messages (list) - _items = [] - if self.web_socket_messages: - for _item in self.web_socket_messages: - if _item: - _items.append(_item.to_dict()) - _dict["_webSocketMessages"] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> HarEntry: - """Create an instance of HarEntry from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return HarEntry.parse_obj(obj) - - _obj = HarEntry.parse_obj( - { - "pageref": obj.get("pageref"), - "started_date_time": obj.get("startedDateTime"), - "time": obj.get("time"), - "request": HarEntryRequest.from_dict(obj.get("request")) - if obj.get("request") is not None - else None, - "response": HarEntryResponse.from_dict(obj.get("response")) - if obj.get("response") is not None - else None, - "cache": HarEntryCache.from_dict(obj.get("cache")) - if obj.get("cache") is not None - else None, - "timings": HarEntryTimings.from_dict(obj.get("timings")) - if obj.get("timings") is not None - else None, - "server_ip_address": obj.get("serverIPAddress"), - "web_socket_messages": [ - WebSocketMessage.from_dict(_item) - for _item in obj.get("_webSocketMessages") - ] - if obj.get("_webSocketMessages") is not None - else None, - "connection": obj.get("connection"), - "comment": obj.get("comment"), - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/har_entry_cache.py b/clients/python/BrowserUpMitmProxyClient/models/har_entry_cache.py deleted file mode 100644 index a2373718c4..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/har_entry_cache.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional - -from pydantic import BaseModel -from pydantic import Field -from pydantic import StrictStr - -from BrowserUpMitmProxyClient.models.har_entry_cache_before_request import ( - HarEntryCacheBeforeRequest, -) - - -class HarEntryCache(BaseModel): - """ - HarEntryCache - """ - - before_request: Optional[HarEntryCacheBeforeRequest] = Field( - None, alias="beforeRequest" - ) - after_request: Optional[HarEntryCacheBeforeRequest] = Field( - None, alias="afterRequest" - ) - comment: Optional[StrictStr] = None - __properties = ["beforeRequest", "afterRequest", "comment"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> HarEntryCache: - """Create an instance of HarEntryCache from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of before_request - if self.before_request: - _dict["beforeRequest"] = self.before_request.to_dict() - # override the default output from pydantic by calling `to_dict()` of after_request - if self.after_request: - _dict["afterRequest"] = self.after_request.to_dict() - # set to None if before_request (nullable) is None - # and __fields_set__ contains the field - if self.before_request is None and "before_request" in self.__fields_set__: - _dict["beforeRequest"] = None - - # set to None if after_request (nullable) is None - # and __fields_set__ contains the field - if self.after_request is None and "after_request" in self.__fields_set__: - _dict["afterRequest"] = None - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> HarEntryCache: - """Create an instance of HarEntryCache from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return HarEntryCache.parse_obj(obj) - - _obj = HarEntryCache.parse_obj( - { - "before_request": HarEntryCacheBeforeRequest.from_dict( - obj.get("beforeRequest") - ) - if obj.get("beforeRequest") is not None - else None, - "after_request": HarEntryCacheBeforeRequest.from_dict( - obj.get("afterRequest") - ) - if obj.get("afterRequest") is not None - else None, - "comment": obj.get("comment"), - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/har_entry_cache_before_request.py b/clients/python/BrowserUpMitmProxyClient/models/har_entry_cache_before_request.py deleted file mode 100644 index 5d8aadd739..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/har_entry_cache_before_request.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional - -from pydantic import BaseModel -from pydantic import Field -from pydantic import StrictInt -from pydantic import StrictStr - - -class HarEntryCacheBeforeRequest(BaseModel): - """ - HarEntryCacheBeforeRequest - """ - - expires: Optional[StrictStr] = None - last_access: StrictStr = Field(..., alias="lastAccess") - e_tag: StrictStr = Field(..., alias="eTag") - hit_count: StrictInt = Field(..., alias="hitCount") - comment: Optional[StrictStr] = None - __properties = ["expires", "lastAccess", "eTag", "hitCount", "comment"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> HarEntryCacheBeforeRequest: - """Create an instance of HarEntryCacheBeforeRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> HarEntryCacheBeforeRequest: - """Create an instance of HarEntryCacheBeforeRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return HarEntryCacheBeforeRequest.parse_obj(obj) - - _obj = HarEntryCacheBeforeRequest.parse_obj( - { - "expires": obj.get("expires"), - "last_access": obj.get("lastAccess"), - "e_tag": obj.get("eTag"), - "hit_count": obj.get("hitCount"), - "comment": obj.get("comment"), - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/har_entry_request.py b/clients/python/BrowserUpMitmProxyClient/models/har_entry_request.py deleted file mode 100644 index de5a90d93b..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/har_entry_request.py +++ /dev/null @@ -1,169 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Any -from typing import Optional - -from pydantic import BaseModel -from pydantic import conlist -from pydantic import Field -from pydantic import StrictInt -from pydantic import StrictStr - -from BrowserUpMitmProxyClient.models.har_entry_request_cookies_inner import ( - HarEntryRequestCookiesInner, -) -from BrowserUpMitmProxyClient.models.har_entry_request_post_data import ( - HarEntryRequestPostData, -) -from BrowserUpMitmProxyClient.models.har_entry_request_query_string_inner import ( - HarEntryRequestQueryStringInner, -) -from BrowserUpMitmProxyClient.models.header import Header - - -class HarEntryRequest(BaseModel): - """ - HarEntryRequest - """ - - method: StrictStr = Field(...) - url: StrictStr = Field(...) - http_version: StrictStr = Field(..., alias="httpVersion") - cookies: conlist(HarEntryRequestCookiesInner) = Field(...) - headers: conlist(Header) = Field(...) - query_string: conlist(HarEntryRequestQueryStringInner) = Field( - ..., alias="queryString" - ) - post_data: Optional[HarEntryRequestPostData] = Field(None, alias="postData") - headers_size: StrictInt = Field(..., alias="headersSize") - body_size: StrictInt = Field(..., alias="bodySize") - comment: Optional[StrictStr] = None - additional_properties: dict[str, Any] = {} - __properties = [ - "method", - "url", - "httpVersion", - "cookies", - "headers", - "queryString", - "postData", - "headersSize", - "bodySize", - "comment", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> HarEntryRequest: - """Create an instance of HarEntryRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict( - by_alias=True, exclude={"additional_properties"}, exclude_none=True - ) - # override the default output from pydantic by calling `to_dict()` of each item in cookies (list) - _items = [] - if self.cookies: - for _item in self.cookies: - if _item: - _items.append(_item.to_dict()) - _dict["cookies"] = _items - # override the default output from pydantic by calling `to_dict()` of each item in headers (list) - _items = [] - if self.headers: - for _item in self.headers: - if _item: - _items.append(_item.to_dict()) - _dict["headers"] = _items - # override the default output from pydantic by calling `to_dict()` of each item in query_string (list) - _items = [] - if self.query_string: - for _item in self.query_string: - if _item: - _items.append(_item.to_dict()) - _dict["queryString"] = _items - # override the default output from pydantic by calling `to_dict()` of post_data - if self.post_data: - _dict["postData"] = self.post_data.to_dict() - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> HarEntryRequest: - """Create an instance of HarEntryRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return HarEntryRequest.parse_obj(obj) - - _obj = HarEntryRequest.parse_obj( - { - "method": obj.get("method"), - "url": obj.get("url"), - "http_version": obj.get("httpVersion"), - "cookies": [ - HarEntryRequestCookiesInner.from_dict(_item) - for _item in obj.get("cookies") - ] - if obj.get("cookies") is not None - else None, - "headers": [Header.from_dict(_item) for _item in obj.get("headers")] - if obj.get("headers") is not None - else None, - "query_string": [ - HarEntryRequestQueryStringInner.from_dict(_item) - for _item in obj.get("queryString") - ] - if obj.get("queryString") is not None - else None, - "post_data": HarEntryRequestPostData.from_dict(obj.get("postData")) - if obj.get("postData") is not None - else None, - "headers_size": obj.get("headersSize"), - "body_size": obj.get("bodySize"), - "comment": obj.get("comment"), - } - ) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/har_entry_request_cookies_inner.py b/clients/python/BrowserUpMitmProxyClient/models/har_entry_request_cookies_inner.py deleted file mode 100644 index fcb92f79f6..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/har_entry_request_cookies_inner.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional - -from pydantic import BaseModel -from pydantic import Field -from pydantic import StrictBool -from pydantic import StrictStr - - -class HarEntryRequestCookiesInner(BaseModel): - """ - HarEntryRequestCookiesInner - """ - - name: StrictStr = Field(...) - value: StrictStr = Field(...) - path: Optional[StrictStr] = None - domain: Optional[StrictStr] = None - expires: Optional[StrictStr] = None - http_only: Optional[StrictBool] = Field(None, alias="httpOnly") - secure: Optional[StrictBool] = None - comment: Optional[StrictStr] = None - __properties = [ - "name", - "value", - "path", - "domain", - "expires", - "httpOnly", - "secure", - "comment", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> HarEntryRequestCookiesInner: - """Create an instance of HarEntryRequestCookiesInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> HarEntryRequestCookiesInner: - """Create an instance of HarEntryRequestCookiesInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return HarEntryRequestCookiesInner.parse_obj(obj) - - _obj = HarEntryRequestCookiesInner.parse_obj( - { - "name": obj.get("name"), - "value": obj.get("value"), - "path": obj.get("path"), - "domain": obj.get("domain"), - "expires": obj.get("expires"), - "http_only": obj.get("httpOnly"), - "secure": obj.get("secure"), - "comment": obj.get("comment"), - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/har_entry_request_post_data.py b/clients/python/BrowserUpMitmProxyClient/models/har_entry_request_post_data.py deleted file mode 100644 index 88a115d8db..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/har_entry_request_post_data.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional - -from pydantic import BaseModel -from pydantic import conlist -from pydantic import Field -from pydantic import StrictStr - -from BrowserUpMitmProxyClient.models.har_entry_request_post_data_params_inner import ( - HarEntryRequestPostDataParamsInner, -) - - -class HarEntryRequestPostData(BaseModel): - """ - Posted data info. - """ - - mime_type: StrictStr = Field(..., alias="mimeType") - text: Optional[StrictStr] = None - params: Optional[conlist(HarEntryRequestPostDataParamsInner)] = None - __properties = ["mimeType", "text", "params"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> HarEntryRequestPostData: - """Create an instance of HarEntryRequestPostData from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in params (list) - _items = [] - if self.params: - for _item in self.params: - if _item: - _items.append(_item.to_dict()) - _dict["params"] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> HarEntryRequestPostData: - """Create an instance of HarEntryRequestPostData from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return HarEntryRequestPostData.parse_obj(obj) - - _obj = HarEntryRequestPostData.parse_obj( - { - "mime_type": obj.get("mimeType"), - "text": obj.get("text"), - "params": [ - HarEntryRequestPostDataParamsInner.from_dict(_item) - for _item in obj.get("params") - ] - if obj.get("params") is not None - else None, - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/har_entry_request_post_data_params_inner.py b/clients/python/BrowserUpMitmProxyClient/models/har_entry_request_post_data_params_inner.py deleted file mode 100644 index 1725cb7274..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/har_entry_request_post_data_params_inner.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional - -from pydantic import BaseModel -from pydantic import Field -from pydantic import StrictStr - - -class HarEntryRequestPostDataParamsInner(BaseModel): - """ - HarEntryRequestPostDataParamsInner - """ - - name: Optional[StrictStr] = None - value: Optional[StrictStr] = None - file_name: Optional[StrictStr] = Field(None, alias="fileName") - content_type: Optional[StrictStr] = Field(None, alias="contentType") - comment: Optional[StrictStr] = None - __properties = ["name", "value", "fileName", "contentType", "comment"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> HarEntryRequestPostDataParamsInner: - """Create an instance of HarEntryRequestPostDataParamsInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> HarEntryRequestPostDataParamsInner: - """Create an instance of HarEntryRequestPostDataParamsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return HarEntryRequestPostDataParamsInner.parse_obj(obj) - - _obj = HarEntryRequestPostDataParamsInner.parse_obj( - { - "name": obj.get("name"), - "value": obj.get("value"), - "file_name": obj.get("fileName"), - "content_type": obj.get("contentType"), - "comment": obj.get("comment"), - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/har_entry_request_query_string_inner.py b/clients/python/BrowserUpMitmProxyClient/models/har_entry_request_query_string_inner.py deleted file mode 100644 index 3378c1d299..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/har_entry_request_query_string_inner.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional - -from pydantic import BaseModel -from pydantic import Field -from pydantic import StrictStr - - -class HarEntryRequestQueryStringInner(BaseModel): - """ - HarEntryRequestQueryStringInner - """ - - name: StrictStr = Field(...) - value: StrictStr = Field(...) - comment: Optional[StrictStr] = None - __properties = ["name", "value", "comment"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> HarEntryRequestQueryStringInner: - """Create an instance of HarEntryRequestQueryStringInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> HarEntryRequestQueryStringInner: - """Create an instance of HarEntryRequestQueryStringInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return HarEntryRequestQueryStringInner.parse_obj(obj) - - _obj = HarEntryRequestQueryStringInner.parse_obj( - { - "name": obj.get("name"), - "value": obj.get("value"), - "comment": obj.get("comment"), - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/har_entry_response.py b/clients/python/BrowserUpMitmProxyClient/models/har_entry_response.py deleted file mode 100644 index 7cdcd71774..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/har_entry_response.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Any -from typing import Optional - -from pydantic import BaseModel -from pydantic import conlist -from pydantic import Field -from pydantic import StrictInt -from pydantic import StrictStr - -from BrowserUpMitmProxyClient.models.har_entry_request_cookies_inner import ( - HarEntryRequestCookiesInner, -) -from BrowserUpMitmProxyClient.models.har_entry_response_content import ( - HarEntryResponseContent, -) -from BrowserUpMitmProxyClient.models.header import Header - - -class HarEntryResponse(BaseModel): - """ - HarEntryResponse - """ - - status: StrictInt = Field(...) - status_text: StrictStr = Field(..., alias="statusText") - http_version: StrictStr = Field(..., alias="httpVersion") - cookies: conlist(HarEntryRequestCookiesInner) = Field(...) - headers: conlist(Header) = Field(...) - content: HarEntryResponseContent = Field(...) - redirect_url: StrictStr = Field(..., alias="redirectURL") - headers_size: StrictInt = Field(..., alias="headersSize") - body_size: StrictInt = Field(..., alias="bodySize") - comment: Optional[StrictStr] = None - additional_properties: dict[str, Any] = {} - __properties = [ - "status", - "statusText", - "httpVersion", - "cookies", - "headers", - "content", - "redirectURL", - "headersSize", - "bodySize", - "comment", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> HarEntryResponse: - """Create an instance of HarEntryResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict( - by_alias=True, exclude={"additional_properties"}, exclude_none=True - ) - # override the default output from pydantic by calling `to_dict()` of each item in cookies (list) - _items = [] - if self.cookies: - for _item in self.cookies: - if _item: - _items.append(_item.to_dict()) - _dict["cookies"] = _items - # override the default output from pydantic by calling `to_dict()` of each item in headers (list) - _items = [] - if self.headers: - for _item in self.headers: - if _item: - _items.append(_item.to_dict()) - _dict["headers"] = _items - # override the default output from pydantic by calling `to_dict()` of content - if self.content: - _dict["content"] = self.content.to_dict() - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> HarEntryResponse: - """Create an instance of HarEntryResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return HarEntryResponse.parse_obj(obj) - - _obj = HarEntryResponse.parse_obj( - { - "status": obj.get("status"), - "status_text": obj.get("statusText"), - "http_version": obj.get("httpVersion"), - "cookies": [ - HarEntryRequestCookiesInner.from_dict(_item) - for _item in obj.get("cookies") - ] - if obj.get("cookies") is not None - else None, - "headers": [Header.from_dict(_item) for _item in obj.get("headers")] - if obj.get("headers") is not None - else None, - "content": HarEntryResponseContent.from_dict(obj.get("content")) - if obj.get("content") is not None - else None, - "redirect_url": obj.get("redirectURL"), - "headers_size": obj.get("headersSize"), - "body_size": obj.get("bodySize"), - "comment": obj.get("comment"), - } - ) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/har_entry_response_content.py b/clients/python/BrowserUpMitmProxyClient/models/har_entry_response_content.py deleted file mode 100644 index fb40a85cfa..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/har_entry_response_content.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional - -from pydantic import BaseModel -from pydantic import conint -from pydantic import Field -from pydantic import StrictInt -from pydantic import StrictStr - - -class HarEntryResponseContent(BaseModel): - """ - HarEntryResponseContent - """ - - size: StrictInt = Field(...) - compression: Optional[StrictInt] = None - mime_type: StrictStr = Field(..., alias="mimeType") - text: Optional[StrictStr] = None - encoding: Optional[StrictStr] = None - video_buffered_percent: Optional[conint(strict=True, ge=-1)] = Field( - -1, alias="_videoBufferedPercent" - ) - video_stall_count: Optional[conint(strict=True, ge=-1)] = Field( - -1, alias="_videoStallCount" - ) - video_decoded_byte_count: Optional[conint(strict=True, ge=-1)] = Field( - -1, alias="_videoDecodedByteCount" - ) - video_waiting_count: Optional[conint(strict=True, ge=-1)] = Field( - -1, alias="_videoWaitingCount" - ) - video_error_count: Optional[conint(strict=True, ge=-1)] = Field( - -1, alias="_videoErrorCount" - ) - video_dropped_frames: Optional[conint(strict=True, ge=-1)] = Field( - -1, alias="_videoDroppedFrames" - ) - video_total_frames: Optional[conint(strict=True, ge=-1)] = Field( - -1, alias="_videoTotalFrames" - ) - video_audio_bytes_decoded: Optional[conint(strict=True, ge=-1)] = Field( - -1, alias="_videoAudioBytesDecoded" - ) - comment: Optional[StrictStr] = None - __properties = [ - "size", - "compression", - "mimeType", - "text", - "encoding", - "_videoBufferedPercent", - "_videoStallCount", - "_videoDecodedByteCount", - "_videoWaitingCount", - "_videoErrorCount", - "_videoDroppedFrames", - "_videoTotalFrames", - "_videoAudioBytesDecoded", - "comment", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> HarEntryResponseContent: - """Create an instance of HarEntryResponseContent from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> HarEntryResponseContent: - """Create an instance of HarEntryResponseContent from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return HarEntryResponseContent.parse_obj(obj) - - _obj = HarEntryResponseContent.parse_obj( - { - "size": obj.get("size"), - "compression": obj.get("compression"), - "mime_type": obj.get("mimeType"), - "text": obj.get("text"), - "encoding": obj.get("encoding"), - "video_buffered_percent": obj.get("_videoBufferedPercent") - if obj.get("_videoBufferedPercent") is not None - else -1, - "video_stall_count": obj.get("_videoStallCount") - if obj.get("_videoStallCount") is not None - else -1, - "video_decoded_byte_count": obj.get("_videoDecodedByteCount") - if obj.get("_videoDecodedByteCount") is not None - else -1, - "video_waiting_count": obj.get("_videoWaitingCount") - if obj.get("_videoWaitingCount") is not None - else -1, - "video_error_count": obj.get("_videoErrorCount") - if obj.get("_videoErrorCount") is not None - else -1, - "video_dropped_frames": obj.get("_videoDroppedFrames") - if obj.get("_videoDroppedFrames") is not None - else -1, - "video_total_frames": obj.get("_videoTotalFrames") - if obj.get("_videoTotalFrames") is not None - else -1, - "video_audio_bytes_decoded": obj.get("_videoAudioBytesDecoded") - if obj.get("_videoAudioBytesDecoded") is not None - else -1, - "comment": obj.get("comment"), - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/har_entry_timings.py b/clients/python/BrowserUpMitmProxyClient/models/har_entry_timings.py deleted file mode 100644 index 5c75c52ef4..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/har_entry_timings.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional - -from pydantic import BaseModel -from pydantic import conint -from pydantic import Field -from pydantic import StrictStr - - -class HarEntryTimings(BaseModel): - """ - HarEntryTimings - """ - - dns: conint(strict=True, ge=-1) = Field(...) - connect: conint(strict=True, ge=-1) = Field(...) - blocked: conint(strict=True, ge=-1) = Field(...) - send: conint(strict=True, ge=-1) = Field(...) - wait: conint(strict=True, ge=-1) = Field(...) - receive: conint(strict=True, ge=-1) = Field(...) - ssl: conint(strict=True, ge=-1) = Field(...) - comment: Optional[StrictStr] = None - __properties = [ - "dns", - "connect", - "blocked", - "send", - "wait", - "receive", - "ssl", - "comment", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> HarEntryTimings: - """Create an instance of HarEntryTimings from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> HarEntryTimings: - """Create an instance of HarEntryTimings from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return HarEntryTimings.parse_obj(obj) - - _obj = HarEntryTimings.parse_obj( - { - "dns": obj.get("dns") if obj.get("dns") is not None else -1, - "connect": obj.get("connect") if obj.get("connect") is not None else -1, - "blocked": obj.get("blocked") if obj.get("blocked") is not None else -1, - "send": obj.get("send") if obj.get("send") is not None else -1, - "wait": obj.get("wait") if obj.get("wait") is not None else -1, - "receive": obj.get("receive") if obj.get("receive") is not None else -1, - "ssl": obj.get("ssl") if obj.get("ssl") is not None else -1, - "comment": obj.get("comment"), - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/har_log.py b/clients/python/BrowserUpMitmProxyClient/models/har_log.py deleted file mode 100644 index 8cbd2d4205..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/har_log.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional - -from pydantic import BaseModel -from pydantic import conlist -from pydantic import Field -from pydantic import StrictStr - -from BrowserUpMitmProxyClient.models.har_entry import HarEntry -from BrowserUpMitmProxyClient.models.har_log_creator import HarLogCreator -from BrowserUpMitmProxyClient.models.page import Page - - -class HarLog(BaseModel): - """ - HarLog - """ - - version: StrictStr = Field(...) - creator: HarLogCreator = Field(...) - browser: Optional[HarLogCreator] = None - pages: conlist(Page) = Field(...) - entries: conlist(HarEntry) = Field(...) - comment: Optional[StrictStr] = None - __properties = ["version", "creator", "browser", "pages", "entries", "comment"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> HarLog: - """Create an instance of HarLog from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of creator - if self.creator: - _dict["creator"] = self.creator.to_dict() - # override the default output from pydantic by calling `to_dict()` of browser - if self.browser: - _dict["browser"] = self.browser.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in pages (list) - _items = [] - if self.pages: - for _item in self.pages: - if _item: - _items.append(_item.to_dict()) - _dict["pages"] = _items - # override the default output from pydantic by calling `to_dict()` of each item in entries (list) - _items = [] - if self.entries: - for _item in self.entries: - if _item: - _items.append(_item.to_dict()) - _dict["entries"] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> HarLog: - """Create an instance of HarLog from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return HarLog.parse_obj(obj) - - _obj = HarLog.parse_obj( - { - "version": obj.get("version"), - "creator": HarLogCreator.from_dict(obj.get("creator")) - if obj.get("creator") is not None - else None, - "browser": HarLogCreator.from_dict(obj.get("browser")) - if obj.get("browser") is not None - else None, - "pages": [Page.from_dict(_item) for _item in obj.get("pages")] - if obj.get("pages") is not None - else None, - "entries": [HarEntry.from_dict(_item) for _item in obj.get("entries")] - if obj.get("entries") is not None - else None, - "comment": obj.get("comment"), - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/har_log_creator.py b/clients/python/BrowserUpMitmProxyClient/models/har_log_creator.py deleted file mode 100644 index e38cf0226b..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/har_log_creator.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional - -from pydantic import BaseModel -from pydantic import Field -from pydantic import StrictStr - - -class HarLogCreator(BaseModel): - """ - HarLogCreator - """ - - name: StrictStr = Field(...) - version: StrictStr = Field(...) - comment: Optional[StrictStr] = None - __properties = ["name", "version", "comment"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> HarLogCreator: - """Create an instance of HarLogCreator from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> HarLogCreator: - """Create an instance of HarLogCreator from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return HarLogCreator.parse_obj(obj) - - _obj = HarLogCreator.parse_obj( - { - "name": obj.get("name"), - "version": obj.get("version"), - "comment": obj.get("comment"), - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/header.py b/clients/python/BrowserUpMitmProxyClient/models/header.py deleted file mode 100644 index 724d8cf327..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/header.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional - -from pydantic import BaseModel -from pydantic import Field -from pydantic import StrictStr - - -class Header(BaseModel): - """ - Header - """ - - name: StrictStr = Field(...) - value: StrictStr = Field(...) - comment: Optional[StrictStr] = None - __properties = ["name", "value", "comment"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Header: - """Create an instance of Header from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Header: - """Create an instance of Header from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Header.parse_obj(obj) - - _obj = Header.parse_obj( - { - "name": obj.get("name"), - "value": obj.get("value"), - "comment": obj.get("comment"), - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/largest_contentful_paint.py b/clients/python/BrowserUpMitmProxyClient/models/largest_contentful_paint.py deleted file mode 100644 index 71f3f0d52e..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/largest_contentful_paint.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Any -from typing import Optional - -from pydantic import BaseModel -from pydantic import conint -from pydantic import Field -from pydantic import StrictStr - - -class LargestContentfulPaint(BaseModel): - """ - LargestContentfulPaint - """ - - start_time: Optional[conint(strict=True, ge=-1)] = Field(-1, alias="startTime") - size: Optional[conint(strict=True, ge=-1)] = -1 - dom_path: Optional[StrictStr] = Field("", alias="domPath") - tag: Optional[StrictStr] = "" - additional_properties: dict[str, Any] = {} - __properties = ["startTime", "size", "domPath", "tag"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> LargestContentfulPaint: - """Create an instance of LargestContentfulPaint from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict( - by_alias=True, exclude={"additional_properties"}, exclude_none=True - ) - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> LargestContentfulPaint: - """Create an instance of LargestContentfulPaint from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return LargestContentfulPaint.parse_obj(obj) - - _obj = LargestContentfulPaint.parse_obj( - { - "start_time": obj.get("startTime") - if obj.get("startTime") is not None - else -1, - "size": obj.get("size") if obj.get("size") is not None else -1, - "dom_path": obj.get("domPath") - if obj.get("domPath") is not None - else "", - "tag": obj.get("tag") if obj.get("tag") is not None else "", - } - ) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/match_criteria.py b/clients/python/BrowserUpMitmProxyClient/models/match_criteria.py deleted file mode 100644 index 1c2b432450..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/match_criteria.py +++ /dev/null @@ -1,147 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional - -from pydantic import BaseModel -from pydantic import Field -from pydantic import StrictBool -from pydantic import StrictStr - -from BrowserUpMitmProxyClient.models.name_value_pair import NameValuePair - - -class MatchCriteria(BaseModel): - """ - A set of criteria for filtering HTTP Requests and Responses. Criteria are AND based, and use python regular expressions for string comparison - """ - - url: Optional[StrictStr] = Field(None, description="Request URL regexp to match") - page: Optional[StrictStr] = Field(None, description="current|all") - status: Optional[StrictStr] = Field(None, description="HTTP Status code to match.") - content: Optional[StrictStr] = Field( - None, description="Body content regexp content to match" - ) - content_type: Optional[StrictStr] = Field(None, description="Content type") - websocket_message: Optional[StrictStr] = Field( - None, description="Websocket message text to match" - ) - request_header: Optional[NameValuePair] = None - request_cookie: Optional[NameValuePair] = None - response_header: Optional[NameValuePair] = None - response_cookie: Optional[NameValuePair] = None - json_valid: Optional[StrictBool] = Field(None, description="Is valid JSON") - json_path: Optional[StrictStr] = Field(None, description="Has JSON path") - json_schema: Optional[StrictStr] = Field( - None, description="Validates against passed JSON schema" - ) - error_if_no_traffic: Optional[StrictBool] = Field( - True, description="If the proxy has NO traffic at all, return error" - ) - __properties = [ - "url", - "page", - "status", - "content", - "content_type", - "websocket_message", - "request_header", - "request_cookie", - "response_header", - "response_cookie", - "json_valid", - "json_path", - "json_schema", - "error_if_no_traffic", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> MatchCriteria: - """Create an instance of MatchCriteria from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of request_header - if self.request_header: - _dict["request_header"] = self.request_header.to_dict() - # override the default output from pydantic by calling `to_dict()` of request_cookie - if self.request_cookie: - _dict["request_cookie"] = self.request_cookie.to_dict() - # override the default output from pydantic by calling `to_dict()` of response_header - if self.response_header: - _dict["response_header"] = self.response_header.to_dict() - # override the default output from pydantic by calling `to_dict()` of response_cookie - if self.response_cookie: - _dict["response_cookie"] = self.response_cookie.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> MatchCriteria: - """Create an instance of MatchCriteria from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return MatchCriteria.parse_obj(obj) - - _obj = MatchCriteria.parse_obj( - { - "url": obj.get("url"), - "page": obj.get("page"), - "status": obj.get("status"), - "content": obj.get("content"), - "content_type": obj.get("content_type"), - "websocket_message": obj.get("websocket_message"), - "request_header": NameValuePair.from_dict(obj.get("request_header")) - if obj.get("request_header") is not None - else None, - "request_cookie": NameValuePair.from_dict(obj.get("request_cookie")) - if obj.get("request_cookie") is not None - else None, - "response_header": NameValuePair.from_dict(obj.get("response_header")) - if obj.get("response_header") is not None - else None, - "response_cookie": NameValuePair.from_dict(obj.get("response_cookie")) - if obj.get("response_cookie") is not None - else None, - "json_valid": obj.get("json_valid"), - "json_path": obj.get("json_path"), - "json_schema": obj.get("json_schema"), - "error_if_no_traffic": obj.get("error_if_no_traffic") - if obj.get("error_if_no_traffic") is not None - else True, - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/name_value_pair.py b/clients/python/BrowserUpMitmProxyClient/models/name_value_pair.py deleted file mode 100644 index 2511dd1503..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/name_value_pair.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional - -from pydantic import BaseModel -from pydantic import Field -from pydantic import StrictStr - - -class NameValuePair(BaseModel): - """ - NameValuePair - """ - - name: Optional[StrictStr] = Field(None, description="Name to match") - value: Optional[StrictStr] = Field(None, description="Value to match") - __properties = ["name", "value"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> NameValuePair: - """Create an instance of NameValuePair from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> NameValuePair: - """Create an instance of NameValuePair from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return NameValuePair.parse_obj(obj) - - _obj = NameValuePair.parse_obj( - {"name": obj.get("name"), "value": obj.get("value")} - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/page.py b/clients/python/BrowserUpMitmProxyClient/models/page.py deleted file mode 100644 index 8412cff2e5..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/page.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from datetime import datetime -from typing import Any -from typing import Optional - -from pydantic import BaseModel -from pydantic import conlist -from pydantic import Field -from pydantic import StrictStr - -from BrowserUpMitmProxyClient.models.counter import Counter -from BrowserUpMitmProxyClient.models.error import Error -from BrowserUpMitmProxyClient.models.page_timings import PageTimings -from BrowserUpMitmProxyClient.models.verify_result import VerifyResult - - -class Page(BaseModel): - """ - Page - """ - - started_date_time: datetime = Field(..., alias="startedDateTime") - id: StrictStr = Field(...) - title: StrictStr = Field(...) - verifications: Optional[conlist(VerifyResult)] = Field(None, alias="_verifications") - counters: Optional[conlist(Counter)] = Field(None, alias="_counters") - errors: Optional[conlist(Error)] = Field(None, alias="_errors") - page_timings: PageTimings = Field(..., alias="pageTimings") - comment: Optional[StrictStr] = None - additional_properties: dict[str, Any] = {} - __properties = [ - "startedDateTime", - "id", - "title", - "_verifications", - "_counters", - "_errors", - "pageTimings", - "comment", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Page: - """Create an instance of Page from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict( - by_alias=True, exclude={"additional_properties"}, exclude_none=True - ) - # override the default output from pydantic by calling `to_dict()` of each item in verifications (list) - _items = [] - if self.verifications: - for _item in self.verifications: - if _item: - _items.append(_item.to_dict()) - _dict["_verifications"] = _items - # override the default output from pydantic by calling `to_dict()` of each item in counters (list) - _items = [] - if self.counters: - for _item in self.counters: - if _item: - _items.append(_item.to_dict()) - _dict["_counters"] = _items - # override the default output from pydantic by calling `to_dict()` of each item in errors (list) - _items = [] - if self.errors: - for _item in self.errors: - if _item: - _items.append(_item.to_dict()) - _dict["_errors"] = _items - # override the default output from pydantic by calling `to_dict()` of page_timings - if self.page_timings: - _dict["pageTimings"] = self.page_timings.to_dict() - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Page: - """Create an instance of Page from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Page.parse_obj(obj) - - _obj = Page.parse_obj( - { - "started_date_time": obj.get("startedDateTime"), - "id": obj.get("id"), - "title": obj.get("title"), - "verifications": [ - VerifyResult.from_dict(_item) for _item in obj.get("_verifications") - ] - if obj.get("_verifications") is not None - else None, - "counters": [Counter.from_dict(_item) for _item in obj.get("_counters")] - if obj.get("_counters") is not None - else None, - "errors": [Error.from_dict(_item) for _item in obj.get("_errors")] - if obj.get("_errors") is not None - else None, - "page_timings": PageTimings.from_dict(obj.get("pageTimings")) - if obj.get("pageTimings") is not None - else None, - "comment": obj.get("comment"), - } - ) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/page_timing.py b/clients/python/BrowserUpMitmProxyClient/models/page_timing.py deleted file mode 100644 index 5ea99b2869..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/page_timing.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional -from typing import Union - -from pydantic import BaseModel -from pydantic import Field -from pydantic import StrictFloat -from pydantic import StrictInt -from pydantic import StrictStr - - -class PageTiming(BaseModel): - """ - PageTiming - """ - - on_content_load: Optional[Union[StrictFloat, StrictInt]] = Field( - None, alias="onContentLoad", description="onContentLoad per the browser" - ) - on_load: Optional[Union[StrictFloat, StrictInt]] = Field( - None, alias="onLoad", description="onLoad per the browser" - ) - first_input_delay: Optional[Union[StrictFloat, StrictInt]] = Field( - None, alias="_firstInputDelay", description="firstInputDelay from the browser" - ) - first_paint: Optional[Union[StrictFloat, StrictInt]] = Field( - None, alias="_firstPaint", description="firstPaint from the browser" - ) - cumulative_layout_shift: Optional[Union[StrictFloat, StrictInt]] = Field( - None, - alias="_cumulativeLayoutShift", - description="cumulativeLayoutShift metric from the browser", - ) - largest_contentful_paint: Optional[Union[StrictFloat, StrictInt]] = Field( - None, - alias="_largestContentfulPaint", - description="largestContentfulPaint from the browser", - ) - dom_interactive: Optional[Union[StrictFloat, StrictInt]] = Field( - None, alias="_domInteractive", description="domInteractive from the browser" - ) - first_contentful_paint: Optional[Union[StrictFloat, StrictInt]] = Field( - None, - alias="_firstContentfulPaint", - description="firstContentfulPaint from the browser", - ) - dns: Optional[Union[StrictFloat, StrictInt]] = Field( - None, alias="_dns", description="dns lookup time from the browser" - ) - ssl: Optional[Union[StrictFloat, StrictInt]] = Field( - None, alias="_ssl", description="Ssl connect time from the browser" - ) - time_to_first_byte: Optional[Union[StrictFloat, StrictInt]] = Field( - None, - alias="_timeToFirstByte", - description="Time to first byte of the page's first request per the browser", - ) - href: Optional[StrictStr] = Field( - None, - alias="_href", - description="Top level href, including hashtag, etc per the browser", - ) - __properties = [ - "onContentLoad", - "onLoad", - "_firstInputDelay", - "_firstPaint", - "_cumulativeLayoutShift", - "_largestContentfulPaint", - "_domInteractive", - "_firstContentfulPaint", - "_dns", - "_ssl", - "_timeToFirstByte", - "_href", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> PageTiming: - """Create an instance of PageTiming from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> PageTiming: - """Create an instance of PageTiming from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return PageTiming.parse_obj(obj) - - _obj = PageTiming.parse_obj( - { - "on_content_load": obj.get("onContentLoad"), - "on_load": obj.get("onLoad"), - "first_input_delay": obj.get("_firstInputDelay"), - "first_paint": obj.get("_firstPaint"), - "cumulative_layout_shift": obj.get("_cumulativeLayoutShift"), - "largest_contentful_paint": obj.get("_largestContentfulPaint"), - "dom_interactive": obj.get("_domInteractive"), - "first_contentful_paint": obj.get("_firstContentfulPaint"), - "dns": obj.get("_dns"), - "ssl": obj.get("_ssl"), - "time_to_first_byte": obj.get("_timeToFirstByte"), - "href": obj.get("_href"), - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/page_timings.py b/clients/python/BrowserUpMitmProxyClient/models/page_timings.py deleted file mode 100644 index ccd8fa1a92..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/page_timings.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Any -from typing import Optional -from typing import Union - -from pydantic import BaseModel -from pydantic import confloat -from pydantic import conint -from pydantic import Field -from pydantic import StrictStr - -from BrowserUpMitmProxyClient.models.largest_contentful_paint import ( - LargestContentfulPaint, -) - - -class PageTimings(BaseModel): - """ - PageTimings - """ - - on_content_load: conint(strict=True, ge=-1) = Field(..., alias="onContentLoad") - on_load: conint(strict=True, ge=-1) = Field(..., alias="onLoad") - href: Optional[StrictStr] = Field("", alias="_href") - dns: Optional[conint(strict=True, ge=-1)] = Field(-1, alias="_dns") - ssl: Optional[conint(strict=True, ge=-1)] = Field(-1, alias="_ssl") - time_to_first_byte: Optional[conint(strict=True, ge=-1)] = Field( - -1, alias="_timeToFirstByte" - ) - cumulative_layout_shift: Optional[ - Union[confloat(ge=-1, strict=True), conint(ge=-1, strict=True)] - ] = Field(-1, alias="_cumulativeLayoutShift") - largest_contentful_paint: Optional[LargestContentfulPaint] = Field( - None, alias="_largestContentfulPaint" - ) - first_paint: Optional[conint(strict=True, ge=-1)] = Field(-1, alias="_firstPaint") - first_input_delay: Optional[ - Union[confloat(ge=-1, strict=True), conint(ge=-1, strict=True)] - ] = Field(-1, alias="_firstInputDelay") - dom_interactive: Optional[conint(strict=True, ge=-1)] = Field( - -1, alias="_domInteractive" - ) - first_contentful_paint: Optional[conint(strict=True, ge=-1)] = Field( - -1, alias="_firstContentfulPaint" - ) - comment: Optional[StrictStr] = None - additional_properties: dict[str, Any] = {} - __properties = [ - "onContentLoad", - "onLoad", - "_href", - "_dns", - "_ssl", - "_timeToFirstByte", - "_cumulativeLayoutShift", - "_largestContentfulPaint", - "_firstPaint", - "_firstInputDelay", - "_domInteractive", - "_firstContentfulPaint", - "comment", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> PageTimings: - """Create an instance of PageTimings from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict( - by_alias=True, exclude={"additional_properties"}, exclude_none=True - ) - # override the default output from pydantic by calling `to_dict()` of largest_contentful_paint - if self.largest_contentful_paint: - _dict["_largestContentfulPaint"] = self.largest_contentful_paint.to_dict() - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> PageTimings: - """Create an instance of PageTimings from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return PageTimings.parse_obj(obj) - - _obj = PageTimings.parse_obj( - { - "on_content_load": obj.get("onContentLoad") - if obj.get("onContentLoad") is not None - else -1, - "on_load": obj.get("onLoad") if obj.get("onLoad") is not None else -1, - "href": obj.get("_href") if obj.get("_href") is not None else "", - "dns": obj.get("_dns") if obj.get("_dns") is not None else -1, - "ssl": obj.get("_ssl") if obj.get("_ssl") is not None else -1, - "time_to_first_byte": obj.get("_timeToFirstByte") - if obj.get("_timeToFirstByte") is not None - else -1, - "cumulative_layout_shift": obj.get("_cumulativeLayoutShift") - if obj.get("_cumulativeLayoutShift") is not None - else -1, - "largest_contentful_paint": LargestContentfulPaint.from_dict( - obj.get("_largestContentfulPaint") - ) - if obj.get("_largestContentfulPaint") is not None - else None, - "first_paint": obj.get("_firstPaint") - if obj.get("_firstPaint") is not None - else -1, - "first_input_delay": obj.get("_firstInputDelay") - if obj.get("_firstInputDelay") is not None - else -1, - "dom_interactive": obj.get("_domInteractive") - if obj.get("_domInteractive") is not None - else -1, - "first_contentful_paint": obj.get("_firstContentfulPaint") - if obj.get("_firstContentfulPaint") is not None - else -1, - "comment": obj.get("comment"), - } - ) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/verify_result.py b/clients/python/BrowserUpMitmProxyClient/models/verify_result.py deleted file mode 100644 index e41a2b4115..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/verify_result.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Optional - -from pydantic import BaseModel -from pydantic import Field -from pydantic import StrictBool -from pydantic import StrictStr - - -class VerifyResult(BaseModel): - """ - VerifyResult - """ - - result: Optional[StrictBool] = Field(None, description="Result True / False") - name: Optional[StrictStr] = Field(None, description="Name") - type: Optional[StrictStr] = Field(None, description="Type") - __properties = ["result", "name", "type"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> VerifyResult: - """Create an instance of VerifyResult from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> VerifyResult: - """Create an instance of VerifyResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return VerifyResult.parse_obj(obj) - - _obj = VerifyResult.parse_obj( - { - "result": obj.get("result"), - "name": obj.get("name"), - "type": obj.get("type"), - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/models/web_socket_message.py b/clients/python/BrowserUpMitmProxyClient/models/web_socket_message.py deleted file mode 100644 index 536410c14e..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/models/web_socket_message.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from __future__ import annotations - -import json -import pprint -import re # noqa: F401 -from typing import Union - -from pydantic import BaseModel -from pydantic import Field -from pydantic import StrictFloat -from pydantic import StrictInt -from pydantic import StrictStr - - -class WebSocketMessage(BaseModel): - """ - WebSocketMessage - """ - - type: StrictStr = Field(...) - opcode: Union[StrictFloat, StrictInt] = Field(...) - data: StrictStr = Field(...) - time: Union[StrictFloat, StrictInt] = Field(...) - __properties = ["type", "opcode", "data", "time"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> WebSocketMessage: - """Create an instance of WebSocketMessage from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> WebSocketMessage: - """Create an instance of WebSocketMessage from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return WebSocketMessage.parse_obj(obj) - - _obj = WebSocketMessage.parse_obj( - { - "type": obj.get("type"), - "opcode": obj.get("opcode"), - "data": obj.get("data"), - "time": obj.get("time"), - } - ) - return _obj diff --git a/clients/python/BrowserUpMitmProxyClient/py.typed b/clients/python/BrowserUpMitmProxyClient/py.typed deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/clients/python/BrowserUpMitmProxyClient/rest.py b/clients/python/BrowserUpMitmProxyClient/rest.py deleted file mode 100644 index a59bd9c646..0000000000 --- a/clients/python/BrowserUpMitmProxyClient/rest.py +++ /dev/null @@ -1,394 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import io -import json -import logging -import re -import ssl - -import urllib3 - -from BrowserUpMitmProxyClient.exceptions import ApiException -from BrowserUpMitmProxyClient.exceptions import ApiValueError -from BrowserUpMitmProxyClient.exceptions import BadRequestException -from BrowserUpMitmProxyClient.exceptions import ForbiddenException -from BrowserUpMitmProxyClient.exceptions import NotFoundException -from BrowserUpMitmProxyClient.exceptions import ServiceException -from BrowserUpMitmProxyClient.exceptions import UnauthorizedException - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.headers.get(name, default) - - -class RESTClientObject(object): - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args["assert_hostname"] = configuration.assert_hostname # noqa: E501 - - if configuration.retries is not None: - addition_pool_args["retries"] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args["server_hostname"] = configuration.tls_server_name - - if configuration.socket_options is not None: - addition_pool_args["socket_options"] = configuration.socket_options - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args, - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args, - ) - - def request( - self, - method, - url, - query_params=None, - headers=None, - body=None, - post_params=None, - _preload_content=True, - _request_timeout=None, - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - # url already contains the URL query string - # so reset query_params to empty dict - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2: - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]: - # no content type provided or payload is json - if not headers.get("Content-Type") or re.search( - "json", headers["Content-Type"], re.IGNORECASE - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers, - ) - elif headers["Content-Type"] == "application/x-www-form-urlencoded": # noqa: E501 - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers, - ) - elif headers["Content-Type"] == "multipart/form-data": - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers["Content-Type"] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers, - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers, - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - preload_content=_preload_content, - timeout=timeout, - headers=headers, - ) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - if r.status == 400: - raise BadRequestException(http_resp=r) - - if r.status == 401: - raise UnauthorizedException(http_resp=r) - - if r.status == 403: - raise ForbiddenException(http_resp=r) - - if r.status == 404: - raise NotFoundException(http_resp=r) - - if 500 <= r.status <= 599: - raise ServiceException(http_resp=r) - - raise ApiException(http_resp=r) - - return r - - def get_request( - self, - url, - headers=None, - query_params=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "GET", - url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params, - ) - - def head_request( - self, - url, - headers=None, - query_params=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "HEAD", - url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params, - ) - - def options_request( - self, - url, - headers=None, - query_params=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "OPTIONS", - url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - def delete_request( - self, - url, - headers=None, - query_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "DELETE", - url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - def post_request( - self, - url, - headers=None, - query_params=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "POST", - url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - def put_request( - self, - url, - headers=None, - query_params=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "PUT", - url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - def patch_request( - self, - url, - headers=None, - query_params=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "PATCH", - url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) diff --git a/clients/python/LICENSE b/clients/python/LICENSE deleted file mode 100644 index 00b2401109..0000000000 --- a/clients/python/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 The Kubernetes Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/clients/python/README.md b/clients/python/README.md deleted file mode 100644 index 754e1594f2..0000000000 --- a/clients/python/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# BrowserUpMitmProxyClient -___ -This is the REST API for controlling the BrowserUp MitmProxy. -The BrowserUp MitmProxy is a swiss army knife for automated testing that -captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. -___ - - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- Package version: 1.0.1 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## Requirements. - -Python 3.7+ - -## Installation & Usage -### pip install - -If the python package is hosted on a repository, you can install directly using: - -```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) - -Then import the package: -```python -import BrowserUpMitmProxyClient -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import BrowserUpMitmProxyClient -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import BrowserUpMitmProxyClient -from BrowserUpMitmProxyClient.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:48088 -# See configuration.py for a list of all supported configuration parameters. -configuration = BrowserUpMitmProxyClient.Configuration( - host = "http://localhost:48088" -) - - - -# Enter a context with an instance of the API client -with BrowserUpMitmProxyClient.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = BrowserUpMitmProxyClient.BrowserUpProxyApi(api_client) - counter = BrowserUpMitmProxyClient.Counter() # Counter | Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key - - try: - api_instance.add_counter(counter) - except ApiException as e: - print("Exception when calling BrowserUpProxyApi->add_counter: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost:48088* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*BrowserUpProxyApi* | [**add_counter**](docs/BrowserUpProxyApi.md#add_counter) | **POST** /har/counters | -*BrowserUpProxyApi* | [**add_error**](docs/BrowserUpProxyApi.md#add_error) | **POST** /har/errors | -*BrowserUpProxyApi* | [**get_har_log**](docs/BrowserUpProxyApi.md#get_har_log) | **GET** /har | -*BrowserUpProxyApi* | [**healthcheck**](docs/BrowserUpProxyApi.md#healthcheck) | **GET** /healthcheck | -*BrowserUpProxyApi* | [**new_page**](docs/BrowserUpProxyApi.md#new_page) | **POST** /har/page | -*BrowserUpProxyApi* | [**reset_har_log**](docs/BrowserUpProxyApi.md#reset_har_log) | **PUT** /har | -*BrowserUpProxyApi* | [**verify_not_present**](docs/BrowserUpProxyApi.md#verify_not_present) | **POST** /verify/not_present/{name} | -*BrowserUpProxyApi* | [**verify_present**](docs/BrowserUpProxyApi.md#verify_present) | **POST** /verify/present/{name} | -*BrowserUpProxyApi* | [**verify_size**](docs/BrowserUpProxyApi.md#verify_size) | **POST** /verify/size/{size}/{name} | -*BrowserUpProxyApi* | [**verify_sla**](docs/BrowserUpProxyApi.md#verify_sla) | **POST** /verify/sla/{time}/{name} | - - -## Documentation For Models - - - [Action](docs/Action.md) - - [Counter](docs/Counter.md) - - [Error](docs/Error.md) - - [Har](docs/Har.md) - - [HarEntry](docs/HarEntry.md) - - [HarEntryCache](docs/HarEntryCache.md) - - [HarEntryCacheBeforeRequest](docs/HarEntryCacheBeforeRequest.md) - - [HarEntryRequest](docs/HarEntryRequest.md) - - [HarEntryRequestCookiesInner](docs/HarEntryRequestCookiesInner.md) - - [HarEntryRequestPostData](docs/HarEntryRequestPostData.md) - - [HarEntryRequestPostDataParamsInner](docs/HarEntryRequestPostDataParamsInner.md) - - [HarEntryRequestQueryStringInner](docs/HarEntryRequestQueryStringInner.md) - - [HarEntryResponse](docs/HarEntryResponse.md) - - [HarEntryResponseContent](docs/HarEntryResponseContent.md) - - [HarEntryTimings](docs/HarEntryTimings.md) - - [HarLog](docs/HarLog.md) - - [HarLogCreator](docs/HarLogCreator.md) - - [Header](docs/Header.md) - - [LargestContentfulPaint](docs/LargestContentfulPaint.md) - - [MatchCriteria](docs/MatchCriteria.md) - - [NameValuePair](docs/NameValuePair.md) - - [Page](docs/Page.md) - - [PageTiming](docs/PageTiming.md) - - [PageTimings](docs/PageTimings.md) - - [VerifyResult](docs/VerifyResult.md) - - [WebSocketMessage](docs/WebSocketMessage.md) - - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Author - -developers@browserup.com - - diff --git a/clients/python/docs/Action.md b/clients/python/docs/Action.md deleted file mode 100644 index b58603032a..0000000000 --- a/clients/python/docs/Action.md +++ /dev/null @@ -1,35 +0,0 @@ -# Action - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] -**id** | **str** | | [optional] -**class_name** | **str** | | [optional] -**tag_name** | **str** | | [optional] -**xpath** | **str** | | [optional] -**data_attributes** | **str** | | [optional] -**form_name** | **str** | | [optional] -**content** | **str** | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.action import Action - -# TODO update the JSON string below -json = "{}" -# create an instance of Action from a JSON string -action_instance = Action.from_json(json) -# print the JSON string representation of the object -print Action.to_json() - -# convert the object into a dict -action_dict = action_instance.to_dict() -# create an instance of Action from a dict -action_form_dict = action.from_dict(action_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/BrowserUpProxyApi.md b/clients/python/docs/BrowserUpProxyApi.md deleted file mode 100644 index 0c241edf16..0000000000 --- a/clients/python/docs/BrowserUpProxyApi.md +++ /dev/null @@ -1,681 +0,0 @@ -# BrowserUpMitmProxyClient.BrowserUpProxyApi - -All URIs are relative to *http://localhost:48088* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_counter**](BrowserUpProxyApi.md#add_counter) | **POST** /har/counters | -[**add_error**](BrowserUpProxyApi.md#add_error) | **POST** /har/errors | -[**get_har_log**](BrowserUpProxyApi.md#get_har_log) | **GET** /har | -[**healthcheck**](BrowserUpProxyApi.md#healthcheck) | **GET** /healthcheck | -[**new_page**](BrowserUpProxyApi.md#new_page) | **POST** /har/page | -[**reset_har_log**](BrowserUpProxyApi.md#reset_har_log) | **PUT** /har | -[**verify_not_present**](BrowserUpProxyApi.md#verify_not_present) | **POST** /verify/not_present/{name} | -[**verify_present**](BrowserUpProxyApi.md#verify_present) | **POST** /verify/present/{name} | -[**verify_size**](BrowserUpProxyApi.md#verify_size) | **POST** /verify/size/{size}/{name} | -[**verify_sla**](BrowserUpProxyApi.md#verify_sla) | **POST** /verify/sla/{time}/{name} | - - -# **add_counter** -> add_counter(counter) - - - -Add Custom Counter to the captured traffic har - -### Example - -```python -import time -import os -import BrowserUpMitmProxyClient -from BrowserUpMitmProxyClient.models.counter import Counter -from BrowserUpMitmProxyClient.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:48088 -# See configuration.py for a list of all supported configuration parameters. -configuration = BrowserUpMitmProxyClient.Configuration( - host = "http://localhost:48088" -) - - -# Enter a context with an instance of the API client -with BrowserUpMitmProxyClient.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = BrowserUpMitmProxyClient.BrowserUpProxyApi(api_client) - counter = BrowserUpMitmProxyClient.Counter() # Counter | Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key - - try: - api_instance.add_counter(counter) - except Exception as e: - print("Exception when calling BrowserUpProxyApi->add_counter: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **counter** | [**Counter**](Counter.md)| Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | The counter was added. | - | -**422** | The counter was invalid. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **add_error** -> add_error(error) - - - -Add Custom Error to the captured traffic har - -### Example - -```python -import time -import os -import BrowserUpMitmProxyClient -from BrowserUpMitmProxyClient.models.error import Error -from BrowserUpMitmProxyClient.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:48088 -# See configuration.py for a list of all supported configuration parameters. -configuration = BrowserUpMitmProxyClient.Configuration( - host = "http://localhost:48088" -) - - -# Enter a context with an instance of the API client -with BrowserUpMitmProxyClient.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = BrowserUpMitmProxyClient.BrowserUpProxyApi(api_client) - error = BrowserUpMitmProxyClient.Error() # Error | Receives an error to track. Internally, the error is stored in an array in the har under the _errors key - - try: - api_instance.add_error(error) - except Exception as e: - print("Exception when calling BrowserUpProxyApi->add_error: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **error** | [**Error**](Error.md)| Receives an error to track. Internally, the error is stored in an array in the har under the _errors key | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | The Error was added. | - | -**422** | The Error was invalid. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_har_log** -> Har get_har_log() - - - -Get the current HAR. - -### Example - -```python -import time -import os -import BrowserUpMitmProxyClient -from BrowserUpMitmProxyClient.models.har import Har -from BrowserUpMitmProxyClient.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:48088 -# See configuration.py for a list of all supported configuration parameters. -configuration = BrowserUpMitmProxyClient.Configuration( - host = "http://localhost:48088" -) - - -# Enter a context with an instance of the API client -with BrowserUpMitmProxyClient.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = BrowserUpMitmProxyClient.BrowserUpProxyApi(api_client) - - try: - api_response = api_instance.get_har_log() - print("The response of BrowserUpProxyApi->get_har_log:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling BrowserUpProxyApi->get_har_log: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Har**](Har.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The current Har file. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **healthcheck** -> healthcheck() - - - -Get the healthcheck - -### Example - -```python -import time -import os -import BrowserUpMitmProxyClient -from BrowserUpMitmProxyClient.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:48088 -# See configuration.py for a list of all supported configuration parameters. -configuration = BrowserUpMitmProxyClient.Configuration( - host = "http://localhost:48088" -) - - -# Enter a context with an instance of the API client -with BrowserUpMitmProxyClient.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = BrowserUpMitmProxyClient.BrowserUpProxyApi(api_client) - - try: - api_instance.healthcheck() - except Exception as e: - print("Exception when calling BrowserUpProxyApi->healthcheck: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK means all is well. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **new_page** -> Har new_page(title) - - - -Starts a fresh HAR Page (Step) in the current active HAR to group requests. - -### Example - -```python -import time -import os -import BrowserUpMitmProxyClient -from BrowserUpMitmProxyClient.models.har import Har -from BrowserUpMitmProxyClient.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:48088 -# See configuration.py for a list of all supported configuration parameters. -configuration = BrowserUpMitmProxyClient.Configuration( - host = "http://localhost:48088" -) - - -# Enter a context with an instance of the API client -with BrowserUpMitmProxyClient.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = BrowserUpMitmProxyClient.BrowserUpProxyApi(api_client) - title = 'title_example' # str | The unique title for this har page/step. - - try: - api_response = api_instance.new_page(title) - print("The response of BrowserUpProxyApi->new_page:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling BrowserUpProxyApi->new_page: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **title** | **str**| The unique title for this har page/step. | - -### Return type - -[**Har**](Har.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The current Har file. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **reset_har_log** -> Har reset_har_log() - - - -Starts a fresh HAR capture session. - -### Example - -```python -import time -import os -import BrowserUpMitmProxyClient -from BrowserUpMitmProxyClient.models.har import Har -from BrowserUpMitmProxyClient.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:48088 -# See configuration.py for a list of all supported configuration parameters. -configuration = BrowserUpMitmProxyClient.Configuration( - host = "http://localhost:48088" -) - - -# Enter a context with an instance of the API client -with BrowserUpMitmProxyClient.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = BrowserUpMitmProxyClient.BrowserUpProxyApi(api_client) - - try: - api_response = api_instance.reset_har_log() - print("The response of BrowserUpProxyApi->reset_har_log:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling BrowserUpProxyApi->reset_har_log: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Har**](Har.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The current Har file. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **verify_not_present** -> VerifyResult verify_not_present(name, match_criteria) - - - -Verify no matching items are present in the captured traffic - -### Example - -```python -import time -import os -import BrowserUpMitmProxyClient -from BrowserUpMitmProxyClient.models.match_criteria import MatchCriteria -from BrowserUpMitmProxyClient.models.verify_result import VerifyResult -from BrowserUpMitmProxyClient.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:48088 -# See configuration.py for a list of all supported configuration parameters. -configuration = BrowserUpMitmProxyClient.Configuration( - host = "http://localhost:48088" -) - - -# Enter a context with an instance of the API client -with BrowserUpMitmProxyClient.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = BrowserUpMitmProxyClient.BrowserUpProxyApi(api_client) - name = 'name_example' # str | The unique name for this verification operation - match_criteria = BrowserUpMitmProxyClient.MatchCriteria() # MatchCriteria | Match criteria to select requests - response pairs for size tests - - try: - api_response = api_instance.verify_not_present(name, match_criteria) - print("The response of BrowserUpProxyApi->verify_not_present:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling BrowserUpProxyApi->verify_not_present: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **str**| The unique name for this verification operation | - **match_criteria** | [**MatchCriteria**](MatchCriteria.md)| Match criteria to select requests - response pairs for size tests | - -### Return type - -[**VerifyResult**](VerifyResult.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The traffic had no matching items | - | -**422** | The MatchCriteria are invalid. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **verify_present** -> VerifyResult verify_present(name, match_criteria) - - - -Verify at least one matching item is present in the captured traffic - -### Example - -```python -import time -import os -import BrowserUpMitmProxyClient -from BrowserUpMitmProxyClient.models.match_criteria import MatchCriteria -from BrowserUpMitmProxyClient.models.verify_result import VerifyResult -from BrowserUpMitmProxyClient.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:48088 -# See configuration.py for a list of all supported configuration parameters. -configuration = BrowserUpMitmProxyClient.Configuration( - host = "http://localhost:48088" -) - - -# Enter a context with an instance of the API client -with BrowserUpMitmProxyClient.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = BrowserUpMitmProxyClient.BrowserUpProxyApi(api_client) - name = 'name_example' # str | The unique name for this verification operation - match_criteria = BrowserUpMitmProxyClient.MatchCriteria() # MatchCriteria | Match criteria to select requests - response pairs for size tests - - try: - api_response = api_instance.verify_present(name, match_criteria) - print("The response of BrowserUpProxyApi->verify_present:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling BrowserUpProxyApi->verify_present: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **str**| The unique name for this verification operation | - **match_criteria** | [**MatchCriteria**](MatchCriteria.md)| Match criteria to select requests - response pairs for size tests | - -### Return type - -[**VerifyResult**](VerifyResult.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The traffic conformed to the time criteria. | - | -**422** | The MatchCriteria are invalid. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **verify_size** -> VerifyResult verify_size(size, name, match_criteria) - - - -Verify matching items in the captured traffic meet the size criteria - -### Example - -```python -import time -import os -import BrowserUpMitmProxyClient -from BrowserUpMitmProxyClient.models.match_criteria import MatchCriteria -from BrowserUpMitmProxyClient.models.verify_result import VerifyResult -from BrowserUpMitmProxyClient.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:48088 -# See configuration.py for a list of all supported configuration parameters. -configuration = BrowserUpMitmProxyClient.Configuration( - host = "http://localhost:48088" -) - - -# Enter a context with an instance of the API client -with BrowserUpMitmProxyClient.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = BrowserUpMitmProxyClient.BrowserUpProxyApi(api_client) - size = 56 # int | The size used for comparison, in kilobytes - name = 'name_example' # str | The unique name for this verification operation - match_criteria = BrowserUpMitmProxyClient.MatchCriteria() # MatchCriteria | Match criteria to select requests - response pairs for size tests - - try: - api_response = api_instance.verify_size(size, name, match_criteria) - print("The response of BrowserUpProxyApi->verify_size:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling BrowserUpProxyApi->verify_size: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **size** | **int**| The size used for comparison, in kilobytes | - **name** | **str**| The unique name for this verification operation | - **match_criteria** | [**MatchCriteria**](MatchCriteria.md)| Match criteria to select requests - response pairs for size tests | - -### Return type - -[**VerifyResult**](VerifyResult.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The traffic conformed to the size criteria. | - | -**422** | The MatchCriteria are invalid. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **verify_sla** -> VerifyResult verify_sla(time, name, match_criteria) - - - -Verify each traffic item matching the criteria meets is below SLA time - -### Example - -```python -import time -import os -import BrowserUpMitmProxyClient -from BrowserUpMitmProxyClient.models.match_criteria import MatchCriteria -from BrowserUpMitmProxyClient.models.verify_result import VerifyResult -from BrowserUpMitmProxyClient.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:48088 -# See configuration.py for a list of all supported configuration parameters. -configuration = BrowserUpMitmProxyClient.Configuration( - host = "http://localhost:48088" -) - - -# Enter a context with an instance of the API client -with BrowserUpMitmProxyClient.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = BrowserUpMitmProxyClient.BrowserUpProxyApi(api_client) - time = 56 # int | The time used for comparison - name = 'name_example' # str | The unique name for this verification operation - match_criteria = BrowserUpMitmProxyClient.MatchCriteria() # MatchCriteria | Match criteria to select requests - response pairs for size tests - - try: - api_response = api_instance.verify_sla(time, name, match_criteria) - print("The response of BrowserUpProxyApi->verify_sla:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling BrowserUpProxyApi->verify_sla: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **time** | **int**| The time used for comparison | - **name** | **str**| The unique name for this verification operation | - **match_criteria** | [**MatchCriteria**](MatchCriteria.md)| Match criteria to select requests - response pairs for size tests | - -### Return type - -[**VerifyResult**](VerifyResult.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The traffic conformed to the time criteria. | - | -**422** | The MatchCriteria are invalid. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/clients/python/docs/Counter.md b/clients/python/docs/Counter.md deleted file mode 100644 index dbafdda2ef..0000000000 --- a/clients/python/docs/Counter.md +++ /dev/null @@ -1,29 +0,0 @@ -# Counter - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Name of Custom Counter to add to the page under _counters | [optional] -**value** | **float** | Value for the counter | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.counter import Counter - -# TODO update the JSON string below -json = "{}" -# create an instance of Counter from a JSON string -counter_instance = Counter.from_json(json) -# print the JSON string representation of the object -print Counter.to_json() - -# convert the object into a dict -counter_dict = counter_instance.to_dict() -# create an instance of Counter from a dict -counter_form_dict = counter.from_dict(counter_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/Error.md b/clients/python/docs/Error.md deleted file mode 100644 index 0e08716798..0000000000 --- a/clients/python/docs/Error.md +++ /dev/null @@ -1,29 +0,0 @@ -# Error - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Name of the Error to add. Stored in har under _errors | [optional] -**details** | **str** | Short details of the error | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.error import Error - -# TODO update the JSON string below -json = "{}" -# create an instance of Error from a JSON string -error_instance = Error.from_json(json) -# print the JSON string representation of the object -print Error.to_json() - -# convert the object into a dict -error_dict = error_instance.to_dict() -# create an instance of Error from a dict -error_form_dict = error.from_dict(error_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/Har.md b/clients/python/docs/Har.md deleted file mode 100644 index 1fdaf32bf3..0000000000 --- a/clients/python/docs/Har.md +++ /dev/null @@ -1,28 +0,0 @@ -# Har - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**log** | [**HarLog**](HarLog.md) | | - -## Example - -```python -from BrowserUpMitmProxyClient.models.har import Har - -# TODO update the JSON string below -json = "{}" -# create an instance of Har from a JSON string -har_instance = Har.from_json(json) -# print the JSON string representation of the object -print Har.to_json() - -# convert the object into a dict -har_dict = har_instance.to_dict() -# create an instance of Har from a dict -har_form_dict = har.from_dict(har_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/HarEntry.md b/clients/python/docs/HarEntry.md deleted file mode 100644 index 71267c14ca..0000000000 --- a/clients/python/docs/HarEntry.md +++ /dev/null @@ -1,38 +0,0 @@ -# HarEntry - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pageref** | **str** | | [optional] -**started_date_time** | **datetime** | | -**time** | **int** | | -**request** | [**HarEntryRequest**](HarEntryRequest.md) | | -**response** | [**HarEntryResponse**](HarEntryResponse.md) | | -**cache** | [**HarEntryCache**](HarEntryCache.md) | | -**timings** | [**HarEntryTimings**](HarEntryTimings.md) | | -**server_ip_address** | **str** | | [optional] -**web_socket_messages** | [**List[WebSocketMessage]**](WebSocketMessage.md) | | [optional] -**connection** | **str** | | [optional] -**comment** | **str** | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.har_entry import HarEntry - -# TODO update the JSON string below -json = "{}" -# create an instance of HarEntry from a JSON string -har_entry_instance = HarEntry.from_json(json) -# print the JSON string representation of the object -print HarEntry.to_json() - -# convert the object into a dict -har_entry_dict = har_entry_instance.to_dict() -# create an instance of HarEntry from a dict -har_entry_form_dict = har_entry.from_dict(har_entry_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/HarEntryCache.md b/clients/python/docs/HarEntryCache.md deleted file mode 100644 index 63438d6405..0000000000 --- a/clients/python/docs/HarEntryCache.md +++ /dev/null @@ -1,30 +0,0 @@ -# HarEntryCache - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**before_request** | [**HarEntryCacheBeforeRequest**](HarEntryCacheBeforeRequest.md) | | [optional] -**after_request** | [**HarEntryCacheBeforeRequest**](HarEntryCacheBeforeRequest.md) | | [optional] -**comment** | **str** | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.har_entry_cache import HarEntryCache - -# TODO update the JSON string below -json = "{}" -# create an instance of HarEntryCache from a JSON string -har_entry_cache_instance = HarEntryCache.from_json(json) -# print the JSON string representation of the object -print HarEntryCache.to_json() - -# convert the object into a dict -har_entry_cache_dict = har_entry_cache_instance.to_dict() -# create an instance of HarEntryCache from a dict -har_entry_cache_form_dict = har_entry_cache.from_dict(har_entry_cache_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/HarEntryCacheBeforeRequest.md b/clients/python/docs/HarEntryCacheBeforeRequest.md deleted file mode 100644 index 45cb6aeb25..0000000000 --- a/clients/python/docs/HarEntryCacheBeforeRequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# HarEntryCacheBeforeRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**expires** | **str** | | [optional] -**last_access** | **str** | | -**e_tag** | **str** | | -**hit_count** | **int** | | -**comment** | **str** | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.har_entry_cache_before_request import HarEntryCacheBeforeRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of HarEntryCacheBeforeRequest from a JSON string -har_entry_cache_before_request_instance = HarEntryCacheBeforeRequest.from_json(json) -# print the JSON string representation of the object -print HarEntryCacheBeforeRequest.to_json() - -# convert the object into a dict -har_entry_cache_before_request_dict = har_entry_cache_before_request_instance.to_dict() -# create an instance of HarEntryCacheBeforeRequest from a dict -har_entry_cache_before_request_form_dict = har_entry_cache_before_request.from_dict(har_entry_cache_before_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/HarEntryRequest.md b/clients/python/docs/HarEntryRequest.md deleted file mode 100644 index 3fca9a7d90..0000000000 --- a/clients/python/docs/HarEntryRequest.md +++ /dev/null @@ -1,37 +0,0 @@ -# HarEntryRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**method** | **str** | | -**url** | **str** | | -**http_version** | **str** | | -**cookies** | [**List[HarEntryRequestCookiesInner]**](HarEntryRequestCookiesInner.md) | | -**headers** | [**List[Header]**](Header.md) | | -**query_string** | [**List[HarEntryRequestQueryStringInner]**](HarEntryRequestQueryStringInner.md) | | -**post_data** | [**HarEntryRequestPostData**](HarEntryRequestPostData.md) | | [optional] -**headers_size** | **int** | | -**body_size** | **int** | | -**comment** | **str** | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.har_entry_request import HarEntryRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of HarEntryRequest from a JSON string -har_entry_request_instance = HarEntryRequest.from_json(json) -# print the JSON string representation of the object -print HarEntryRequest.to_json() - -# convert the object into a dict -har_entry_request_dict = har_entry_request_instance.to_dict() -# create an instance of HarEntryRequest from a dict -har_entry_request_form_dict = har_entry_request.from_dict(har_entry_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/HarEntryRequestCookiesInner.md b/clients/python/docs/HarEntryRequestCookiesInner.md deleted file mode 100644 index 0b0184aa0b..0000000000 --- a/clients/python/docs/HarEntryRequestCookiesInner.md +++ /dev/null @@ -1,35 +0,0 @@ -# HarEntryRequestCookiesInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**value** | **str** | | -**path** | **str** | | [optional] -**domain** | **str** | | [optional] -**expires** | **str** | | [optional] -**http_only** | **bool** | | [optional] -**secure** | **bool** | | [optional] -**comment** | **str** | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.har_entry_request_cookies_inner import HarEntryRequestCookiesInner - -# TODO update the JSON string below -json = "{}" -# create an instance of HarEntryRequestCookiesInner from a JSON string -har_entry_request_cookies_inner_instance = HarEntryRequestCookiesInner.from_json(json) -# print the JSON string representation of the object -print HarEntryRequestCookiesInner.to_json() - -# convert the object into a dict -har_entry_request_cookies_inner_dict = har_entry_request_cookies_inner_instance.to_dict() -# create an instance of HarEntryRequestCookiesInner from a dict -har_entry_request_cookies_inner_form_dict = har_entry_request_cookies_inner.from_dict(har_entry_request_cookies_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/HarEntryRequestPostData.md b/clients/python/docs/HarEntryRequestPostData.md deleted file mode 100644 index adaa1380b3..0000000000 --- a/clients/python/docs/HarEntryRequestPostData.md +++ /dev/null @@ -1,31 +0,0 @@ -# HarEntryRequestPostData - -Posted data info. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mime_type** | **str** | | -**text** | **str** | | [optional] -**params** | [**List[HarEntryRequestPostDataParamsInner]**](HarEntryRequestPostDataParamsInner.md) | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.har_entry_request_post_data import HarEntryRequestPostData - -# TODO update the JSON string below -json = "{}" -# create an instance of HarEntryRequestPostData from a JSON string -har_entry_request_post_data_instance = HarEntryRequestPostData.from_json(json) -# print the JSON string representation of the object -print HarEntryRequestPostData.to_json() - -# convert the object into a dict -har_entry_request_post_data_dict = har_entry_request_post_data_instance.to_dict() -# create an instance of HarEntryRequestPostData from a dict -har_entry_request_post_data_form_dict = har_entry_request_post_data.from_dict(har_entry_request_post_data_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/HarEntryRequestPostDataParamsInner.md b/clients/python/docs/HarEntryRequestPostDataParamsInner.md deleted file mode 100644 index 7e6875fc84..0000000000 --- a/clients/python/docs/HarEntryRequestPostDataParamsInner.md +++ /dev/null @@ -1,32 +0,0 @@ -# HarEntryRequestPostDataParamsInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] -**value** | **str** | | [optional] -**file_name** | **str** | | [optional] -**content_type** | **str** | | [optional] -**comment** | **str** | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.har_entry_request_post_data_params_inner import HarEntryRequestPostDataParamsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of HarEntryRequestPostDataParamsInner from a JSON string -har_entry_request_post_data_params_inner_instance = HarEntryRequestPostDataParamsInner.from_json(json) -# print the JSON string representation of the object -print HarEntryRequestPostDataParamsInner.to_json() - -# convert the object into a dict -har_entry_request_post_data_params_inner_dict = har_entry_request_post_data_params_inner_instance.to_dict() -# create an instance of HarEntryRequestPostDataParamsInner from a dict -har_entry_request_post_data_params_inner_form_dict = har_entry_request_post_data_params_inner.from_dict(har_entry_request_post_data_params_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/HarEntryRequestQueryStringInner.md b/clients/python/docs/HarEntryRequestQueryStringInner.md deleted file mode 100644 index 2337c90a2c..0000000000 --- a/clients/python/docs/HarEntryRequestQueryStringInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# HarEntryRequestQueryStringInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**value** | **str** | | -**comment** | **str** | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.har_entry_request_query_string_inner import HarEntryRequestQueryStringInner - -# TODO update the JSON string below -json = "{}" -# create an instance of HarEntryRequestQueryStringInner from a JSON string -har_entry_request_query_string_inner_instance = HarEntryRequestQueryStringInner.from_json(json) -# print the JSON string representation of the object -print HarEntryRequestQueryStringInner.to_json() - -# convert the object into a dict -har_entry_request_query_string_inner_dict = har_entry_request_query_string_inner_instance.to_dict() -# create an instance of HarEntryRequestQueryStringInner from a dict -har_entry_request_query_string_inner_form_dict = har_entry_request_query_string_inner.from_dict(har_entry_request_query_string_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/HarEntryResponse.md b/clients/python/docs/HarEntryResponse.md deleted file mode 100644 index bdc410efbe..0000000000 --- a/clients/python/docs/HarEntryResponse.md +++ /dev/null @@ -1,37 +0,0 @@ -# HarEntryResponse - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **int** | | -**status_text** | **str** | | -**http_version** | **str** | | -**cookies** | [**List[HarEntryRequestCookiesInner]**](HarEntryRequestCookiesInner.md) | | -**headers** | [**List[Header]**](Header.md) | | -**content** | [**HarEntryResponseContent**](HarEntryResponseContent.md) | | -**redirect_url** | **str** | | -**headers_size** | **int** | | -**body_size** | **int** | | -**comment** | **str** | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.har_entry_response import HarEntryResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of HarEntryResponse from a JSON string -har_entry_response_instance = HarEntryResponse.from_json(json) -# print the JSON string representation of the object -print HarEntryResponse.to_json() - -# convert the object into a dict -har_entry_response_dict = har_entry_response_instance.to_dict() -# create an instance of HarEntryResponse from a dict -har_entry_response_form_dict = har_entry_response.from_dict(har_entry_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/HarEntryResponseContent.md b/clients/python/docs/HarEntryResponseContent.md deleted file mode 100644 index a21aa58313..0000000000 --- a/clients/python/docs/HarEntryResponseContent.md +++ /dev/null @@ -1,41 +0,0 @@ -# HarEntryResponseContent - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**size** | **int** | | -**compression** | **int** | | [optional] -**mime_type** | **str** | | -**text** | **str** | | [optional] -**encoding** | **str** | | [optional] -**video_buffered_percent** | **int** | | [optional] [default to -1] -**video_stall_count** | **int** | | [optional] [default to -1] -**video_decoded_byte_count** | **int** | | [optional] [default to -1] -**video_waiting_count** | **int** | | [optional] [default to -1] -**video_error_count** | **int** | | [optional] [default to -1] -**video_dropped_frames** | **int** | | [optional] [default to -1] -**video_total_frames** | **int** | | [optional] [default to -1] -**video_audio_bytes_decoded** | **int** | | [optional] [default to -1] -**comment** | **str** | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.har_entry_response_content import HarEntryResponseContent - -# TODO update the JSON string below -json = "{}" -# create an instance of HarEntryResponseContent from a JSON string -har_entry_response_content_instance = HarEntryResponseContent.from_json(json) -# print the JSON string representation of the object -print HarEntryResponseContent.to_json() - -# convert the object into a dict -har_entry_response_content_dict = har_entry_response_content_instance.to_dict() -# create an instance of HarEntryResponseContent from a dict -har_entry_response_content_form_dict = har_entry_response_content.from_dict(har_entry_response_content_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/HarEntryTimings.md b/clients/python/docs/HarEntryTimings.md deleted file mode 100644 index 6368d38c81..0000000000 --- a/clients/python/docs/HarEntryTimings.md +++ /dev/null @@ -1,35 +0,0 @@ -# HarEntryTimings - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dns** | **int** | | [default to -1] -**connect** | **int** | | [default to -1] -**blocked** | **int** | | [default to -1] -**send** | **int** | | [default to -1] -**wait** | **int** | | [default to -1] -**receive** | **int** | | [default to -1] -**ssl** | **int** | | [default to -1] -**comment** | **str** | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.har_entry_timings import HarEntryTimings - -# TODO update the JSON string below -json = "{}" -# create an instance of HarEntryTimings from a JSON string -har_entry_timings_instance = HarEntryTimings.from_json(json) -# print the JSON string representation of the object -print HarEntryTimings.to_json() - -# convert the object into a dict -har_entry_timings_dict = har_entry_timings_instance.to_dict() -# create an instance of HarEntryTimings from a dict -har_entry_timings_form_dict = har_entry_timings.from_dict(har_entry_timings_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/HarLog.md b/clients/python/docs/HarLog.md deleted file mode 100644 index 53ea657751..0000000000 --- a/clients/python/docs/HarLog.md +++ /dev/null @@ -1,33 +0,0 @@ -# HarLog - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**version** | **str** | | -**creator** | [**HarLogCreator**](HarLogCreator.md) | | -**browser** | [**HarLogCreator**](HarLogCreator.md) | | [optional] -**pages** | [**List[Page]**](Page.md) | | -**entries** | [**List[HarEntry]**](HarEntry.md) | | -**comment** | **str** | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.har_log import HarLog - -# TODO update the JSON string below -json = "{}" -# create an instance of HarLog from a JSON string -har_log_instance = HarLog.from_json(json) -# print the JSON string representation of the object -print HarLog.to_json() - -# convert the object into a dict -har_log_dict = har_log_instance.to_dict() -# create an instance of HarLog from a dict -har_log_form_dict = har_log.from_dict(har_log_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/HarLogCreator.md b/clients/python/docs/HarLogCreator.md deleted file mode 100644 index dbbe239b29..0000000000 --- a/clients/python/docs/HarLogCreator.md +++ /dev/null @@ -1,30 +0,0 @@ -# HarLogCreator - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**version** | **str** | | -**comment** | **str** | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.har_log_creator import HarLogCreator - -# TODO update the JSON string below -json = "{}" -# create an instance of HarLogCreator from a JSON string -har_log_creator_instance = HarLogCreator.from_json(json) -# print the JSON string representation of the object -print HarLogCreator.to_json() - -# convert the object into a dict -har_log_creator_dict = har_log_creator_instance.to_dict() -# create an instance of HarLogCreator from a dict -har_log_creator_form_dict = har_log_creator.from_dict(har_log_creator_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/Header.md b/clients/python/docs/Header.md deleted file mode 100644 index d2f0023e27..0000000000 --- a/clients/python/docs/Header.md +++ /dev/null @@ -1,30 +0,0 @@ -# Header - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**value** | **str** | | -**comment** | **str** | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.header import Header - -# TODO update the JSON string below -json = "{}" -# create an instance of Header from a JSON string -header_instance = Header.from_json(json) -# print the JSON string representation of the object -print Header.to_json() - -# convert the object into a dict -header_dict = header_instance.to_dict() -# create an instance of Header from a dict -header_form_dict = header.from_dict(header_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/LargestContentfulPaint.md b/clients/python/docs/LargestContentfulPaint.md deleted file mode 100644 index 11cde94a7b..0000000000 --- a/clients/python/docs/LargestContentfulPaint.md +++ /dev/null @@ -1,31 +0,0 @@ -# LargestContentfulPaint - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**start_time** | **int** | | [optional] [default to -1] -**size** | **int** | | [optional] [default to -1] -**dom_path** | **str** | | [optional] [default to ''] -**tag** | **str** | | [optional] [default to ''] - -## Example - -```python -from BrowserUpMitmProxyClient.models.largest_contentful_paint import LargestContentfulPaint - -# TODO update the JSON string below -json = "{}" -# create an instance of LargestContentfulPaint from a JSON string -largest_contentful_paint_instance = LargestContentfulPaint.from_json(json) -# print the JSON string representation of the object -print LargestContentfulPaint.to_json() - -# convert the object into a dict -largest_contentful_paint_dict = largest_contentful_paint_instance.to_dict() -# create an instance of LargestContentfulPaint from a dict -largest_contentful_paint_form_dict = largest_contentful_paint.from_dict(largest_contentful_paint_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/MatchCriteria.md b/clients/python/docs/MatchCriteria.md deleted file mode 100644 index ae80c228d7..0000000000 --- a/clients/python/docs/MatchCriteria.md +++ /dev/null @@ -1,42 +0,0 @@ -# MatchCriteria - -A set of criteria for filtering HTTP Requests and Responses. Criteria are AND based, and use python regular expressions for string comparison - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**url** | **str** | Request URL regexp to match | [optional] -**page** | **str** | current|all | [optional] -**status** | **str** | HTTP Status code to match. | [optional] -**content** | **str** | Body content regexp content to match | [optional] -**content_type** | **str** | Content type | [optional] -**websocket_message** | **str** | Websocket message text to match | [optional] -**request_header** | [**NameValuePair**](NameValuePair.md) | | [optional] -**request_cookie** | [**NameValuePair**](NameValuePair.md) | | [optional] -**response_header** | [**NameValuePair**](NameValuePair.md) | | [optional] -**response_cookie** | [**NameValuePair**](NameValuePair.md) | | [optional] -**json_valid** | **bool** | Is valid JSON | [optional] -**json_path** | **str** | Has JSON path | [optional] -**json_schema** | **str** | Validates against passed JSON schema | [optional] -**error_if_no_traffic** | **bool** | If the proxy has NO traffic at all, return error | [optional] [default to True] - -## Example - -```python -from BrowserUpMitmProxyClient.models.match_criteria import MatchCriteria - -# TODO update the JSON string below -json = "{}" -# create an instance of MatchCriteria from a JSON string -match_criteria_instance = MatchCriteria.from_json(json) -# print the JSON string representation of the object -print MatchCriteria.to_json() - -# convert the object into a dict -match_criteria_dict = match_criteria_instance.to_dict() -# create an instance of MatchCriteria from a dict -match_criteria_form_dict = match_criteria.from_dict(match_criteria_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/NameValuePair.md b/clients/python/docs/NameValuePair.md deleted file mode 100644 index b3fc1fcc10..0000000000 --- a/clients/python/docs/NameValuePair.md +++ /dev/null @@ -1,29 +0,0 @@ -# NameValuePair - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Name to match | [optional] -**value** | **str** | Value to match | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.name_value_pair import NameValuePair - -# TODO update the JSON string below -json = "{}" -# create an instance of NameValuePair from a JSON string -name_value_pair_instance = NameValuePair.from_json(json) -# print the JSON string representation of the object -print NameValuePair.to_json() - -# convert the object into a dict -name_value_pair_dict = name_value_pair_instance.to_dict() -# create an instance of NameValuePair from a dict -name_value_pair_form_dict = name_value_pair.from_dict(name_value_pair_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/Page.md b/clients/python/docs/Page.md deleted file mode 100644 index db9ba8deba..0000000000 --- a/clients/python/docs/Page.md +++ /dev/null @@ -1,35 +0,0 @@ -# Page - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**started_date_time** | **datetime** | | -**id** | **str** | | -**title** | **str** | | -**verifications** | [**List[VerifyResult]**](VerifyResult.md) | | [optional] [default to []] -**counters** | [**List[Counter]**](Counter.md) | | [optional] [default to []] -**errors** | [**List[Error]**](Error.md) | | [optional] [default to []] -**page_timings** | [**PageTimings**](PageTimings.md) | | -**comment** | **str** | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.page import Page - -# TODO update the JSON string below -json = "{}" -# create an instance of Page from a JSON string -page_instance = Page.from_json(json) -# print the JSON string representation of the object -print Page.to_json() - -# convert the object into a dict -page_dict = page_instance.to_dict() -# create an instance of Page from a dict -page_form_dict = page.from_dict(page_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/PageTiming.md b/clients/python/docs/PageTiming.md deleted file mode 100644 index 908b5bb3fc..0000000000 --- a/clients/python/docs/PageTiming.md +++ /dev/null @@ -1,39 +0,0 @@ -# PageTiming - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**on_content_load** | **float** | onContentLoad per the browser | [optional] -**on_load** | **float** | onLoad per the browser | [optional] -**first_input_delay** | **float** | firstInputDelay from the browser | [optional] -**first_paint** | **float** | firstPaint from the browser | [optional] -**cumulative_layout_shift** | **float** | cumulativeLayoutShift metric from the browser | [optional] -**largest_contentful_paint** | **float** | largestContentfulPaint from the browser | [optional] -**dom_interactive** | **float** | domInteractive from the browser | [optional] -**first_contentful_paint** | **float** | firstContentfulPaint from the browser | [optional] -**dns** | **float** | dns lookup time from the browser | [optional] -**ssl** | **float** | Ssl connect time from the browser | [optional] -**time_to_first_byte** | **float** | Time to first byte of the page's first request per the browser | [optional] -**href** | **str** | Top level href, including hashtag, etc per the browser | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.page_timing import PageTiming - -# TODO update the JSON string below -json = "{}" -# create an instance of PageTiming from a JSON string -page_timing_instance = PageTiming.from_json(json) -# print the JSON string representation of the object -print PageTiming.to_json() - -# convert the object into a dict -page_timing_dict = page_timing_instance.to_dict() -# create an instance of PageTiming from a dict -page_timing_form_dict = page_timing.from_dict(page_timing_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/PageTimings.md b/clients/python/docs/PageTimings.md deleted file mode 100644 index 7071832163..0000000000 --- a/clients/python/docs/PageTimings.md +++ /dev/null @@ -1,40 +0,0 @@ -# PageTimings - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**on_content_load** | **int** | | [default to -1] -**on_load** | **int** | | [default to -1] -**href** | **str** | | [optional] [default to ''] -**dns** | **int** | | [optional] [default to -1] -**ssl** | **int** | | [optional] [default to -1] -**time_to_first_byte** | **int** | | [optional] [default to -1] -**cumulative_layout_shift** | **float** | | [optional] [default to -1] -**largest_contentful_paint** | [**LargestContentfulPaint**](LargestContentfulPaint.md) | | [optional] -**first_paint** | **int** | | [optional] [default to -1] -**first_input_delay** | **float** | | [optional] [default to -1] -**dom_interactive** | **int** | | [optional] [default to -1] -**first_contentful_paint** | **int** | | [optional] [default to -1] -**comment** | **str** | | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.page_timings import PageTimings - -# TODO update the JSON string below -json = "{}" -# create an instance of PageTimings from a JSON string -page_timings_instance = PageTimings.from_json(json) -# print the JSON string representation of the object -print PageTimings.to_json() - -# convert the object into a dict -page_timings_dict = page_timings_instance.to_dict() -# create an instance of PageTimings from a dict -page_timings_form_dict = page_timings.from_dict(page_timings_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/VerifyResult.md b/clients/python/docs/VerifyResult.md deleted file mode 100644 index fd14286ac1..0000000000 --- a/clients/python/docs/VerifyResult.md +++ /dev/null @@ -1,30 +0,0 @@ -# VerifyResult - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**result** | **bool** | Result True / False | [optional] -**name** | **str** | Name | [optional] -**type** | **str** | Type | [optional] - -## Example - -```python -from BrowserUpMitmProxyClient.models.verify_result import VerifyResult - -# TODO update the JSON string below -json = "{}" -# create an instance of VerifyResult from a JSON string -verify_result_instance = VerifyResult.from_json(json) -# print the JSON string representation of the object -print VerifyResult.to_json() - -# convert the object into a dict -verify_result_dict = verify_result_instance.to_dict() -# create an instance of VerifyResult from a dict -verify_result_form_dict = verify_result.from_dict(verify_result_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/docs/WebSocketMessage.md b/clients/python/docs/WebSocketMessage.md deleted file mode 100644 index 954f8a7ed6..0000000000 --- a/clients/python/docs/WebSocketMessage.md +++ /dev/null @@ -1,31 +0,0 @@ -# WebSocketMessage - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | | -**opcode** | **float** | | -**data** | **str** | | -**time** | **float** | | - -## Example - -```python -from BrowserUpMitmProxyClient.models.web_socket_message import WebSocketMessage - -# TODO update the JSON string below -json = "{}" -# create an instance of WebSocketMessage from a JSON string -web_socket_message_instance = WebSocketMessage.from_json(json) -# print the JSON string representation of the object -print WebSocketMessage.to_json() - -# convert the object into a dict -web_socket_message_dict = web_socket_message_instance.to_dict() -# create an instance of WebSocketMessage from a dict -web_socket_message_form_dict = web_socket_message.from_dict(web_socket_message_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/python/git_push.sh b/clients/python/git_push.sh deleted file mode 100644 index f53a75d4fa..0000000000 --- a/clients/python/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/clients/python/pyproject.toml b/clients/python/pyproject.toml deleted file mode 100644 index 749df0c2c7..0000000000 --- a/clients/python/pyproject.toml +++ /dev/null @@ -1,5 +0,0 @@ -[build-system] -requires = [ - "setuptools>=42" -] -build-backend = "setuptools.build_meta" diff --git a/clients/python/requirements.txt b/clients/python/requirements.txt deleted file mode 100644 index 258c179c10..0000000000 --- a/clients/python/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.25.3, < 2.1.0 -pydantic >= 1.10.5, < 2 -aenum >= 3.1.11 diff --git a/clients/python/setup.cfg b/clients/python/setup.cfg deleted file mode 100644 index 11433ee875..0000000000 --- a/clients/python/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -max-line-length=99 diff --git a/clients/python/setup.py b/clients/python/setup.py deleted file mode 100644 index 29f8042373..0000000000 --- a/clients/python/setup.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -from setuptools import find_packages # noqa: H301 -from setuptools import setup # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "BrowserUpMitmProxyClient" -VERSION = "1.0.1" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 1.10.5, < 2", - "aenum", -] - -setup( - name=NAME, - version=VERSION, - description="BrowserUp MitmProxy", - author="BrowserUp, Inc.", - author_email="developers@browserup.com", - url="https://github.com/browserup/mitmproxy", - keywords=["OpenAPI", "OpenAPI-Generator", "BrowserUp MitmProxy"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type="text/markdown", - long_description="""\ - ___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - """, # noqa: E501 - package_data={"BrowserUpMitmProxyClient": ["py.typed"]}, -) diff --git a/clients/python/test-requirements.txt b/clients/python/test-requirements.txt deleted file mode 100644 index 3a0d0b939a..0000000000 --- a/clients/python/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/clients/python/test/__init__.py b/clients/python/test/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/clients/python/test/test_action.py b/clients/python/test/test_action.py deleted file mode 100644 index 0c8ca4f768..0000000000 --- a/clients/python/test/test_action.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestAction(unittest.TestCase): - """Action unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test Action - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `Action` - """ - model = BrowserUpMitmProxyClient.models.action.Action() # noqa: E501 - if include_optional : - return Action( - name = '', - id = '', - class_name = '', - tag_name = '', - xpath = '', - data_attributes = '', - form_name = '', - content = '' - ) - else : - return Action( - ) - """ - - def testAction(self): - """Test Action""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_browser_up_proxy_api.py b/clients/python/test/test_browser_up_proxy_api.py deleted file mode 100644 index 7f20ed2431..0000000000 --- a/clients/python/test/test_browser_up_proxy_api.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - -import BrowserUpMitmProxyClient - - -class TestBrowserUpProxyApi(unittest.TestCase): - """BrowserUpProxyApi unit test stubs""" - - def setUp(self): - self.api = BrowserUpMitmProxyClient.api.browser_up_proxy_api.BrowserUpProxyApi() # noqa: E501 - - def tearDown(self): - pass - - def test_add_counter(self): - """Test case for add_counter""" - pass - - def test_add_error(self): - """Test case for add_error""" - pass - - def test_get_har_log(self): - """Test case for get_har_log""" - pass - - def test_healthcheck(self): - """Test case for healthcheck""" - pass - - def test_new_page(self): - """Test case for new_page""" - pass - - def test_reset_har_log(self): - """Test case for reset_har_log""" - pass - - def test_verify_not_present(self): - """Test case for verify_not_present""" - pass - - def test_verify_present(self): - """Test case for verify_present""" - pass - - def test_verify_size(self): - """Test case for verify_size""" - pass - - def test_verify_sla(self): - """Test case for verify_sla""" - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_counter.py b/clients/python/test/test_counter.py deleted file mode 100644 index d33025fef0..0000000000 --- a/clients/python/test/test_counter.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestCounter(unittest.TestCase): - """Counter unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test Counter - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `Counter` - """ - model = BrowserUpMitmProxyClient.models.counter.Counter() # noqa: E501 - if include_optional : - return Counter( - name = '', - value = 1.337 - ) - else : - return Counter( - ) - """ - - def testCounter(self): - """Test Counter""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_error.py b/clients/python/test/test_error.py deleted file mode 100644 index 7455e5dedc..0000000000 --- a/clients/python/test/test_error.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `Error` - """ - model = BrowserUpMitmProxyClient.models.error.Error() # noqa: E501 - if include_optional : - return Error( - name = '', - details = '' - ) - else : - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_har.py b/clients/python/test/test_har.py deleted file mode 100644 index 8b54cd4424..0000000000 --- a/clients/python/test/test_har.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestHar(unittest.TestCase): - """Har unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test Har - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `Har` - """ - model = BrowserUpMitmProxyClient.models.har.Har() # noqa: E501 - if include_optional : - return Har( - log = BrowserUpMitmProxyClient.models.har_log.Har_log( - version = '', - creator = BrowserUpMitmProxyClient.models.har_log_creator.Har_log_creator( - name = '', - version = '', - comment = '', ), - browser = BrowserUpMitmProxyClient.models.har_log_creator.Har_log_creator( - name = '', - version = '', - comment = '', ), - pages = [ - { } - ], - entries = [ - BrowserUpMitmProxyClient.models.har_entry.HarEntry( - pageref = '', - started_date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - time = 0, - request = { }, - response = { }, - cache = BrowserUpMitmProxyClient.models.har_entry_cache.HarEntry_cache( - before_request = BrowserUpMitmProxyClient.models.har_entry_cache_before_request.HarEntry_cache_beforeRequest( - expires = '', - last_access = '', - e_tag = '', - hit_count = 56, - comment = '', ), - after_request = BrowserUpMitmProxyClient.models.har_entry_cache_before_request.HarEntry_cache_beforeRequest( - expires = '', - last_access = '', - e_tag = '', - hit_count = 56, - comment = '', ), - comment = '', ), - timings = BrowserUpMitmProxyClient.models.har_entry_timings.HarEntry_timings( - dns = -1, - connect = -1, - blocked = -1, - send = -1, - wait = -1, - receive = -1, - ssl = -1, - comment = '', ), - server_ip_address = '', - _web_socket_messages = [ - BrowserUpMitmProxyClient.models.web_socket_message.WebSocketMessage( - type = '', - opcode = 1.337, - data = '', - time = 1.337, ) - ], - connection = '', - comment = '', ) - ], - comment = '', ) - ) - else : - return Har( - log = BrowserUpMitmProxyClient.models.har_log.Har_log( - version = '', - creator = BrowserUpMitmProxyClient.models.har_log_creator.Har_log_creator( - name = '', - version = '', - comment = '', ), - browser = BrowserUpMitmProxyClient.models.har_log_creator.Har_log_creator( - name = '', - version = '', - comment = '', ), - pages = [ - { } - ], - entries = [ - BrowserUpMitmProxyClient.models.har_entry.HarEntry( - pageref = '', - started_date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - time = 0, - request = { }, - response = { }, - cache = BrowserUpMitmProxyClient.models.har_entry_cache.HarEntry_cache( - before_request = BrowserUpMitmProxyClient.models.har_entry_cache_before_request.HarEntry_cache_beforeRequest( - expires = '', - last_access = '', - e_tag = '', - hit_count = 56, - comment = '', ), - after_request = BrowserUpMitmProxyClient.models.har_entry_cache_before_request.HarEntry_cache_beforeRequest( - expires = '', - last_access = '', - e_tag = '', - hit_count = 56, - comment = '', ), - comment = '', ), - timings = BrowserUpMitmProxyClient.models.har_entry_timings.HarEntry_timings( - dns = -1, - connect = -1, - blocked = -1, - send = -1, - wait = -1, - receive = -1, - ssl = -1, - comment = '', ), - server_ip_address = '', - _web_socket_messages = [ - BrowserUpMitmProxyClient.models.web_socket_message.WebSocketMessage( - type = '', - opcode = 1.337, - data = '', - time = 1.337, ) - ], - connection = '', - comment = '', ) - ], - comment = '', ), - ) - """ - - def testHar(self): - """Test Har""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_har_entry.py b/clients/python/test/test_har_entry.py deleted file mode 100644 index 5358313cf2..0000000000 --- a/clients/python/test/test_har_entry.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestHarEntry(unittest.TestCase): - """HarEntry unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test HarEntry - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `HarEntry` - """ - model = BrowserUpMitmProxyClient.models.har_entry.HarEntry() # noqa: E501 - if include_optional : - return HarEntry( - pageref = '', - started_date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - time = 0, - request = { }, - response = { }, - cache = BrowserUpMitmProxyClient.models.har_entry_cache.HarEntry_cache( - before_request = BrowserUpMitmProxyClient.models.har_entry_cache_before_request.HarEntry_cache_beforeRequest( - expires = '', - last_access = '', - e_tag = '', - hit_count = 56, - comment = '', ), - after_request = BrowserUpMitmProxyClient.models.har_entry_cache_before_request.HarEntry_cache_beforeRequest( - expires = '', - last_access = '', - e_tag = '', - hit_count = 56, - comment = '', ), - comment = '', ), - timings = BrowserUpMitmProxyClient.models.har_entry_timings.HarEntry_timings( - dns = -1, - connect = -1, - blocked = -1, - send = -1, - wait = -1, - receive = -1, - ssl = -1, - comment = '', ), - server_ip_address = '', - web_socket_messages = [ - BrowserUpMitmProxyClient.models.web_socket_message.WebSocketMessage( - type = '', - opcode = 1.337, - data = '', - time = 1.337, ) - ], - connection = '', - comment = '' - ) - else : - return HarEntry( - started_date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - time = 0, - request = { }, - response = { }, - cache = BrowserUpMitmProxyClient.models.har_entry_cache.HarEntry_cache( - before_request = BrowserUpMitmProxyClient.models.har_entry_cache_before_request.HarEntry_cache_beforeRequest( - expires = '', - last_access = '', - e_tag = '', - hit_count = 56, - comment = '', ), - after_request = BrowserUpMitmProxyClient.models.har_entry_cache_before_request.HarEntry_cache_beforeRequest( - expires = '', - last_access = '', - e_tag = '', - hit_count = 56, - comment = '', ), - comment = '', ), - timings = BrowserUpMitmProxyClient.models.har_entry_timings.HarEntry_timings( - dns = -1, - connect = -1, - blocked = -1, - send = -1, - wait = -1, - receive = -1, - ssl = -1, - comment = '', ), - ) - """ - - def testHarEntry(self): - """Test HarEntry""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_har_entry_cache.py b/clients/python/test/test_har_entry_cache.py deleted file mode 100644 index a1944cce92..0000000000 --- a/clients/python/test/test_har_entry_cache.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestHarEntryCache(unittest.TestCase): - """HarEntryCache unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test HarEntryCache - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `HarEntryCache` - """ - model = BrowserUpMitmProxyClient.models.har_entry_cache.HarEntryCache() # noqa: E501 - if include_optional : - return HarEntryCache( - before_request = BrowserUpMitmProxyClient.models.har_entry_cache_before_request.HarEntry_cache_beforeRequest( - expires = '', - last_access = '', - e_tag = '', - hit_count = 56, - comment = '', ), - after_request = BrowserUpMitmProxyClient.models.har_entry_cache_before_request.HarEntry_cache_beforeRequest( - expires = '', - last_access = '', - e_tag = '', - hit_count = 56, - comment = '', ), - comment = '' - ) - else : - return HarEntryCache( - ) - """ - - def testHarEntryCache(self): - """Test HarEntryCache""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_har_entry_cache_before_request.py b/clients/python/test/test_har_entry_cache_before_request.py deleted file mode 100644 index a507bb8a42..0000000000 --- a/clients/python/test/test_har_entry_cache_before_request.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestHarEntryCacheBeforeRequest(unittest.TestCase): - """HarEntryCacheBeforeRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test HarEntryCacheBeforeRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `HarEntryCacheBeforeRequest` - """ - model = BrowserUpMitmProxyClient.models.har_entry_cache_before_request.HarEntryCacheBeforeRequest() # noqa: E501 - if include_optional : - return HarEntryCacheBeforeRequest( - expires = '', - last_access = '', - e_tag = '', - hit_count = 56, - comment = '' - ) - else : - return HarEntryCacheBeforeRequest( - last_access = '', - e_tag = '', - hit_count = 56, - ) - """ - - def testHarEntryCacheBeforeRequest(self): - """Test HarEntryCacheBeforeRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_har_entry_request.py b/clients/python/test/test_har_entry_request.py deleted file mode 100644 index cd650a6251..0000000000 --- a/clients/python/test/test_har_entry_request.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestHarEntryRequest(unittest.TestCase): - """HarEntryRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test HarEntryRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `HarEntryRequest` - """ - model = BrowserUpMitmProxyClient.models.har_entry_request.HarEntryRequest() # noqa: E501 - if include_optional : - return HarEntryRequest( - method = '', - url = '', - http_version = '', - cookies = [ - BrowserUpMitmProxyClient.models.har_entry_request_cookies_inner.HarEntry_request_cookies_inner( - name = '', - value = '', - path = '', - domain = '', - expires = '', - http_only = True, - secure = True, - comment = '', ) - ], - headers = [ - BrowserUpMitmProxyClient.models.header.Header( - name = '', - value = '', - comment = '', ) - ], - query_string = [ - BrowserUpMitmProxyClient.models.har_entry_request_query_string_inner.HarEntry_request_queryString_inner( - name = '', - value = '', - comment = '', ) - ], - post_data = BrowserUpMitmProxyClient.models.har_entry_request_post_data.HarEntry_request_postData( - mime_type = '', - text = '', - params = [ - BrowserUpMitmProxyClient.models.har_entry_request_post_data_params_inner.HarEntry_request_postData_params_inner( - name = '', - value = '', - file_name = '', - content_type = '', - comment = '', ) - ], ), - headers_size = 56, - body_size = 56, - comment = '' - ) - else : - return HarEntryRequest( - method = '', - url = '', - http_version = '', - cookies = [ - BrowserUpMitmProxyClient.models.har_entry_request_cookies_inner.HarEntry_request_cookies_inner( - name = '', - value = '', - path = '', - domain = '', - expires = '', - http_only = True, - secure = True, - comment = '', ) - ], - headers = [ - BrowserUpMitmProxyClient.models.header.Header( - name = '', - value = '', - comment = '', ) - ], - query_string = [ - BrowserUpMitmProxyClient.models.har_entry_request_query_string_inner.HarEntry_request_queryString_inner( - name = '', - value = '', - comment = '', ) - ], - headers_size = 56, - body_size = 56, - ) - """ - - def testHarEntryRequest(self): - """Test HarEntryRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_har_entry_request_cookies_inner.py b/clients/python/test/test_har_entry_request_cookies_inner.py deleted file mode 100644 index 2484c87214..0000000000 --- a/clients/python/test/test_har_entry_request_cookies_inner.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestHarEntryRequestCookiesInner(unittest.TestCase): - """HarEntryRequestCookiesInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test HarEntryRequestCookiesInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `HarEntryRequestCookiesInner` - """ - model = BrowserUpMitmProxyClient.models.har_entry_request_cookies_inner.HarEntryRequestCookiesInner() # noqa: E501 - if include_optional : - return HarEntryRequestCookiesInner( - name = '', - value = '', - path = '', - domain = '', - expires = '', - http_only = True, - secure = True, - comment = '' - ) - else : - return HarEntryRequestCookiesInner( - name = '', - value = '', - ) - """ - - def testHarEntryRequestCookiesInner(self): - """Test HarEntryRequestCookiesInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_har_entry_request_post_data.py b/clients/python/test/test_har_entry_request_post_data.py deleted file mode 100644 index 72d0520412..0000000000 --- a/clients/python/test/test_har_entry_request_post_data.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestHarEntryRequestPostData(unittest.TestCase): - """HarEntryRequestPostData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test HarEntryRequestPostData - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `HarEntryRequestPostData` - """ - model = BrowserUpMitmProxyClient.models.har_entry_request_post_data.HarEntryRequestPostData() # noqa: E501 - if include_optional : - return HarEntryRequestPostData( - mime_type = '', - text = '', - params = [ - BrowserUpMitmProxyClient.models.har_entry_request_post_data_params_inner.HarEntry_request_postData_params_inner( - name = '', - value = '', - file_name = '', - content_type = '', - comment = '', ) - ] - ) - else : - return HarEntryRequestPostData( - mime_type = '', - ) - """ - - def testHarEntryRequestPostData(self): - """Test HarEntryRequestPostData""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_har_entry_request_post_data_params_inner.py b/clients/python/test/test_har_entry_request_post_data_params_inner.py deleted file mode 100644 index 502660650a..0000000000 --- a/clients/python/test/test_har_entry_request_post_data_params_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestHarEntryRequestPostDataParamsInner(unittest.TestCase): - """HarEntryRequestPostDataParamsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test HarEntryRequestPostDataParamsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `HarEntryRequestPostDataParamsInner` - """ - model = BrowserUpMitmProxyClient.models.har_entry_request_post_data_params_inner.HarEntryRequestPostDataParamsInner() # noqa: E501 - if include_optional : - return HarEntryRequestPostDataParamsInner( - name = '', - value = '', - file_name = '', - content_type = '', - comment = '' - ) - else : - return HarEntryRequestPostDataParamsInner( - ) - """ - - def testHarEntryRequestPostDataParamsInner(self): - """Test HarEntryRequestPostDataParamsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_har_entry_request_query_string_inner.py b/clients/python/test/test_har_entry_request_query_string_inner.py deleted file mode 100644 index 4b6b27ddb8..0000000000 --- a/clients/python/test/test_har_entry_request_query_string_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestHarEntryRequestQueryStringInner(unittest.TestCase): - """HarEntryRequestQueryStringInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test HarEntryRequestQueryStringInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `HarEntryRequestQueryStringInner` - """ - model = BrowserUpMitmProxyClient.models.har_entry_request_query_string_inner.HarEntryRequestQueryStringInner() # noqa: E501 - if include_optional : - return HarEntryRequestQueryStringInner( - name = '', - value = '', - comment = '' - ) - else : - return HarEntryRequestQueryStringInner( - name = '', - value = '', - ) - """ - - def testHarEntryRequestQueryStringInner(self): - """Test HarEntryRequestQueryStringInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_har_entry_response.py b/clients/python/test/test_har_entry_response.py deleted file mode 100644 index 8643dec4ac..0000000000 --- a/clients/python/test/test_har_entry_response.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestHarEntryResponse(unittest.TestCase): - """HarEntryResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test HarEntryResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `HarEntryResponse` - """ - model = BrowserUpMitmProxyClient.models.har_entry_response.HarEntryResponse() # noqa: E501 - if include_optional : - return HarEntryResponse( - status = 56, - status_text = '', - http_version = '', - cookies = [ - BrowserUpMitmProxyClient.models.har_entry_request_cookies_inner.HarEntry_request_cookies_inner( - name = '', - value = '', - path = '', - domain = '', - expires = '', - http_only = True, - secure = True, - comment = '', ) - ], - headers = [ - BrowserUpMitmProxyClient.models.header.Header( - name = '', - value = '', - comment = '', ) - ], - content = BrowserUpMitmProxyClient.models.har_entry_response_content.HarEntry_response_content( - size = 56, - compression = 56, - mime_type = '', - text = '', - encoding = '', - comment = '', ), - redirect_url = '', - headers_size = 56, - body_size = 56, - video_buffered_percent = -1, - video_stall_count = -1, - video_decoded_byte_count = -1, - video_waiting_count = -1, - video_error_count = -1, - video_dropped_frames = -1, - video_total_frames = -1, - video_audio_bytes_decoded = -1, - comment = '' - ) - else : - return HarEntryResponse( - status = 56, - status_text = '', - http_version = '', - cookies = [ - BrowserUpMitmProxyClient.models.har_entry_request_cookies_inner.HarEntry_request_cookies_inner( - name = '', - value = '', - path = '', - domain = '', - expires = '', - http_only = True, - secure = True, - comment = '', ) - ], - headers = [ - BrowserUpMitmProxyClient.models.header.Header( - name = '', - value = '', - comment = '', ) - ], - content = BrowserUpMitmProxyClient.models.har_entry_response_content.HarEntry_response_content( - size = 56, - compression = 56, - mime_type = '', - text = '', - encoding = '', - comment = '', ), - redirect_url = '', - headers_size = 56, - body_size = 56, - ) - """ - - def testHarEntryResponse(self): - """Test HarEntryResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_har_entry_response_content.py b/clients/python/test/test_har_entry_response_content.py deleted file mode 100644 index be9071ffaa..0000000000 --- a/clients/python/test/test_har_entry_response_content.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestHarEntryResponseContent(unittest.TestCase): - """HarEntryResponseContent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test HarEntryResponseContent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `HarEntryResponseContent` - """ - model = BrowserUpMitmProxyClient.models.har_entry_response_content.HarEntryResponseContent() # noqa: E501 - if include_optional : - return HarEntryResponseContent( - size = 56, - compression = 56, - mime_type = '', - text = '', - encoding = '', - comment = '' - ) - else : - return HarEntryResponseContent( - size = 56, - mime_type = '', - ) - """ - - def testHarEntryResponseContent(self): - """Test HarEntryResponseContent""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_har_entry_timings.py b/clients/python/test/test_har_entry_timings.py deleted file mode 100644 index 3949478dc7..0000000000 --- a/clients/python/test/test_har_entry_timings.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestHarEntryTimings(unittest.TestCase): - """HarEntryTimings unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test HarEntryTimings - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `HarEntryTimings` - """ - model = BrowserUpMitmProxyClient.models.har_entry_timings.HarEntryTimings() # noqa: E501 - if include_optional : - return HarEntryTimings( - dns = -1, - connect = -1, - blocked = -1, - send = -1, - wait = -1, - receive = -1, - ssl = -1, - comment = '' - ) - else : - return HarEntryTimings( - dns = -1, - connect = -1, - blocked = -1, - send = -1, - wait = -1, - receive = -1, - ssl = -1, - ) - """ - - def testHarEntryTimings(self): - """Test HarEntryTimings""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_har_log.py b/clients/python/test/test_har_log.py deleted file mode 100644 index 6b82a9a2ed..0000000000 --- a/clients/python/test/test_har_log.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestHarLog(unittest.TestCase): - """HarLog unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test HarLog - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `HarLog` - """ - model = BrowserUpMitmProxyClient.models.har_log.HarLog() # noqa: E501 - if include_optional : - return HarLog( - version = '', - creator = BrowserUpMitmProxyClient.models.har_log_creator.Har_log_creator( - name = '', - version = '', - comment = '', ), - browser = BrowserUpMitmProxyClient.models.har_log_creator.Har_log_creator( - name = '', - version = '', - comment = '', ), - pages = [ - { } - ], - entries = [ - BrowserUpMitmProxyClient.models.har_entry.HarEntry( - pageref = '', - started_date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - time = 0, - request = { }, - response = { }, - cache = BrowserUpMitmProxyClient.models.har_entry_cache.HarEntry_cache( - before_request = BrowserUpMitmProxyClient.models.har_entry_cache_before_request.HarEntry_cache_beforeRequest( - expires = '', - last_access = '', - e_tag = '', - hit_count = 56, - comment = '', ), - after_request = BrowserUpMitmProxyClient.models.har_entry_cache_before_request.HarEntry_cache_beforeRequest( - expires = '', - last_access = '', - e_tag = '', - hit_count = 56, - comment = '', ), - comment = '', ), - timings = BrowserUpMitmProxyClient.models.har_entry_timings.HarEntry_timings( - dns = -1, - connect = -1, - blocked = -1, - send = -1, - wait = -1, - receive = -1, - ssl = -1, - comment = '', ), - server_ip_address = '', - _web_socket_messages = [ - BrowserUpMitmProxyClient.models.web_socket_message.WebSocketMessage( - type = '', - opcode = 1.337, - data = '', - time = 1.337, ) - ], - connection = '', - comment = '', ) - ], - comment = '' - ) - else : - return HarLog( - version = '', - creator = BrowserUpMitmProxyClient.models.har_log_creator.Har_log_creator( - name = '', - version = '', - comment = '', ), - pages = [ - { } - ], - entries = [ - BrowserUpMitmProxyClient.models.har_entry.HarEntry( - pageref = '', - started_date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - time = 0, - request = { }, - response = { }, - cache = BrowserUpMitmProxyClient.models.har_entry_cache.HarEntry_cache( - before_request = BrowserUpMitmProxyClient.models.har_entry_cache_before_request.HarEntry_cache_beforeRequest( - expires = '', - last_access = '', - e_tag = '', - hit_count = 56, - comment = '', ), - after_request = BrowserUpMitmProxyClient.models.har_entry_cache_before_request.HarEntry_cache_beforeRequest( - expires = '', - last_access = '', - e_tag = '', - hit_count = 56, - comment = '', ), - comment = '', ), - timings = BrowserUpMitmProxyClient.models.har_entry_timings.HarEntry_timings( - dns = -1, - connect = -1, - blocked = -1, - send = -1, - wait = -1, - receive = -1, - ssl = -1, - comment = '', ), - server_ip_address = '', - _web_socket_messages = [ - BrowserUpMitmProxyClient.models.web_socket_message.WebSocketMessage( - type = '', - opcode = 1.337, - data = '', - time = 1.337, ) - ], - connection = '', - comment = '', ) - ], - ) - """ - - def testHarLog(self): - """Test HarLog""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_har_log_creator.py b/clients/python/test/test_har_log_creator.py deleted file mode 100644 index 41aeeffeb5..0000000000 --- a/clients/python/test/test_har_log_creator.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestHarLogCreator(unittest.TestCase): - """HarLogCreator unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test HarLogCreator - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `HarLogCreator` - """ - model = BrowserUpMitmProxyClient.models.har_log_creator.HarLogCreator() # noqa: E501 - if include_optional : - return HarLogCreator( - name = '', - version = '', - comment = '' - ) - else : - return HarLogCreator( - name = '', - version = '', - ) - """ - - def testHarLogCreator(self): - """Test HarLogCreator""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_header.py b/clients/python/test/test_header.py deleted file mode 100644 index 3e293db2c2..0000000000 --- a/clients/python/test/test_header.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestHeader(unittest.TestCase): - """Header unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test Header - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `Header` - """ - model = BrowserUpMitmProxyClient.models.header.Header() # noqa: E501 - if include_optional : - return Header( - name = '', - value = '', - comment = '' - ) - else : - return Header( - name = '', - value = '', - ) - """ - - def testHeader(self): - """Test Header""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_largest_contentful_paint.py b/clients/python/test/test_largest_contentful_paint.py deleted file mode 100644 index c9a9aab0ef..0000000000 --- a/clients/python/test/test_largest_contentful_paint.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestLargestContentfulPaint(unittest.TestCase): - """LargestContentfulPaint unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test LargestContentfulPaint - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `LargestContentfulPaint` - """ - model = BrowserUpMitmProxyClient.models.largest_contentful_paint.LargestContentfulPaint() # noqa: E501 - if include_optional : - return LargestContentfulPaint( - start_time = -1, - size = -1, - dom_path = '', - tag = '' - ) - else : - return LargestContentfulPaint( - ) - """ - - def testLargestContentfulPaint(self): - """Test LargestContentfulPaint""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_match_criteria.py b/clients/python/test/test_match_criteria.py deleted file mode 100644 index 8fa7c9fcf4..0000000000 --- a/clients/python/test/test_match_criteria.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestMatchCriteria(unittest.TestCase): - """MatchCriteria unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test MatchCriteria - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `MatchCriteria` - """ - model = BrowserUpMitmProxyClient.models.match_criteria.MatchCriteria() # noqa: E501 - if include_optional : - return MatchCriteria( - url = '', - page = '', - status = '', - content = '', - content_type = '', - websocket_message = '', - request_header = BrowserUpMitmProxyClient.models.name_value_pair.NameValuePair( - name = '', - value = '', ), - request_cookie = BrowserUpMitmProxyClient.models.name_value_pair.NameValuePair( - name = '', - value = '', ), - response_header = BrowserUpMitmProxyClient.models.name_value_pair.NameValuePair( - name = '', - value = '', ), - response_cookie = BrowserUpMitmProxyClient.models.name_value_pair.NameValuePair( - name = '', - value = '', ), - json_valid = True, - json_path = '', - json_schema = '', - error_if_no_traffic = True - ) - else : - return MatchCriteria( - ) - """ - - def testMatchCriteria(self): - """Test MatchCriteria""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_name_value_pair.py b/clients/python/test/test_name_value_pair.py deleted file mode 100644 index 30ca2a3abe..0000000000 --- a/clients/python/test/test_name_value_pair.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestNameValuePair(unittest.TestCase): - """NameValuePair unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test NameValuePair - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `NameValuePair` - """ - model = BrowserUpMitmProxyClient.models.name_value_pair.NameValuePair() # noqa: E501 - if include_optional : - return NameValuePair( - name = '', - value = '' - ) - else : - return NameValuePair( - ) - """ - - def testNameValuePair(self): - """Test NameValuePair""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_page.py b/clients/python/test/test_page.py deleted file mode 100644 index 34b0535ec0..0000000000 --- a/clients/python/test/test_page.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestPage(unittest.TestCase): - """Page unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test Page - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `Page` - """ - model = BrowserUpMitmProxyClient.models.page.Page() # noqa: E501 - if include_optional : - return Page( - started_date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - title = '', - verifications = [ - BrowserUpMitmProxyClient.models.verify_result.VerifyResult( - result = True, - name = '', - type = '', ) - ], - counters = [ - BrowserUpMitmProxyClient.models.counter.Counter( - name = '', - value = 1.337, ) - ], - errors = [ - BrowserUpMitmProxyClient.models.error.Error( - name = '', - details = '', ) - ], - page_timings = { }, - comment = '' - ) - else : - return Page( - started_date_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - title = '', - page_timings = { }, - ) - """ - - def testPage(self): - """Test Page""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_page_timing.py b/clients/python/test/test_page_timing.py deleted file mode 100644 index 829c20113f..0000000000 --- a/clients/python/test/test_page_timing.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestPageTiming(unittest.TestCase): - """PageTiming unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test PageTiming - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `PageTiming` - """ - model = BrowserUpMitmProxyClient.models.page_timing.PageTiming() # noqa: E501 - if include_optional : - return PageTiming( - on_content_load = 1.337, - on_load = 1.337, - first_input_delay = 1.337, - first_paint = 1.337, - cumulative_layout_shift = 1.337, - largest_contentful_paint = 1.337, - dom_interactive = 1.337, - first_contentful_paint = 1.337, - dns = 1.337, - ssl = 1.337, - time_to_first_byte = 1.337, - href = '' - ) - else : - return PageTiming( - ) - """ - - def testPageTiming(self): - """Test PageTiming""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_page_timings.py b/clients/python/test/test_page_timings.py deleted file mode 100644 index 94f9060ffc..0000000000 --- a/clients/python/test/test_page_timings.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestPageTimings(unittest.TestCase): - """PageTimings unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test PageTimings - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `PageTimings` - """ - model = BrowserUpMitmProxyClient.models.page_timings.PageTimings() # noqa: E501 - if include_optional : - return PageTimings( - on_content_load = -1, - on_load = -1, - href = '', - dns = -1, - ssl = -1, - time_to_first_byte = -1, - cumulative_layout_shift = -1, - largest_contentful_paint = { }, - first_paint = -1, - first_input_delay = -1, - dom_interactive = -1, - first_contentful_paint = -1, - comment = '' - ) - else : - return PageTimings( - on_content_load = -1, - on_load = -1, - ) - """ - - def testPageTimings(self): - """Test PageTimings""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_verify_result.py b/clients/python/test/test_verify_result.py deleted file mode 100644 index f30601e95f..0000000000 --- a/clients/python/test/test_verify_result.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestVerifyResult(unittest.TestCase): - """VerifyResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test VerifyResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `VerifyResult` - """ - model = BrowserUpMitmProxyClient.models.verify_result.VerifyResult() # noqa: E501 - if include_optional : - return VerifyResult( - result = True, - name = '', - type = '' - ) - else : - return VerifyResult( - ) - """ - - def testVerifyResult(self): - """Test VerifyResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/test/test_web_socket_message.py b/clients/python/test/test_web_socket_message.py deleted file mode 100644 index 66b88bfbc8..0000000000 --- a/clients/python/test/test_web_socket_message.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" -BrowserUp MitmProxy - -___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ - -The version of the OpenAPI document: 1.0.0 -Contact: developers@browserup.com -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. -""" # noqa: E501 - -import unittest - - -class TestWebSocketMessage(unittest.TestCase): - """WebSocketMessage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test WebSocketMessage - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `WebSocketMessage` - """ - model = BrowserUpMitmProxyClient.models.web_socket_message.WebSocketMessage() # noqa: E501 - if include_optional : - return WebSocketMessage( - type = '', - opcode = 1.337, - data = '', - time = 1.337 - ) - else : - return WebSocketMessage( - type = '', - opcode = 1.337, - data = '', - time = 1.337, - ) - """ - - def testWebSocketMessage(self): - """Test WebSocketMessage""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/clients/python/tox.ini b/clients/python/tox.ini deleted file mode 100644 index 034038e1e9..0000000000 --- a/clients/python/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=BrowserUpMitmProxyClient diff --git a/clients/ruby/.openapi-generator/FILES b/clients/ruby/.openapi-generator/FILES index 960d9c6b97..ca405d0af6 100644 --- a/clients/ruby/.openapi-generator/FILES +++ b/clients/ruby/.openapi-generator/FILES @@ -1,5 +1,6 @@ .gitignore .gitlab-ci.yml +.openapi-generator-ignore .rspec .rubocop.yml .travis.yml @@ -9,12 +10,12 @@ Rakefile browserup_mitmproxy_client.gemspec docs/Action.md docs/BrowserUpProxyApi.md -docs/Counter.md docs/Error.md docs/Har.md docs/HarEntry.md docs/HarEntryCache.md docs/HarEntryCacheBeforeRequest.md +docs/HarEntryCacheBeforeRequestOneOf.md docs/HarEntryRequest.md docs/HarEntryRequestCookiesInner.md docs/HarEntryRequestPostData.md @@ -28,6 +29,8 @@ docs/HarLogCreator.md docs/Header.md docs/LargestContentfulPaint.md docs/MatchCriteria.md +docs/MatchCriteriaRequestHeader.md +docs/Metric.md docs/NameValuePair.md docs/Page.md docs/PageTiming.md @@ -41,12 +44,12 @@ lib/browserup_mitmproxy_client/api_client.rb lib/browserup_mitmproxy_client/api_error.rb lib/browserup_mitmproxy_client/configuration.rb lib/browserup_mitmproxy_client/models/action.rb -lib/browserup_mitmproxy_client/models/counter.rb lib/browserup_mitmproxy_client/models/error.rb lib/browserup_mitmproxy_client/models/har.rb lib/browserup_mitmproxy_client/models/har_entry.rb lib/browserup_mitmproxy_client/models/har_entry_cache.rb lib/browserup_mitmproxy_client/models/har_entry_cache_before_request.rb +lib/browserup_mitmproxy_client/models/har_entry_cache_before_request_one_of.rb lib/browserup_mitmproxy_client/models/har_entry_request.rb lib/browserup_mitmproxy_client/models/har_entry_request_cookies_inner.rb lib/browserup_mitmproxy_client/models/har_entry_request_post_data.rb @@ -60,6 +63,8 @@ lib/browserup_mitmproxy_client/models/har_log_creator.rb lib/browserup_mitmproxy_client/models/header.rb lib/browserup_mitmproxy_client/models/largest_contentful_paint.rb lib/browserup_mitmproxy_client/models/match_criteria.rb +lib/browserup_mitmproxy_client/models/match_criteria_request_header.rb +lib/browserup_mitmproxy_client/models/metric.rb lib/browserup_mitmproxy_client/models/name_value_pair.rb lib/browserup_mitmproxy_client/models/page.rb lib/browserup_mitmproxy_client/models/page_timing.rb @@ -67,6 +72,35 @@ lib/browserup_mitmproxy_client/models/page_timings.rb lib/browserup_mitmproxy_client/models/verify_result.rb lib/browserup_mitmproxy_client/models/web_socket_message.rb lib/browserup_mitmproxy_client/version.rb +spec/api/browser_up_proxy_api_spec.rb spec/api_client_spec.rb spec/configuration_spec.rb +spec/models/action_spec.rb +spec/models/error_spec.rb +spec/models/har_entry_cache_before_request_one_of_spec.rb +spec/models/har_entry_cache_before_request_spec.rb +spec/models/har_entry_cache_spec.rb +spec/models/har_entry_request_cookies_inner_spec.rb +spec/models/har_entry_request_post_data_params_inner_spec.rb +spec/models/har_entry_request_post_data_spec.rb +spec/models/har_entry_request_query_string_inner_spec.rb +spec/models/har_entry_request_spec.rb +spec/models/har_entry_response_content_spec.rb +spec/models/har_entry_response_spec.rb +spec/models/har_entry_spec.rb +spec/models/har_entry_timings_spec.rb +spec/models/har_log_creator_spec.rb +spec/models/har_log_spec.rb +spec/models/har_spec.rb +spec/models/header_spec.rb +spec/models/largest_contentful_paint_spec.rb +spec/models/match_criteria_request_header_spec.rb +spec/models/match_criteria_spec.rb +spec/models/metric_spec.rb +spec/models/name_value_pair_spec.rb +spec/models/page_spec.rb +spec/models/page_timing_spec.rb +spec/models/page_timings_spec.rb +spec/models/verify_result_spec.rb +spec/models/web_socket_message_spec.rb spec/spec_helper.rb diff --git a/clients/ruby/.openapi-generator/VERSION b/clients/ruby/.openapi-generator/VERSION index 4122521804..c0be8a7992 100644 --- a/clients/ruby/.openapi-generator/VERSION +++ b/clients/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.0 \ No newline at end of file +6.4.0 \ No newline at end of file diff --git a/clients/ruby/README.md b/clients/ruby/README.md index ceaddc3ebe..2f88a5317b 100644 --- a/clients/ruby/README.md +++ b/clients/ruby/README.md @@ -11,7 +11,7 @@ ___ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 1.0.0 +- API version: 1.24 - Package version: 1.1 - Build package: org.openapitools.codegen.languages.RubyClientCodegen @@ -62,12 +62,12 @@ Please follow the [installation](#installation) procedure and then run the follo require 'browserup_mitmproxy_client' api_instance = BrowserupMitmProxy::BrowserUpProxyApi.new -counter = BrowserupMitmProxy::Counter.new # Counter | Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key +error = BrowserupMitmProxy::Error.new # Error | Receives an error to track. Internally, the error is stored in an array in the har under the _errors key begin - api_instance.add_counter(counter) + api_instance.add_error(error) rescue BrowserupMitmProxy::ApiError => e - puts "Exception when calling BrowserUpProxyApi->add_counter: #{e}" + puts "Exception when calling BrowserUpProxyApi->add_error: #{e}" end ``` @@ -78,8 +78,8 @@ All URIs are relative to *http://localhost:48088* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*BrowserupMitmProxy::BrowserUpProxyApi* | [**add_counter**](docs/BrowserUpProxyApi.md#add_counter) | **POST** /har/counters | *BrowserupMitmProxy::BrowserUpProxyApi* | [**add_error**](docs/BrowserUpProxyApi.md#add_error) | **POST** /har/errors | +*BrowserupMitmProxy::BrowserUpProxyApi* | [**add_metric**](docs/BrowserUpProxyApi.md#add_metric) | **POST** /har/metrics | *BrowserupMitmProxy::BrowserUpProxyApi* | [**get_har_log**](docs/BrowserUpProxyApi.md#get_har_log) | **GET** /har | *BrowserupMitmProxy::BrowserUpProxyApi* | [**healthcheck**](docs/BrowserUpProxyApi.md#healthcheck) | **GET** /healthcheck | *BrowserupMitmProxy::BrowserUpProxyApi* | [**new_page**](docs/BrowserUpProxyApi.md#new_page) | **POST** /har/page | @@ -93,12 +93,12 @@ Class | Method | HTTP request | Description ## Documentation for Models - [BrowserupMitmProxy::Action](docs/Action.md) - - [BrowserupMitmProxy::Counter](docs/Counter.md) - [BrowserupMitmProxy::Error](docs/Error.md) - [BrowserupMitmProxy::Har](docs/Har.md) - [BrowserupMitmProxy::HarEntry](docs/HarEntry.md) - [BrowserupMitmProxy::HarEntryCache](docs/HarEntryCache.md) - [BrowserupMitmProxy::HarEntryCacheBeforeRequest](docs/HarEntryCacheBeforeRequest.md) + - [BrowserupMitmProxy::HarEntryCacheBeforeRequestOneOf](docs/HarEntryCacheBeforeRequestOneOf.md) - [BrowserupMitmProxy::HarEntryRequest](docs/HarEntryRequest.md) - [BrowserupMitmProxy::HarEntryRequestCookiesInner](docs/HarEntryRequestCookiesInner.md) - [BrowserupMitmProxy::HarEntryRequestPostData](docs/HarEntryRequestPostData.md) @@ -112,6 +112,8 @@ Class | Method | HTTP request | Description - [BrowserupMitmProxy::Header](docs/Header.md) - [BrowserupMitmProxy::LargestContentfulPaint](docs/LargestContentfulPaint.md) - [BrowserupMitmProxy::MatchCriteria](docs/MatchCriteria.md) + - [BrowserupMitmProxy::MatchCriteriaRequestHeader](docs/MatchCriteriaRequestHeader.md) + - [BrowserupMitmProxy::Metric](docs/Metric.md) - [BrowserupMitmProxy::NameValuePair](docs/NameValuePair.md) - [BrowserupMitmProxy::Page](docs/Page.md) - [BrowserupMitmProxy::PageTiming](docs/PageTiming.md) @@ -122,5 +124,5 @@ Class | Method | HTTP request | Description ## Documentation for Authorization -Endpoints do not require authorization. + All endpoints do not require authorization. diff --git a/clients/ruby/browserup_mitmproxy_client.gemspec b/clients/ruby/browserup_mitmproxy_client.gemspec index 1b52bce611..d15369ed93 100644 --- a/clients/ruby/browserup_mitmproxy_client.gemspec +++ b/clients/ruby/browserup_mitmproxy_client.gemspec @@ -5,10 +5,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end diff --git a/clients/ruby/docs/BrowserUpProxyApi.md b/clients/ruby/docs/BrowserUpProxyApi.md index a785cc3761..b6e200c257 100644 --- a/clients/ruby/docs/BrowserUpProxyApi.md +++ b/clients/ruby/docs/BrowserUpProxyApi.md @@ -4,8 +4,8 @@ All URIs are relative to *http://localhost:48088* | Method | HTTP request | Description | | ------ | ------------ | ----------- | -| [**add_counter**](BrowserUpProxyApi.md#add_counter) | **POST** /har/counters | | | [**add_error**](BrowserUpProxyApi.md#add_error) | **POST** /har/errors | | +| [**add_metric**](BrowserUpProxyApi.md#add_metric) | **POST** /har/metrics | | | [**get_har_log**](BrowserUpProxyApi.md#get_har_log) | **GET** /har | | | [**healthcheck**](BrowserUpProxyApi.md#healthcheck) | **GET** /healthcheck | | | [**new_page**](BrowserUpProxyApi.md#new_page) | **POST** /har/page | | @@ -16,13 +16,13 @@ All URIs are relative to *http://localhost:48088* | [**verify_sla**](BrowserUpProxyApi.md#verify_sla) | **POST** /verify/sla/{time}/{name} | | -## add_counter +## add_error -> add_counter(counter) +> add_error(error) -Add Custom Counter to the captured traffic har +Add Custom Error to the captured traffic har ### Examples @@ -31,31 +31,31 @@ require 'time' require 'browserup_mitmproxy_client' api_instance = BrowserupMitmProxy::BrowserUpProxyApi.new -counter = BrowserupMitmProxy::Counter.new # Counter | Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key +error = BrowserupMitmProxy::Error.new # Error | Receives an error to track. Internally, the error is stored in an array in the har under the _errors key begin - api_instance.add_counter(counter) + api_instance.add_error(error) rescue BrowserupMitmProxy::ApiError => e - puts "Error when calling BrowserUpProxyApi->add_counter: #{e}" + puts "Error when calling BrowserUpProxyApi->add_error: #{e}" end ``` -#### Using the add_counter_with_http_info variant +#### Using the add_error_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. -> add_counter_with_http_info(counter) +> add_error_with_http_info(error) ```ruby begin - data, status_code, headers = api_instance.add_counter_with_http_info(counter) + data, status_code, headers = api_instance.add_error_with_http_info(error) p status_code # => 2xx p headers # => { ... } p data # => nil rescue BrowserupMitmProxy::ApiError => e - puts "Error when calling BrowserUpProxyApi->add_counter_with_http_info: #{e}" + puts "Error when calling BrowserUpProxyApi->add_error_with_http_info: #{e}" end ``` @@ -63,7 +63,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **counter** | [**Counter**](Counter.md) | Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key | | +| **error** | [**Error**](Error.md) | Receives an error to track. Internally, the error is stored in an array in the har under the _errors key | | ### Return type @@ -79,13 +79,13 @@ No authorization required - **Accept**: Not defined -## add_error +## add_metric -> add_error(error) +> add_metric(metric) -Add Custom Error to the captured traffic har +Add Custom Metric to the captured traffic har ### Examples @@ -94,31 +94,31 @@ require 'time' require 'browserup_mitmproxy_client' api_instance = BrowserupMitmProxy::BrowserUpProxyApi.new -error = BrowserupMitmProxy::Error.new # Error | Receives an error to track. Internally, the error is stored in an array in the har under the _errors key +metric = BrowserupMitmProxy::Metric.new # Metric | Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key begin - api_instance.add_error(error) + api_instance.add_metric(metric) rescue BrowserupMitmProxy::ApiError => e - puts "Error when calling BrowserUpProxyApi->add_error: #{e}" + puts "Error when calling BrowserUpProxyApi->add_metric: #{e}" end ``` -#### Using the add_error_with_http_info variant +#### Using the add_metric_with_http_info variant This returns an Array which contains the response data (`nil` in this case), status code and headers. -> add_error_with_http_info(error) +> add_metric_with_http_info(metric) ```ruby begin - data, status_code, headers = api_instance.add_error_with_http_info(error) + data, status_code, headers = api_instance.add_metric_with_http_info(metric) p status_code # => 2xx p headers # => { ... } p data # => nil rescue BrowserupMitmProxy::ApiError => e - puts "Error when calling BrowserUpProxyApi->add_error_with_http_info: #{e}" + puts "Error when calling BrowserUpProxyApi->add_metric_with_http_info: #{e}" end ``` @@ -126,7 +126,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **error** | [**Error**](Error.md) | Receives an error to track. Internally, the error is stored in an array in the har under the _errors key | | +| **metric** | [**Metric**](Metric.md) | Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key | | ### Return type diff --git a/clients/ruby/docs/Counter.md b/clients/ruby/docs/Counter.md deleted file mode 100644 index 828d9a11a8..0000000000 --- a/clients/ruby/docs/Counter.md +++ /dev/null @@ -1,20 +0,0 @@ -# BrowserupMitmProxy::Counter - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **name** | **String** | Name of Custom Counter to add to the page under _counters | [optional] | -| **value** | **Float** | Value for the counter | [optional] | - -## Example - -```ruby -require 'browserup_mitmproxy_client' - -instance = BrowserupMitmProxy::Counter.new( - name: null, - value: null -) -``` - diff --git a/clients/ruby/docs/HarEntryCacheBeforeRequest.md b/clients/ruby/docs/HarEntryCacheBeforeRequest.md index 2905acab05..552bf16b2b 100644 --- a/clients/ruby/docs/HarEntryCacheBeforeRequest.md +++ b/clients/ruby/docs/HarEntryCacheBeforeRequest.md @@ -1,26 +1,49 @@ # BrowserupMitmProxy::HarEntryCacheBeforeRequest -## Properties +## Class instance methods -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **expires** | **String** | | [optional] | -| **last_access** | **String** | | | -| **e_tag** | **String** | | | -| **hit_count** | **Integer** | | | -| **comment** | **String** | | [optional] | +### `openapi_one_of` -## Example +Returns the list of classes defined in oneOf. + +#### Example + +```ruby +require 'browserup_mitmproxy_client' + +BrowserupMitmProxy::HarEntryCacheBeforeRequest.openapi_one_of +# => +# [ +# :'HarEntryCacheBeforeRequestOneOf', +# :'Null' +# ] +``` + +### build + +Find the appropriate object from the `openapi_one_of` list and casts the data into it. + +#### Example ```ruby require 'browserup_mitmproxy_client' -instance = BrowserupMitmProxy::HarEntryCacheBeforeRequest.new( - expires: null, - last_access: null, - e_tag: null, - hit_count: null, - comment: null -) +BrowserupMitmProxy::HarEntryCacheBeforeRequest.build(data) +# => # + +BrowserupMitmProxy::HarEntryCacheBeforeRequest.build(data_that_doesnt_match) +# => nil ``` +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| **data** | **Mixed** | data to be matched against the list of oneOf items | + +#### Return type + +- `HarEntryCacheBeforeRequestOneOf` +- `Null` +- `nil` (if no type matches) + diff --git a/clients/ruby/docs/MatchCriteria.md b/clients/ruby/docs/MatchCriteria.md index 893bbba52b..30a11bfaa2 100644 --- a/clients/ruby/docs/MatchCriteria.md +++ b/clients/ruby/docs/MatchCriteria.md @@ -10,10 +10,10 @@ | **content** | **String** | Body content regexp content to match | [optional] | | **content_type** | **String** | Content type | [optional] | | **websocket_message** | **String** | Websocket message text to match | [optional] | -| **request_header** | [**NameValuePair**](NameValuePair.md) | | [optional] | -| **request_cookie** | [**NameValuePair**](NameValuePair.md) | | [optional] | -| **response_header** | [**NameValuePair**](NameValuePair.md) | | [optional] | -| **response_cookie** | [**NameValuePair**](NameValuePair.md) | | [optional] | +| **request_header** | [**MatchCriteriaRequestHeader**](MatchCriteriaRequestHeader.md) | | [optional] | +| **request_cookie** | [**MatchCriteriaRequestHeader**](MatchCriteriaRequestHeader.md) | | [optional] | +| **response_header** | [**MatchCriteriaRequestHeader**](MatchCriteriaRequestHeader.md) | | [optional] | +| **response_cookie** | [**MatchCriteriaRequestHeader**](MatchCriteriaRequestHeader.md) | | [optional] | | **json_valid** | **Boolean** | Is valid JSON | [optional] | | **json_path** | **String** | Has JSON path | [optional] | | **json_schema** | **String** | Validates against passed JSON schema | [optional] | diff --git a/clients/ruby/docs/Metric.md b/clients/ruby/docs/Metric.md new file mode 100644 index 0000000000..76faa6cafb --- /dev/null +++ b/clients/ruby/docs/Metric.md @@ -0,0 +1,20 @@ +# BrowserupMitmProxy::Metric + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | Name of Custom Metric to add to the page under _metrics | [optional] | +| **value** | **Float** | Value for the metric | [optional] | + +## Example + +```ruby +require 'browserup_mitmproxy_client' + +instance = BrowserupMitmProxy::Metric.new( + name: null, + value: null +) +``` + diff --git a/clients/ruby/docs/Page.md b/clients/ruby/docs/Page.md index 322ba1fef2..dde67413f0 100644 --- a/clients/ruby/docs/Page.md +++ b/clients/ruby/docs/Page.md @@ -8,7 +8,7 @@ | **id** | **String** | | | | **title** | **String** | | | | **_verifications** | [**Array<VerifyResult>**](VerifyResult.md) | | [optional] | -| **_counters** | [**Array<Counter>**](Counter.md) | | [optional] | +| **_metrics** | [**Array<Metric>**](Metric.md) | | [optional] | | **_errors** | [**Array<Error>**](Error.md) | | [optional] | | **page_timings** | [**PageTimings**](PageTimings.md) | | | | **comment** | **String** | | [optional] | @@ -23,7 +23,7 @@ instance = BrowserupMitmProxy::Page.new( id: null, title: null, _verifications: null, - _counters: null, + _metrics: null, _errors: null, page_timings: null, comment: null diff --git a/clients/ruby/lib/browserup_mitmproxy_client.rb b/clients/ruby/lib/browserup_mitmproxy_client.rb index 622fb1ce44..ea5fcdd2a4 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -18,12 +18,12 @@ # Models require 'browserup_mitmproxy_client/models/action' -require 'browserup_mitmproxy_client/models/counter' require 'browserup_mitmproxy_client/models/error' require 'browserup_mitmproxy_client/models/har' require 'browserup_mitmproxy_client/models/har_entry' require 'browserup_mitmproxy_client/models/har_entry_cache' require 'browserup_mitmproxy_client/models/har_entry_cache_before_request' +require 'browserup_mitmproxy_client/models/har_entry_cache_before_request_one_of' require 'browserup_mitmproxy_client/models/har_entry_request' require 'browserup_mitmproxy_client/models/har_entry_request_cookies_inner' require 'browserup_mitmproxy_client/models/har_entry_request_post_data' @@ -37,6 +37,8 @@ require 'browserup_mitmproxy_client/models/header' require 'browserup_mitmproxy_client/models/largest_contentful_paint' require 'browserup_mitmproxy_client/models/match_criteria' +require 'browserup_mitmproxy_client/models/match_criteria_request_header' +require 'browserup_mitmproxy_client/models/metric' require 'browserup_mitmproxy_client/models/name_value_pair' require 'browserup_mitmproxy_client/models/page' require 'browserup_mitmproxy_client/models/page_timing' diff --git a/clients/ruby/lib/browserup_mitmproxy_client/api/browser_up_proxy_api.rb b/clients/ruby/lib/browserup_mitmproxy_client/api/browser_up_proxy_api.rb index b7a54fe68b..fb71831afc 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/api/browser_up_proxy_api.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/api/browser_up_proxy_api.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -19,29 +19,29 @@ class BrowserUpProxyApi def initialize(api_client = ApiClient.default) @api_client = api_client end - # Add Custom Counter to the captured traffic har - # @param counter [Counter] Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key + # Add Custom Error to the captured traffic har + # @param error [Error] Receives an error to track. Internally, the error is stored in an array in the har under the _errors key # @param [Hash] opts the optional parameters # @return [nil] - def add_counter(counter, opts = {}) - add_counter_with_http_info(counter, opts) + def add_error(error, opts = {}) + add_error_with_http_info(error, opts) nil end - # Add Custom Counter to the captured traffic har - # @param counter [Counter] Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key + # Add Custom Error to the captured traffic har + # @param error [Error] Receives an error to track. Internally, the error is stored in an array in the har under the _errors key # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def add_counter_with_http_info(counter, opts = {}) + def add_error_with_http_info(error, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: BrowserUpProxyApi.add_counter ...' + @api_client.config.logger.debug 'Calling API: BrowserUpProxyApi.add_error ...' end - # verify the required parameter 'counter' is set - if @api_client.config.client_side_validation && counter.nil? - fail ArgumentError, "Missing the required parameter 'counter' when calling BrowserUpProxyApi.add_counter" + # verify the required parameter 'error' is set + if @api_client.config.client_side_validation && error.nil? + fail ArgumentError, "Missing the required parameter 'error' when calling BrowserUpProxyApi.add_error" end # resource path - local_var_path = '/har/counters' + local_var_path = '/har/errors' # query parameters query_params = opts[:query_params] || {} @@ -58,7 +58,7 @@ def add_counter_with_http_info(counter, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(counter) + post_body = opts[:debug_body] || @api_client.object_to_http_body(error) # return_type return_type = opts[:debug_return_type] @@ -67,7 +67,7 @@ def add_counter_with_http_info(counter, opts = {}) auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( - :operation => :"BrowserUpProxyApi.add_counter", + :operation => :"BrowserUpProxyApi.add_error", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -78,34 +78,34 @@ def add_counter_with_http_info(counter, opts = {}) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: BrowserUpProxyApi#add_counter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: BrowserUpProxyApi#add_error\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Add Custom Error to the captured traffic har - # @param error [Error] Receives an error to track. Internally, the error is stored in an array in the har under the _errors key + # Add Custom Metric to the captured traffic har + # @param metric [Metric] Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key # @param [Hash] opts the optional parameters # @return [nil] - def add_error(error, opts = {}) - add_error_with_http_info(error, opts) + def add_metric(metric, opts = {}) + add_metric_with_http_info(metric, opts) nil end - # Add Custom Error to the captured traffic har - # @param error [Error] Receives an error to track. Internally, the error is stored in an array in the har under the _errors key + # Add Custom Metric to the captured traffic har + # @param metric [Metric] Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def add_error_with_http_info(error, opts = {}) + def add_metric_with_http_info(metric, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: BrowserUpProxyApi.add_error ...' + @api_client.config.logger.debug 'Calling API: BrowserUpProxyApi.add_metric ...' end - # verify the required parameter 'error' is set - if @api_client.config.client_side_validation && error.nil? - fail ArgumentError, "Missing the required parameter 'error' when calling BrowserUpProxyApi.add_error" + # verify the required parameter 'metric' is set + if @api_client.config.client_side_validation && metric.nil? + fail ArgumentError, "Missing the required parameter 'metric' when calling BrowserUpProxyApi.add_metric" end # resource path - local_var_path = '/har/errors' + local_var_path = '/har/metrics' # query parameters query_params = opts[:query_params] || {} @@ -122,7 +122,7 @@ def add_error_with_http_info(error, opts = {}) form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(error) + post_body = opts[:debug_body] || @api_client.object_to_http_body(metric) # return_type return_type = opts[:debug_return_type] @@ -131,7 +131,7 @@ def add_error_with_http_info(error, opts = {}) auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( - :operation => :"BrowserUpProxyApi.add_error", + :operation => :"BrowserUpProxyApi.add_metric", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -142,7 +142,7 @@ def add_error_with_http_info(error, opts = {}) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: BrowserUpProxyApi#add_error\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: BrowserUpProxyApi#add_metric\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end diff --git a/clients/ruby/lib/browserup_mitmproxy_client/api_client.rb b/clients/ruby/lib/browserup_mitmproxy_client/api_client.rb index c80af92cee..ed5ff48e91 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/api_client.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/api_client.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end diff --git a/clients/ruby/lib/browserup_mitmproxy_client/api_error.rb b/clients/ruby/lib/browserup_mitmproxy_client/api_error.rb index a2ea436f13..551c986ed0 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/api_error.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/api_error.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end diff --git a/clients/ruby/lib/browserup_mitmproxy_client/configuration.rb b/clients/ruby/lib/browserup_mitmproxy_client/configuration.rb index 0a9746d668..a0ea1ec42c 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/configuration.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/configuration.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -67,11 +67,6 @@ class Configuration # @return [Proc] attr_accessor :access_token_getter - # Set this to return data as binary instead of downloading a temp file. When enabled (set to true) - # HTTP responses with return type `File` will be returned as a stream of binary data. - # Default to false. - attr_accessor :return_binary_data - # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response # details will be logged with `logger.debug` (see the `logger` attribute). # Default to false. @@ -152,7 +147,7 @@ def initialize @scheme = 'http' @host = 'localhost:48088' @base_path = '' - @server_index = nil + @server_index = 0 @server_operation_index = {} @server_variables = {} @server_operation_variables = {} @@ -200,12 +195,10 @@ def base_path=(base_path) # Returns base URL for specified operation based on server settings def base_url(operation = nil) - if operation_server_settings.key?(operation) then - index = server_operation_index.fetch(operation, server_index) - server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) - else - server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil) - end + index = server_operation_index.fetch(operation, server_index) + return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil + + server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation]) end # Gets API key (with prefix if set). @@ -269,8 +262,8 @@ def server_url(index, variables = {}, servers = nil) servers = server_settings if servers == nil # check array index out of bound - if (index.nil? || index < 0 || index >= servers.size) - fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}" + if (index < 0 || index >= servers.size) + fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}" end server = servers[index] diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/action.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/action.rb index b36390ed22..79eecb8a44 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/action.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/action.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -121,7 +121,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -129,7 +128,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -164,30 +162,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/error.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/error.rb index 7f69d79067..5156802c3c 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/error.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/error.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -75,7 +75,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -83,7 +82,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -112,30 +110,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/har.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/har.rb index e0ae2dd1b4..0d1ab7e1c0 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/har.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/har.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -59,15 +59,12 @@ def initialize(attributes = {}) if attributes.key?(:'log') self.log = attributes[:'log'] - else - self.log = nil end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @log.nil? invalid_properties.push('invalid value for "log", log cannot be nil.') @@ -79,7 +76,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' return false if @log.nil? true end @@ -108,30 +104,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry.rb index 203521e2d1..0cc572a205 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -103,38 +103,26 @@ def initialize(attributes = {}) if attributes.key?(:'started_date_time') self.started_date_time = attributes[:'started_date_time'] - else - self.started_date_time = nil end if attributes.key?(:'time') self.time = attributes[:'time'] - else - self.time = nil end if attributes.key?(:'request') self.request = attributes[:'request'] - else - self.request = nil end if attributes.key?(:'response') self.response = attributes[:'response'] - else - self.response = nil end if attributes.key?(:'cache') self.cache = attributes[:'cache'] - else - self.cache = nil end if attributes.key?(:'timings') self.timings = attributes[:'timings'] - else - self.timings = nil end if attributes.key?(:'server_ip_address') @@ -159,7 +147,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @started_date_time.nil? invalid_properties.push('invalid value for "started_date_time", started_date_time cannot be nil.') @@ -195,7 +182,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' return false if @started_date_time.nil? return false if @time.nil? return false if @time < 0 @@ -254,30 +240,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_cache.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_cache.rb index fac0ea80c1..2f67f133b1 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_cache.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_cache.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -47,8 +47,6 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ - :'before_request', - :'after_request', ]) end @@ -83,7 +81,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -91,7 +88,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -121,30 +117,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_cache_before_request.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_cache_before_request.rb index f0fdfeffc2..4eca1c6156 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_cache_before_request.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_cache_before_request.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -14,258 +14,92 @@ require 'time' module BrowserupMitmProxy - class HarEntryCacheBeforeRequest - attr_accessor :expires - - attr_accessor :last_access - - attr_accessor :e_tag - - attr_accessor :hit_count - - attr_accessor :comment - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'expires' => :'expires', - :'last_access' => :'lastAccess', - :'e_tag' => :'eTag', - :'hit_count' => :'hitCount', - :'comment' => :'comment' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'expires' => :'String', - :'last_access' => :'String', - :'e_tag' => :'String', - :'hit_count' => :'Integer', - :'comment' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `BrowserupMitmProxy::HarEntryCacheBeforeRequest` initialize method" + module HarEntryCacheBeforeRequest + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'HarEntryCacheBeforeRequestOneOf', + :'Null' + ] end - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `BrowserupMitmProxy::HarEntryCacheBeforeRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end end - h[k.to_sym] = v - } - - if attributes.key?(:'expires') - self.expires = attributes[:'expires'] - end - - if attributes.key?(:'last_access') - self.last_access = attributes[:'last_access'] - else - self.last_access = nil - end - - if attributes.key?(:'e_tag') - self.e_tag = attributes[:'e_tag'] - else - self.e_tag = nil - end - - if attributes.key?(:'hit_count') - self.hit_count = attributes[:'hit_count'] - else - self.hit_count = nil - end - - if attributes.key?(:'comment') - self.comment = attributes[:'comment'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new - if @last_access.nil? - invalid_properties.push('invalid value for "last_access", last_access cannot be nil.') - end - - if @e_tag.nil? - invalid_properties.push('invalid value for "e_tag", e_tag cannot be nil.') - end - if @hit_count.nil? - invalid_properties.push('invalid value for "hit_count", hit_count cannot be nil.') + openapi_one_of.include?(:AnyType) ? data : nil end - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' - return false if @last_access.nil? - return false if @e_tag.nil? - return false if @hit_count.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - expires == o.expires && - last_access == o.last_access && - e_tag == o.e_tag && - hit_count == o.hit_count && - comment == o.comment - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [expires, last_access, e_tag, hit_count, comment].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass, data) + return if data.nil? + + case klass.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type, item) } end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) - end - end - new(transformed_hash) - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } + end + else # model + const = BrowserupMitmProxy.const_get(klass) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + raise unless (data.keys - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model && model.valid? + end end - end - else # model - # models (e.g. Pet) or oneOf - klass = BrowserupMitmProxy.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end - hash[param] = _to_hash(value) + raise # if no match by now, raise + rescue + raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" end - hash end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - end end diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_cache_before_request_one_of.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_cache_before_request_one_of.rb index 9c7fae2684..78d61bdd3e 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_cache_before_request_one_of.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_cache_before_request_one_of.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.6.0 +OpenAPI Generator version: 6.4.0 =end diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request.rb index 74e85608fb..08dc7ddf9c 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -95,44 +95,32 @@ def initialize(attributes = {}) if attributes.key?(:'method') self.method = attributes[:'method'] - else - self.method = nil end if attributes.key?(:'url') self.url = attributes[:'url'] - else - self.url = nil end if attributes.key?(:'http_version') self.http_version = attributes[:'http_version'] - else - self.http_version = nil end if attributes.key?(:'cookies') if (value = attributes[:'cookies']).is_a?(Array) self.cookies = value end - else - self.cookies = nil end if attributes.key?(:'headers') if (value = attributes[:'headers']).is_a?(Array) self.headers = value end - else - self.headers = nil end if attributes.key?(:'query_string') if (value = attributes[:'query_string']).is_a?(Array) self.query_string = value end - else - self.query_string = nil end if attributes.key?(:'post_data') @@ -141,14 +129,10 @@ def initialize(attributes = {}) if attributes.key?(:'headers_size') self.headers_size = attributes[:'headers_size'] - else - self.headers_size = nil end if attributes.key?(:'body_size') self.body_size = attributes[:'body_size'] - else - self.body_size = nil end if attributes.key?(:'comment') @@ -159,7 +143,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @method.nil? invalid_properties.push('invalid value for "method", method cannot be nil.') @@ -199,7 +182,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' return false if @method.nil? return false if @url.nil? return false if @http_version.nil? @@ -244,30 +226,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request_cookies_inner.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request_cookies_inner.rb index 991719c4b9..1e7977917f 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request_cookies_inner.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request_cookies_inner.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -87,14 +87,10 @@ def initialize(attributes = {}) if attributes.key?(:'name') self.name = attributes[:'name'] - else - self.name = nil end if attributes.key?(:'value') self.value = attributes[:'value'] - else - self.value = nil end if attributes.key?(:'path') @@ -125,7 +121,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') @@ -141,7 +136,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' return false if @name.nil? return false if @value.nil? true @@ -178,30 +172,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request_post_data.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request_post_data.rb index 26f5009df5..8019a5dccc 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request_post_data.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request_post_data.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -68,8 +68,6 @@ def initialize(attributes = {}) if attributes.key?(:'mime_type') self.mime_type = attributes[:'mime_type'] - else - self.mime_type = nil end if attributes.key?(:'text') @@ -86,7 +84,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @mime_type.nil? invalid_properties.push('invalid value for "mime_type", mime_type cannot be nil.') @@ -98,7 +95,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' return false if @mime_type.nil? true end @@ -129,30 +125,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request_post_data_params_inner.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request_post_data_params_inner.rb index 6af5f302b8..09bfe53abc 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request_post_data_params_inner.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request_post_data_params_inner.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -97,7 +97,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -105,7 +104,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -137,30 +135,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request_query_string_inner.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request_query_string_inner.rb index 39c50c3e30..39053c2a76 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request_query_string_inner.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_request_query_string_inner.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -67,14 +67,10 @@ def initialize(attributes = {}) if attributes.key?(:'name') self.name = attributes[:'name'] - else - self.name = nil end if attributes.key?(:'value') self.value = attributes[:'value'] - else - self.value = nil end if attributes.key?(:'comment') @@ -85,7 +81,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') @@ -101,7 +96,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' return false if @name.nil? return false if @value.nil? true @@ -133,30 +127,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_response.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_response.rb index fb28b9d8b8..5e98298e9d 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_response.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_response.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -95,60 +95,42 @@ def initialize(attributes = {}) if attributes.key?(:'status') self.status = attributes[:'status'] - else - self.status = nil end if attributes.key?(:'status_text') self.status_text = attributes[:'status_text'] - else - self.status_text = nil end if attributes.key?(:'http_version') self.http_version = attributes[:'http_version'] - else - self.http_version = nil end if attributes.key?(:'cookies') if (value = attributes[:'cookies']).is_a?(Array) self.cookies = value end - else - self.cookies = nil end if attributes.key?(:'headers') if (value = attributes[:'headers']).is_a?(Array) self.headers = value end - else - self.headers = nil end if attributes.key?(:'content') self.content = attributes[:'content'] - else - self.content = nil end if attributes.key?(:'redirect_url') self.redirect_url = attributes[:'redirect_url'] - else - self.redirect_url = nil end if attributes.key?(:'headers_size') self.headers_size = attributes[:'headers_size'] - else - self.headers_size = nil end if attributes.key?(:'body_size') self.body_size = attributes[:'body_size'] - else - self.body_size = nil end if attributes.key?(:'comment') @@ -159,7 +141,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @status.nil? invalid_properties.push('invalid value for "status", status cannot be nil.') @@ -203,7 +184,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' return false if @status.nil? return false if @status_text.nil? return false if @http_version.nil? @@ -249,30 +229,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_response_content.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_response_content.rb index bbbd139861..0e3aa6b04c 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_response_content.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_response_content.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -111,8 +111,6 @@ def initialize(attributes = {}) if attributes.key?(:'size') self.size = attributes[:'size'] - else - self.size = nil end if attributes.key?(:'compression') @@ -121,8 +119,6 @@ def initialize(attributes = {}) if attributes.key?(:'mime_type') self.mime_type = attributes[:'mime_type'] - else - self.mime_type = nil end if attributes.key?(:'text') @@ -189,7 +185,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @size.nil? invalid_properties.push('invalid value for "size", size cannot be nil.') @@ -237,7 +232,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' return false if @size.nil? return false if @mime_type.nil? return false if !@_video_buffered_percent.nil? && @_video_buffered_percent < -1 @@ -254,11 +248,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] _video_buffered_percent Value to be assigned def _video_buffered_percent=(_video_buffered_percent) - if _video_buffered_percent.nil? - fail ArgumentError, '_video_buffered_percent cannot be nil' - end - - if _video_buffered_percent < -1 + if !_video_buffered_percent.nil? && _video_buffered_percent < -1 fail ArgumentError, 'invalid value for "_video_buffered_percent", must be greater than or equal to -1.' end @@ -268,11 +258,7 @@ def _video_buffered_percent=(_video_buffered_percent) # Custom attribute writer method with validation # @param [Object] _video_stall_count Value to be assigned def _video_stall_count=(_video_stall_count) - if _video_stall_count.nil? - fail ArgumentError, '_video_stall_count cannot be nil' - end - - if _video_stall_count < -1 + if !_video_stall_count.nil? && _video_stall_count < -1 fail ArgumentError, 'invalid value for "_video_stall_count", must be greater than or equal to -1.' end @@ -282,11 +268,7 @@ def _video_stall_count=(_video_stall_count) # Custom attribute writer method with validation # @param [Object] _video_decoded_byte_count Value to be assigned def _video_decoded_byte_count=(_video_decoded_byte_count) - if _video_decoded_byte_count.nil? - fail ArgumentError, '_video_decoded_byte_count cannot be nil' - end - - if _video_decoded_byte_count < -1 + if !_video_decoded_byte_count.nil? && _video_decoded_byte_count < -1 fail ArgumentError, 'invalid value for "_video_decoded_byte_count", must be greater than or equal to -1.' end @@ -296,11 +278,7 @@ def _video_decoded_byte_count=(_video_decoded_byte_count) # Custom attribute writer method with validation # @param [Object] _video_waiting_count Value to be assigned def _video_waiting_count=(_video_waiting_count) - if _video_waiting_count.nil? - fail ArgumentError, '_video_waiting_count cannot be nil' - end - - if _video_waiting_count < -1 + if !_video_waiting_count.nil? && _video_waiting_count < -1 fail ArgumentError, 'invalid value for "_video_waiting_count", must be greater than or equal to -1.' end @@ -310,11 +288,7 @@ def _video_waiting_count=(_video_waiting_count) # Custom attribute writer method with validation # @param [Object] _video_error_count Value to be assigned def _video_error_count=(_video_error_count) - if _video_error_count.nil? - fail ArgumentError, '_video_error_count cannot be nil' - end - - if _video_error_count < -1 + if !_video_error_count.nil? && _video_error_count < -1 fail ArgumentError, 'invalid value for "_video_error_count", must be greater than or equal to -1.' end @@ -324,11 +298,7 @@ def _video_error_count=(_video_error_count) # Custom attribute writer method with validation # @param [Object] _video_dropped_frames Value to be assigned def _video_dropped_frames=(_video_dropped_frames) - if _video_dropped_frames.nil? - fail ArgumentError, '_video_dropped_frames cannot be nil' - end - - if _video_dropped_frames < -1 + if !_video_dropped_frames.nil? && _video_dropped_frames < -1 fail ArgumentError, 'invalid value for "_video_dropped_frames", must be greater than or equal to -1.' end @@ -338,11 +308,7 @@ def _video_dropped_frames=(_video_dropped_frames) # Custom attribute writer method with validation # @param [Object] _video_total_frames Value to be assigned def _video_total_frames=(_video_total_frames) - if _video_total_frames.nil? - fail ArgumentError, '_video_total_frames cannot be nil' - end - - if _video_total_frames < -1 + if !_video_total_frames.nil? && _video_total_frames < -1 fail ArgumentError, 'invalid value for "_video_total_frames", must be greater than or equal to -1.' end @@ -352,11 +318,7 @@ def _video_total_frames=(_video_total_frames) # Custom attribute writer method with validation # @param [Object] _video_audio_bytes_decoded Value to be assigned def _video_audio_bytes_decoded=(_video_audio_bytes_decoded) - if _video_audio_bytes_decoded.nil? - fail ArgumentError, '_video_audio_bytes_decoded cannot be nil' - end - - if _video_audio_bytes_decoded < -1 + if !_video_audio_bytes_decoded.nil? && _video_audio_bytes_decoded < -1 fail ArgumentError, 'invalid value for "_video_audio_bytes_decoded", must be greater than or equal to -1.' end @@ -400,30 +362,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_timings.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_timings.rb index d3aeabd9bb..7a891c5db5 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_timings.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/har_entry_timings.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -135,7 +135,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @dns.nil? invalid_properties.push('invalid value for "dns", dns cannot be nil.') @@ -199,7 +198,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' return false if @dns.nil? return false if @dns < -1 return false if @connect.nil? @@ -346,30 +344,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/har_log.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/har_log.rb index f67126d219..292dbeab65 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/har_log.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/har_log.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -79,14 +79,10 @@ def initialize(attributes = {}) if attributes.key?(:'version') self.version = attributes[:'version'] - else - self.version = nil end if attributes.key?(:'creator') self.creator = attributes[:'creator'] - else - self.creator = nil end if attributes.key?(:'browser') @@ -97,16 +93,12 @@ def initialize(attributes = {}) if (value = attributes[:'pages']).is_a?(Array) self.pages = value end - else - self.pages = nil end if attributes.key?(:'entries') if (value = attributes[:'entries']).is_a?(Array) self.entries = value end - else - self.entries = nil end if attributes.key?(:'comment') @@ -117,7 +109,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @version.nil? invalid_properties.push('invalid value for "version", version cannot be nil.') @@ -141,7 +132,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' return false if @version.nil? return false if @creator.nil? return false if @pages.nil? @@ -178,30 +168,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/har_log_creator.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/har_log_creator.rb index 8ea8c0399e..90bd5dd8a2 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/har_log_creator.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/har_log_creator.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -67,14 +67,10 @@ def initialize(attributes = {}) if attributes.key?(:'name') self.name = attributes[:'name'] - else - self.name = nil end if attributes.key?(:'version') self.version = attributes[:'version'] - else - self.version = nil end if attributes.key?(:'comment') @@ -85,7 +81,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') @@ -101,7 +96,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' return false if @name.nil? return false if @version.nil? true @@ -133,30 +127,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/header.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/header.rb index 6fd3ef4f69..d2d315c9fd 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/header.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/header.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -67,14 +67,10 @@ def initialize(attributes = {}) if attributes.key?(:'name') self.name = attributes[:'name'] - else - self.name = nil end if attributes.key?(:'value') self.value = attributes[:'value'] - else - self.value = nil end if attributes.key?(:'comment') @@ -85,7 +81,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') @@ -101,7 +96,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' return false if @name.nil? return false if @value.nil? true @@ -133,30 +127,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/largest_contentful_paint.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/largest_contentful_paint.rb index 487898cc2e..57d3ab6f14 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/largest_contentful_paint.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/largest_contentful_paint.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -97,7 +97,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if !@start_time.nil? && @start_time < -1 invalid_properties.push('invalid value for "start_time", must be greater than or equal to -1.') @@ -113,7 +112,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@start_time.nil? && @start_time < -1 return false if !@size.nil? && @size < -1 true @@ -122,11 +120,7 @@ def valid? # Custom attribute writer method with validation # @param [Object] start_time Value to be assigned def start_time=(start_time) - if start_time.nil? - fail ArgumentError, 'start_time cannot be nil' - end - - if start_time < -1 + if !start_time.nil? && start_time < -1 fail ArgumentError, 'invalid value for "start_time", must be greater than or equal to -1.' end @@ -136,11 +130,7 @@ def start_time=(start_time) # Custom attribute writer method with validation # @param [Object] size Value to be assigned def size=(size) - if size.nil? - fail ArgumentError, 'size cannot be nil' - end - - if size < -1 + if !size.nil? && size < -1 fail ArgumentError, 'invalid value for "size", must be greater than or equal to -1.' end @@ -174,30 +164,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/match_criteria.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/match_criteria.rb index f9e3d0d6ff..37bafa2f1e 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/match_criteria.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/match_criteria.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -88,10 +88,10 @@ def self.openapi_types :'content' => :'String', :'content_type' => :'String', :'websocket_message' => :'String', - :'request_header' => :'NameValuePair', - :'request_cookie' => :'NameValuePair', - :'response_header' => :'NameValuePair', - :'response_cookie' => :'NameValuePair', + :'request_header' => :'MatchCriteriaRequestHeader', + :'request_cookie' => :'MatchCriteriaRequestHeader', + :'response_header' => :'MatchCriteriaRequestHeader', + :'response_cookie' => :'MatchCriteriaRequestHeader', :'json_valid' => :'Boolean', :'json_path' => :'String', :'json_schema' => :'String', @@ -182,7 +182,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -190,7 +189,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -231,30 +229,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/match_criteria_request_header.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/match_criteria_request_header.rb index d887fbffdb..7c0ebf8efe 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/match_criteria_request_header.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/match_criteria_request_header.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.6.0 +OpenAPI Generator version: 6.4.0 =end diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/counter.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/metric.rb similarity index 82% rename from clients/ruby/lib/browserup_mitmproxy_client/models/counter.rb rename to clients/ruby/lib/browserup_mitmproxy_client/models/metric.rb index f37f0f4ffc..3c610ab66c 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/counter.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/metric.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -14,11 +14,11 @@ require 'time' module BrowserupMitmProxy - class Counter - # Name of Custom Counter to add to the page under _counters + class Metric + # Name of Custom Metric to add to the page under _metrics attr_accessor :name - # Value for the counter + # Value for the metric attr_accessor :value # Attribute mapping from ruby-style variable name to JSON key. @@ -52,13 +52,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `BrowserupMitmProxy::Counter` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `BrowserupMitmProxy::Metric` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `BrowserupMitmProxy::Counter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `BrowserupMitmProxy::Metric`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -75,7 +75,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -83,7 +82,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -112,30 +110,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/name_value_pair.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/name_value_pair.rb index 629902d7ff..e53d3aadd8 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/name_value_pair.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/name_value_pair.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -75,7 +75,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -83,7 +82,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -112,30 +110,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/page.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/page.rb index 02b4b1dac6..1ed7e7894f 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/page.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/page.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -23,7 +23,7 @@ class Page attr_accessor :_verifications - attr_accessor :_counters + attr_accessor :_metrics attr_accessor :_errors @@ -38,7 +38,7 @@ def self.attribute_map :'id' => :'id', :'title' => :'title', :'_verifications' => :'_verifications', - :'_counters' => :'_counters', + :'_metrics' => :'_metrics', :'_errors' => :'_errors', :'page_timings' => :'pageTimings', :'comment' => :'comment' @@ -57,7 +57,7 @@ def self.openapi_types :'id' => :'String', :'title' => :'String', :'_verifications' => :'Array', - :'_counters' => :'Array', + :'_metrics' => :'Array', :'_errors' => :'Array', :'page_timings' => :'PageTimings', :'comment' => :'String' @@ -87,20 +87,14 @@ def initialize(attributes = {}) if attributes.key?(:'started_date_time') self.started_date_time = attributes[:'started_date_time'] - else - self.started_date_time = nil end if attributes.key?(:'id') self.id = attributes[:'id'] - else - self.id = nil end if attributes.key?(:'title') self.title = attributes[:'title'] - else - self.title = nil end if attributes.key?(:'_verifications') @@ -109,9 +103,9 @@ def initialize(attributes = {}) end end - if attributes.key?(:'_counters') - if (value = attributes[:'_counters']).is_a?(Array) - self._counters = value + if attributes.key?(:'_metrics') + if (value = attributes[:'_metrics']).is_a?(Array) + self._metrics = value end end @@ -123,8 +117,6 @@ def initialize(attributes = {}) if attributes.key?(:'page_timings') self.page_timings = attributes[:'page_timings'] - else - self.page_timings = nil end if attributes.key?(:'comment') @@ -135,7 +127,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @started_date_time.nil? invalid_properties.push('invalid value for "started_date_time", started_date_time cannot be nil.') @@ -159,7 +150,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' return false if @started_date_time.nil? return false if @id.nil? return false if @title.nil? @@ -176,7 +166,7 @@ def ==(o) id == o.id && title == o.title && _verifications == o._verifications && - _counters == o._counters && + _metrics == o._metrics && _errors == o._errors && page_timings == o.page_timings && comment == o.comment @@ -191,37 +181,44 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [started_date_time, id, title, _verifications, _counters, _errors, page_timings, comment].hash + [started_date_time, id, title, _verifications, _metrics, _errors, page_timings, comment].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/page_timing.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/page_timing.rb index 054cac0bb3..d09250333c 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/page_timing.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/page_timing.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -165,7 +165,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -173,7 +172,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -212,30 +210,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/page_timings.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/page_timings.rb index 5419990013..3b9fd11344 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/page_timings.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/page_timings.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -183,7 +183,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @on_content_load.nil? invalid_properties.push('invalid value for "on_content_load", on_content_load cannot be nil.') @@ -239,7 +238,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' return false if @on_content_load.nil? return false if @on_content_load < -1 return false if @on_load.nil? @@ -286,11 +284,7 @@ def on_load=(on_load) # Custom attribute writer method with validation # @param [Object] _dns Value to be assigned def _dns=(_dns) - if _dns.nil? - fail ArgumentError, '_dns cannot be nil' - end - - if _dns < -1 + if !_dns.nil? && _dns < -1 fail ArgumentError, 'invalid value for "_dns", must be greater than or equal to -1.' end @@ -300,11 +294,7 @@ def _dns=(_dns) # Custom attribute writer method with validation # @param [Object] _ssl Value to be assigned def _ssl=(_ssl) - if _ssl.nil? - fail ArgumentError, '_ssl cannot be nil' - end - - if _ssl < -1 + if !_ssl.nil? && _ssl < -1 fail ArgumentError, 'invalid value for "_ssl", must be greater than or equal to -1.' end @@ -314,11 +304,7 @@ def _ssl=(_ssl) # Custom attribute writer method with validation # @param [Object] _time_to_first_byte Value to be assigned def _time_to_first_byte=(_time_to_first_byte) - if _time_to_first_byte.nil? - fail ArgumentError, '_time_to_first_byte cannot be nil' - end - - if _time_to_first_byte < -1 + if !_time_to_first_byte.nil? && _time_to_first_byte < -1 fail ArgumentError, 'invalid value for "_time_to_first_byte", must be greater than or equal to -1.' end @@ -328,11 +314,7 @@ def _time_to_first_byte=(_time_to_first_byte) # Custom attribute writer method with validation # @param [Object] _cumulative_layout_shift Value to be assigned def _cumulative_layout_shift=(_cumulative_layout_shift) - if _cumulative_layout_shift.nil? - fail ArgumentError, '_cumulative_layout_shift cannot be nil' - end - - if _cumulative_layout_shift < -1 + if !_cumulative_layout_shift.nil? && _cumulative_layout_shift < -1 fail ArgumentError, 'invalid value for "_cumulative_layout_shift", must be greater than or equal to -1.' end @@ -342,11 +324,7 @@ def _cumulative_layout_shift=(_cumulative_layout_shift) # Custom attribute writer method with validation # @param [Object] _first_paint Value to be assigned def _first_paint=(_first_paint) - if _first_paint.nil? - fail ArgumentError, '_first_paint cannot be nil' - end - - if _first_paint < -1 + if !_first_paint.nil? && _first_paint < -1 fail ArgumentError, 'invalid value for "_first_paint", must be greater than or equal to -1.' end @@ -356,11 +334,7 @@ def _first_paint=(_first_paint) # Custom attribute writer method with validation # @param [Object] _first_input_delay Value to be assigned def _first_input_delay=(_first_input_delay) - if _first_input_delay.nil? - fail ArgumentError, '_first_input_delay cannot be nil' - end - - if _first_input_delay < -1 + if !_first_input_delay.nil? && _first_input_delay < -1 fail ArgumentError, 'invalid value for "_first_input_delay", must be greater than or equal to -1.' end @@ -370,11 +344,7 @@ def _first_input_delay=(_first_input_delay) # Custom attribute writer method with validation # @param [Object] _dom_interactive Value to be assigned def _dom_interactive=(_dom_interactive) - if _dom_interactive.nil? - fail ArgumentError, '_dom_interactive cannot be nil' - end - - if _dom_interactive < -1 + if !_dom_interactive.nil? && _dom_interactive < -1 fail ArgumentError, 'invalid value for "_dom_interactive", must be greater than or equal to -1.' end @@ -384,11 +354,7 @@ def _dom_interactive=(_dom_interactive) # Custom attribute writer method with validation # @param [Object] _first_contentful_paint Value to be assigned def _first_contentful_paint=(_first_contentful_paint) - if _first_contentful_paint.nil? - fail ArgumentError, '_first_contentful_paint cannot be nil' - end - - if _first_contentful_paint < -1 + if !_first_contentful_paint.nil? && _first_contentful_paint < -1 fail ArgumentError, 'invalid value for "_first_contentful_paint", must be greater than or equal to -1.' end @@ -431,30 +397,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/verify_result.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/verify_result.rb index 5d8a27b6d5..22e77993dc 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/verify_result.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/verify_result.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -84,7 +84,6 @@ def initialize(attributes = {}) # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end @@ -92,7 +91,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' true end @@ -122,30 +120,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/models/web_socket_message.rb b/clients/ruby/lib/browserup_mitmproxy_client/models/web_socket_message.rb index 8cea4e5dca..b2e21de939 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/models/web_socket_message.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/models/web_socket_message.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end @@ -71,33 +71,24 @@ def initialize(attributes = {}) if attributes.key?(:'type') self.type = attributes[:'type'] - else - self.type = nil end if attributes.key?(:'opcode') self.opcode = attributes[:'opcode'] - else - self.opcode = nil end if attributes.key?(:'data') self.data = attributes[:'data'] - else - self.data = nil end if attributes.key?(:'time') self.time = attributes[:'time'] - else - self.time = nil end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties - warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @type.nil? invalid_properties.push('invalid value for "type", type cannot be nil.') @@ -121,7 +112,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - warn '[DEPRECATED] the `valid?` method is obsolete' return false if @type.nil? return false if @opcode.nil? return false if @data.nil? @@ -156,30 +146,37 @@ def hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - openapi_types.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = nil + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end - elsif !attributes[attribute_map[key]].nil? - transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end - new(transformed_hash) + + self end # Deserializes the data based on type # @param string type Data type # @param string value Value to be deserialized # @return [Object] Deserialized data - def self._deserialize(type, value) + def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) diff --git a/clients/ruby/lib/browserup_mitmproxy_client/version.rb b/clients/ruby/lib/browserup_mitmproxy_client/version.rb index 11d42e6688..dc281b1984 100644 --- a/clients/ruby/lib/browserup_mitmproxy_client/version.rb +++ b/clients/ruby/lib/browserup_mitmproxy_client/version.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end diff --git a/clients/ruby/spec/api/browser_up_proxy_api_spec.rb b/clients/ruby/spec/api/browser_up_proxy_api_spec.rb index c9a6375382..95ef44eaf7 100644 --- a/clients/ruby/spec/api/browser_up_proxy_api_spec.rb +++ b/clients/ruby/spec/api/browser_up_proxy_api_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 @@ -32,23 +32,23 @@ end end - # unit tests for add_counter - # Add Custom Counter to the captured traffic har - # @param counter Receives a new counter to add. The counter is stored, under the hood, in an array in the har under the _counters key + # unit tests for add_error + # Add Custom Error to the captured traffic har + # @param error Receives an error to track. Internally, the error is stored in an array in the har under the _errors key # @param [Hash] opts the optional parameters # @return [nil] - describe 'add_counter test' do + describe 'add_error test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - # unit tests for add_error - # Add Custom Error to the captured traffic har - # @param error Receives an error to track. Internally, the error is stored in an array in the har under the _errors key + # unit tests for add_metric + # Add Custom Metric to the captured traffic har + # @param metric Receives a new metric to add. The metric is stored, under the hood, in an array in the har under the _metrics key # @param [Hash] opts the optional parameters # @return [nil] - describe 'add_error test' do + describe 'add_metric test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/clients/ruby/spec/api_client_spec.rb b/clients/ruby/spec/api_client_spec.rb index 3e77b3d53e..3c45eb33a6 100644 --- a/clients/ruby/spec/api_client_spec.rb +++ b/clients/ruby/spec/api_client_spec.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end diff --git a/clients/ruby/spec/configuration_spec.rb b/clients/ruby/spec/configuration_spec.rb index 653eea0a67..3218884c95 100644 --- a/clients/ruby/spec/configuration_spec.rb +++ b/clients/ruby/spec/configuration_spec.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end diff --git a/clients/ruby/spec/models/action_spec.rb b/clients/ruby/spec/models/action_spec.rb index c0688f7b7a..bb0c991a49 100644 --- a/clients/ruby/spec/models/action_spec.rb +++ b/clients/ruby/spec/models/action_spec.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.6.0 +OpenAPI Generator version: 6.4.0 =end @@ -27,49 +27,49 @@ end describe 'test attribute "name"' do it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end describe 'test attribute "id"' do it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end describe 'test attribute "class_name"' do it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end describe 'test attribute "tag_name"' do it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end describe 'test attribute "xpath"' do it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end describe 'test attribute "data_attributes"' do it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end describe 'test attribute "form_name"' do it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end describe 'test attribute "content"' do it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end diff --git a/clients/ruby/spec/models/error_spec.rb b/clients/ruby/spec/models/error_spec.rb index 28d1c36813..a8174759ad 100644 --- a/clients/ruby/spec/models/error_spec.rb +++ b/clients/ruby/spec/models/error_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 @@ -25,13 +25,13 @@ expect(instance).to be_instance_of(BrowserupMitmProxy::Error) end end - describe 'test attribute "details"' do + describe 'test attribute "name"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "name"' do + describe 'test attribute "details"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/clients/ruby/spec/models/har_entry_cache_before_request_one_of_spec.rb b/clients/ruby/spec/models/har_entry_cache_before_request_one_of_spec.rb index 00c2e22860..2209e0a453 100644 --- a/clients/ruby/spec/models/har_entry_cache_before_request_one_of_spec.rb +++ b/clients/ruby/spec/models/har_entry_cache_before_request_one_of_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/har_entry_cache_before_request_spec.rb b/clients/ruby/spec/models/har_entry_cache_before_request_spec.rb index 1a959f0411..6975a2a134 100644 --- a/clients/ruby/spec/models/har_entry_cache_before_request_spec.rb +++ b/clients/ruby/spec/models/har_entry_cache_before_request_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/har_entry_cache_spec.rb b/clients/ruby/spec/models/har_entry_cache_spec.rb index 36f2a3f7b6..f98e304ea4 100644 --- a/clients/ruby/spec/models/har_entry_cache_spec.rb +++ b/clients/ruby/spec/models/har_entry_cache_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/har_entry_request_cookies_inner_spec.rb b/clients/ruby/spec/models/har_entry_request_cookies_inner_spec.rb index 61facc99e8..a95bcfa59e 100644 --- a/clients/ruby/spec/models/har_entry_request_cookies_inner_spec.rb +++ b/clients/ruby/spec/models/har_entry_request_cookies_inner_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/har_entry_request_post_data_params_inner_spec.rb b/clients/ruby/spec/models/har_entry_request_post_data_params_inner_spec.rb index 2ae6ca0dea..39a28317ce 100644 --- a/clients/ruby/spec/models/har_entry_request_post_data_params_inner_spec.rb +++ b/clients/ruby/spec/models/har_entry_request_post_data_params_inner_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/har_entry_request_post_data_spec.rb b/clients/ruby/spec/models/har_entry_request_post_data_spec.rb index 660f9ced89..c46c5de1b3 100644 --- a/clients/ruby/spec/models/har_entry_request_post_data_spec.rb +++ b/clients/ruby/spec/models/har_entry_request_post_data_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/har_entry_request_query_string_inner_spec.rb b/clients/ruby/spec/models/har_entry_request_query_string_inner_spec.rb index a698c6f7bc..7be7893792 100644 --- a/clients/ruby/spec/models/har_entry_request_query_string_inner_spec.rb +++ b/clients/ruby/spec/models/har_entry_request_query_string_inner_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/har_entry_request_spec.rb b/clients/ruby/spec/models/har_entry_request_spec.rb index 2651ae0b52..0e5bd62edf 100644 --- a/clients/ruby/spec/models/har_entry_request_spec.rb +++ b/clients/ruby/spec/models/har_entry_request_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/har_entry_response_content_spec.rb b/clients/ruby/spec/models/har_entry_response_content_spec.rb index abfd281387..ea1375ace8 100644 --- a/clients/ruby/spec/models/har_entry_response_content_spec.rb +++ b/clients/ruby/spec/models/har_entry_response_content_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 @@ -55,6 +55,54 @@ end end + describe 'test attribute "_video_buffered_percent"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "_video_stall_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "_video_decoded_byte_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "_video_waiting_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "_video_error_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "_video_dropped_frames"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "_video_total_frames"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "_video_audio_bytes_decoded"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + describe 'test attribute "comment"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/clients/ruby/spec/models/har_entry_response_spec.rb b/clients/ruby/spec/models/har_entry_response_spec.rb index d06a952983..a14538a50f 100644 --- a/clients/ruby/spec/models/har_entry_response_spec.rb +++ b/clients/ruby/spec/models/har_entry_response_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/har_entry_spec.rb b/clients/ruby/spec/models/har_entry_spec.rb index d749a8342f..112f913f66 100644 --- a/clients/ruby/spec/models/har_entry_spec.rb +++ b/clients/ruby/spec/models/har_entry_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/har_entry_timings_spec.rb b/clients/ruby/spec/models/har_entry_timings_spec.rb index c9c0e290e5..cc34e847bd 100644 --- a/clients/ruby/spec/models/har_entry_timings_spec.rb +++ b/clients/ruby/spec/models/har_entry_timings_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/har_log_creator_spec.rb b/clients/ruby/spec/models/har_log_creator_spec.rb index 4c9b7a81cb..4ec9015ff6 100644 --- a/clients/ruby/spec/models/har_log_creator_spec.rb +++ b/clients/ruby/spec/models/har_log_creator_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/har_log_spec.rb b/clients/ruby/spec/models/har_log_spec.rb index 4ff8c31751..43b68cca4b 100644 --- a/clients/ruby/spec/models/har_log_spec.rb +++ b/clients/ruby/spec/models/har_log_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/har_spec.rb b/clients/ruby/spec/models/har_spec.rb index 5fe49a46b1..78496a78c9 100644 --- a/clients/ruby/spec/models/har_spec.rb +++ b/clients/ruby/spec/models/har_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/header_spec.rb b/clients/ruby/spec/models/header_spec.rb index 03949e63f7..05da4247f7 100644 --- a/clients/ruby/spec/models/header_spec.rb +++ b/clients/ruby/spec/models/header_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/largest_contentful_paint_spec.rb b/clients/ruby/spec/models/largest_contentful_paint_spec.rb index c57d1773c7..806257ab50 100644 --- a/clients/ruby/spec/models/largest_contentful_paint_spec.rb +++ b/clients/ruby/spec/models/largest_contentful_paint_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/match_criteria_request_header_spec.rb b/clients/ruby/spec/models/match_criteria_request_header_spec.rb index 057041fe6c..4a46665b1e 100644 --- a/clients/ruby/spec/models/match_criteria_request_header_spec.rb +++ b/clients/ruby/spec/models/match_criteria_request_header_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 @@ -25,13 +25,13 @@ expect(instance).to be_instance_of(BrowserupMitmProxy::MatchCriteriaRequestHeader) end end - describe 'test attribute "value"' do + describe 'test attribute "name"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "name"' do + describe 'test attribute "value"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/clients/ruby/spec/models/match_criteria_spec.rb b/clients/ruby/spec/models/match_criteria_spec.rb index c501e8de5c..6f9834a6bf 100644 --- a/clients/ruby/spec/models/match_criteria_spec.rb +++ b/clients/ruby/spec/models/match_criteria_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/counter_spec.rb b/clients/ruby/spec/models/metric_spec.rb similarity index 72% rename from clients/ruby/spec/models/counter_spec.rb rename to clients/ruby/spec/models/metric_spec.rb index ee9fc81e4c..f6d4c37fb1 100644 --- a/clients/ruby/spec/models/counter_spec.rb +++ b/clients/ruby/spec/models/metric_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 @@ -14,24 +14,24 @@ require 'json' require 'date' -# Unit tests for BrowserupMitmProxy::Counter +# Unit tests for BrowserupMitmProxy::Metric # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe BrowserupMitmProxy::Counter do - let(:instance) { BrowserupMitmProxy::Counter.new } +describe BrowserupMitmProxy::Metric do + let(:instance) { BrowserupMitmProxy::Metric.new } - describe 'test an instance of Counter' do - it 'should create an instance of Counter' do - expect(instance).to be_instance_of(BrowserupMitmProxy::Counter) + describe 'test an instance of Metric' do + it 'should create an instance of Metric' do + expect(instance).to be_instance_of(BrowserupMitmProxy::Metric) end end - describe 'test attribute "value"' do + describe 'test attribute "name"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "name"' do + describe 'test attribute "value"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/clients/ruby/spec/models/name_value_pair_spec.rb b/clients/ruby/spec/models/name_value_pair_spec.rb index 3675f771ab..0a6a3cc0a4 100644 --- a/clients/ruby/spec/models/name_value_pair_spec.rb +++ b/clients/ruby/spec/models/name_value_pair_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 @@ -25,13 +25,13 @@ expect(instance).to be_instance_of(BrowserupMitmProxy::NameValuePair) end end - describe 'test attribute "value"' do + describe 'test attribute "name"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "name"' do + describe 'test attribute "value"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/clients/ruby/spec/models/page_spec.rb b/clients/ruby/spec/models/page_spec.rb index ce0d65f8ad..0348e9219d 100644 --- a/clients/ruby/spec/models/page_spec.rb +++ b/clients/ruby/spec/models/page_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 @@ -49,7 +49,7 @@ end end - describe 'test attribute "_counters"' do + describe 'test attribute "_metrics"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/clients/ruby/spec/models/page_timing_spec.rb b/clients/ruby/spec/models/page_timing_spec.rb index 8c5d5d832e..11572d713f 100644 --- a/clients/ruby/spec/models/page_timing_spec.rb +++ b/clients/ruby/spec/models/page_timing_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 @@ -25,73 +25,73 @@ expect(instance).to be_instance_of(BrowserupMitmProxy::PageTiming) end end - describe 'test attribute "_first_input_delay"' do + describe 'test attribute "on_content_load"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "_dom_interactive"' do + describe 'test attribute "on_load"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "_cumulative_layout_shift"' do + describe 'test attribute "_first_input_delay"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "_dns"' do + describe 'test attribute "_first_paint"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "_href"' do + describe 'test attribute "_cumulative_layout_shift"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "_first_paint"' do + describe 'test attribute "_largest_contentful_paint"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "_largest_contentful_paint"' do + describe 'test attribute "_dom_interactive"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "_time_to_first_byte"' do + describe 'test attribute "_first_contentful_paint"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "_ssl"' do + describe 'test attribute "_dns"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "_first_contentful_paint"' do + describe 'test attribute "_ssl"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "on_load"' do + describe 'test attribute "_time_to_first_byte"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - describe 'test attribute "on_content_load"' do + describe 'test attribute "_href"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/clients/ruby/spec/models/page_timings_spec.rb b/clients/ruby/spec/models/page_timings_spec.rb index 01948c6057..ea6c4356cc 100644 --- a/clients/ruby/spec/models/page_timings_spec.rb +++ b/clients/ruby/spec/models/page_timings_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/models/verify_result_spec.rb b/clients/ruby/spec/models/verify_result_spec.rb index 3cb3bd6149..fec00bacc7 100644 --- a/clients/ruby/spec/models/verify_result_spec.rb +++ b/clients/ruby/spec/models/verify_result_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 @@ -25,7 +25,7 @@ expect(instance).to be_instance_of(BrowserupMitmProxy::VerifyResult) end end - describe 'test attribute "type"' do + describe 'test attribute "result"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end @@ -37,7 +37,7 @@ end end - describe 'test attribute "result"' do + describe 'test attribute "type"' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/clients/ruby/spec/models/web_socket_message_spec.rb b/clients/ruby/spec/models/web_socket_message_spec.rb index 793eed7f36..86c95ddfdc 100644 --- a/clients/ruby/spec/models/web_socket_message_spec.rb +++ b/clients/ruby/spec/models/web_socket_message_spec.rb @@ -3,7 +3,7 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 diff --git a/clients/ruby/spec/spec_helper.rb b/clients/ruby/spec/spec_helper.rb index 3750d402a7..e4219693da 100644 --- a/clients/ruby/spec/spec_helper.rb +++ b/clients/ruby/spec/spec_helper.rb @@ -3,10 +3,10 @@ #___ This is the REST API for controlling the BrowserUp MitmProxy. The BrowserUp MitmProxy is a swiss army knife for automated testing that captures HTTP traffic in HAR files. It is also useful for Selenium/Cypress tests. ___ -The version of the OpenAPI document: 1.0.0 +The version of the OpenAPI document: 1.24 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +OpenAPI Generator version: 6.4.0 =end From f0128c62d80f9e2252a4b6855aa60a446649552b Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 01:48:44 +0000 Subject: [PATCH 5/8] [autofix.ci] apply automated fixes --- .../browserup/browserup_addons_manager.py | 2 +- .../addons/browserup/har/har_resources.py | 2 +- .../addons/browserup/har_capture_addon.py | 2 +- .../browserup/har_dummy_traffic_addon.py | 165 +++++++++--------- .../browserup/test_har_dummy_traffic_addon.py | 53 +++--- test/mitmproxy/addons/test_clientplayback.py | 1 + 6 files changed, 110 insertions(+), 115 deletions(-) diff --git a/mitmproxy/addons/browserup/browserup_addons_manager.py b/mitmproxy/addons/browserup/browserup_addons_manager.py index 7d38348540..8069e35132 100644 --- a/mitmproxy/addons/browserup/browserup_addons_manager.py +++ b/mitmproxy/addons/browserup/browserup_addons_manager.py @@ -14,9 +14,9 @@ from mitmproxy import ctx from mitmproxy.addons.browserup.browser_data_addon import BrowserDataAddOn -from mitmproxy.addons.browserup.har.har_schemas import MetricSchema from mitmproxy.addons.browserup.har.har_schemas import ErrorSchema from mitmproxy.addons.browserup.har.har_schemas import MatchCriteriaSchema +from mitmproxy.addons.browserup.har.har_schemas import MetricSchema from mitmproxy.addons.browserup.har.har_schemas import PageTimingSchema from mitmproxy.addons.browserup.har.har_schemas import VerifyResultSchema from mitmproxy.addons.browserup.har_capture_addon import HarCaptureAddOn diff --git a/mitmproxy/addons/browserup/har/har_resources.py b/mitmproxy/addons/browserup/har/har_resources.py index 467cf3873b..d124e0bce1 100644 --- a/mitmproxy/addons/browserup/har/har_resources.py +++ b/mitmproxy/addons/browserup/har/har_resources.py @@ -8,9 +8,9 @@ from marshmallow import ValidationError from mitmproxy.addons.browserup.har.har_capture_types import HarCaptureTypes -from mitmproxy.addons.browserup.har.har_schemas import MetricSchema from mitmproxy.addons.browserup.har.har_schemas import ErrorSchema from mitmproxy.addons.browserup.har.har_schemas import MatchCriteriaSchema +from mitmproxy.addons.browserup.har.har_schemas import MetricSchema from mitmproxy.addons.browserup.har.har_verifications import HarVerifications diff --git a/mitmproxy/addons/browserup/har_capture_addon.py b/mitmproxy/addons/browserup/har_capture_addon.py index 273548266b..054dad5537 100644 --- a/mitmproxy/addons/browserup/har_capture_addon.py +++ b/mitmproxy/addons/browserup/har_capture_addon.py @@ -4,12 +4,12 @@ from mitmproxy.addons.browserup.har import flow_har_entry_patch from mitmproxy.addons.browserup.har.flow_capture import FlowCaptureMixin from mitmproxy.addons.browserup.har.har_manager import HarManagerMixin -from mitmproxy.addons.browserup.har.har_resources import MetricResource from mitmproxy.addons.browserup.har.har_resources import ErrorResource from mitmproxy.addons.browserup.har.har_resources import HarCaptureTypesResource from mitmproxy.addons.browserup.har.har_resources import HarPageResource from mitmproxy.addons.browserup.har.har_resources import HarResource from mitmproxy.addons.browserup.har.har_resources import HealthCheckResource +from mitmproxy.addons.browserup.har.har_resources import MetricResource from mitmproxy.addons.browserup.har.har_resources import NotPresentResource from mitmproxy.addons.browserup.har.har_resources import PresentResource from mitmproxy.addons.browserup.har.har_resources import SizeResource diff --git a/mitmproxy/addons/browserup/har_dummy_traffic_addon.py b/mitmproxy/addons/browserup/har_dummy_traffic_addon.py index 877b1b8841..571c849464 100644 --- a/mitmproxy/addons/browserup/har_dummy_traffic_addon.py +++ b/mitmproxy/addons/browserup/har_dummy_traffic_addon.py @@ -18,7 +18,7 @@ def set_nested_value(obj, path, value): parts = path.split(".") ref = obj for i, part in enumerate(parts): - is_last = (i == len(parts) - 1) + is_last = i == len(parts) - 1 # Handle array-like keys: e.g. "headers.0" if part.isdigit(): @@ -33,12 +33,12 @@ def set_nested_value(obj, path, value): continue # If we're trying to set an array on something else, just create a new list ref = [] - obj[parts[i-1]] = ref # Reassign to the parent - + obj[parts[i - 1]] = ref # Reassign to the parent + # Expand list size if needed while len(ref) <= idx: ref.append({}) - + if is_last: ref[idx] = value else: @@ -93,34 +93,31 @@ def on_get(self, req, resp): """ examples = { "description": "The dev-null.com domain is reserved for dummy traffic. Any requests to this domain will be intercepted and used to create HAR entries with custom values.", - "examples": [ "http://dev-null.com/any/path", "http://dev-null.com/any/path?timings.wait=150", "http://dev-null.com/any/path?status=404&timings.wait=20&response.bodySize=1453", - "http://dev-null.com/any/path?response.headers.0.name=Content-Type&response.headers.0.value=application/json" + "http://dev-null.com/any/path?response.headers.0.name=Content-Type&response.headers.0.value=application/json", ], - "defaultValues": { "General structure": "A default HAR entry is automatically created with reasonable values for timings, sizes, etc.", "Request": "Includes method, URL, HTTP version, headers, etc.", "Response": "Includes status code, headers, content info, etc.", "Timings": "Includes reasonable values for send, wait, receive times", - "Other": "Includes server IP, connection ID, etc." + "Other": "Includes server IP, connection ID, etc.", }, - "commonCustomizations": { "status": "HTTP status code (e.g., 200, 404, 500)", "timings.wait": "Time waiting for server response in ms", "timings.receive": "Time downloading response in ms", "response.bodySize": "Size of response body in bytes", "response.content.size": "Size of content in bytes", - "response.content.mimeType": "MIME type of response (e.g., 'application/json')" - } + "response.content.mimeType": "MIME type of response (e.g., 'application/json')", + }, } - + resp.content_type = "application/json" - resp.body = json.dumps(examples).encode('utf-8') + resp.body = json.dumps(examples).encode("utf-8") def create_default_har_entry(url, method="GET", status_code=200): @@ -130,70 +127,72 @@ def create_default_har_entry(url, method="GET", status_code=200): now = datetime.now(timezone.utc).isoformat() req_start_time = time.time() - 1 # 1 second ago req_end_time = time.time() - + # Calculate some reasonable default timing values total_time = int((req_end_time - req_start_time) * 1000) # milliseconds wait_time = int(total_time * 0.6) # 60% of time in wait receive_time = int(total_time * 0.3) # 30% in receive send_time = total_time - wait_time - receive_time # remainder in send - + # Use UUID for unique IDs connection_id = str(uuid.uuid4()) - + # Create default HAR entry using HarBuilder for consistency har_entry = HarBuilder.entry() - + # Override with sensible defaults - har_entry.update({ - "startedDateTime": now, - "time": total_time, - "request": { - "method": method, - "url": url, - "httpVersion": "HTTP/1.1", - "cookies": [], - "headers": [ - {"name": "Host", "value": "dev-null.com"}, - {"name": "User-Agent", "value": "BrowserUp-DummyTraffic/1.0"}, - {"name": "Accept", "value": "*/*"} - ], - "queryString": [], - "headersSize": 250, - "bodySize": 0, - }, - "response": { - "status": status_code, - "statusText": "OK" if status_code == 200 else "", - "httpVersion": "HTTP/1.1", - "cookies": [], - "headers": [ - {"name": "Content-Type", "value": "text/plain"}, - {"name": "Content-Length", "value": "0"}, - {"name": "Date", "value": now} - ], - "content": { - "size": 0, - "mimeType": "text/plain", - "text": "", + har_entry.update( + { + "startedDateTime": now, + "time": total_time, + "request": { + "method": method, + "url": url, + "httpVersion": "HTTP/1.1", + "cookies": [], + "headers": [ + {"name": "Host", "value": "dev-null.com"}, + {"name": "User-Agent", "value": "BrowserUp-DummyTraffic/1.0"}, + {"name": "Accept", "value": "*/*"}, + ], + "queryString": [], + "headersSize": 250, + "bodySize": 0, + }, + "response": { + "status": status_code, + "statusText": "OK" if status_code == 200 else "", + "httpVersion": "HTTP/1.1", + "cookies": [], + "headers": [ + {"name": "Content-Type", "value": "text/plain"}, + {"name": "Content-Length", "value": "0"}, + {"name": "Date", "value": now}, + ], + "content": { + "size": 0, + "mimeType": "text/plain", + "text": "", + }, + "redirectURL": "", + "headersSize": 150, + "bodySize": 0, }, - "redirectURL": "", - "headersSize": 150, - "bodySize": 0, - }, - "cache": {}, - "timings": { - "blocked": 0, - "dns": 0, - "connect": 0, - "ssl": 0, - "send": send_time, - "wait": wait_time, - "receive": receive_time, - }, - "serverIPAddress": "127.0.0.1", - "connection": connection_id, - }) - + "cache": {}, + "timings": { + "blocked": 0, + "dns": 0, + "connect": 0, + "ssl": 0, + "send": send_time, + "wait": wait_time, + "receive": receive_time, + }, + "serverIPAddress": "127.0.0.1", + "connection": connection_id, + } + ) + return har_entry @@ -237,25 +236,23 @@ def request(self, flow: http.HTTPFlow): val = numeric_val except ValueError: pass # Keep as string if not numeric - + # Store the key-value pair for HAR customization har_updates[key] = val # Add minimal headers headers = {"Content-Type": "text/plain"} - + # Short-circuit the flow with an empty body flow.response = http.Response.make( status_code, b"", # empty body - headers + headers, ) # Create a default HAR entry that will be populated later flow.metadata["dummy_har_entry"] = create_default_har_entry( - url=flow.request.url, - method=flow.request.method, - status_code=status_code + url=flow.request.url, method=flow.request.method, status_code=status_code ) # Store the HAR updates in flow.metadata so we can apply them in the response hook @@ -278,23 +275,27 @@ def response(self, flow: http.HTTPFlow): return # Copy our default HAR entry to the real HAR entry - default_har = flow.metadata["dummy_har_entry"] + default_har = flow.metadata["dummy_har_entry"] har_entry = flow.har_entry - + # Apply all values from our default HAR to the real HAR entry # This is a deep update that preserves existing nested structures for key, value in default_har.items(): - if key in har_entry and isinstance(har_entry[key], dict) and isinstance(value, dict): + if ( + key in har_entry + and isinstance(har_entry[key], dict) + and isinstance(value, dict) + ): # Deep update dictionaries har_entry[key].update(value) else: # Otherwise, just replace the value har_entry[key] = copy.deepcopy(value) - + # Apply any custom updates from query parameters if "har_updates" in flow.metadata: har_updates = flow.metadata["har_updates"] - + # Apply each update to the HAR entry using dot notation for path, value in har_updates.items(): if "." in path: @@ -303,10 +304,12 @@ def response(self, flow: http.HTTPFlow): else: # Handle simple top-level fields har_entry[path] = value - + logging.info(f"Applied HAR updates to entry: {har_updates}") - - logging.info("Successfully updated HAR entry with default values and custom overrides") + + logging.info( + "Successfully updated HAR entry with default values and custom overrides" + ) -addons = [HarDummyTrafficAddon()] \ No newline at end of file +addons = [HarDummyTrafficAddon()] diff --git a/test/mitmproxy/addons/browserup/test_har_dummy_traffic_addon.py b/test/mitmproxy/addons/browserup/test_har_dummy_traffic_addon.py index 9d96081c6e..8255aee36e 100644 --- a/test/mitmproxy/addons/browserup/test_har_dummy_traffic_addon.py +++ b/test/mitmproxy/addons/browserup/test_har_dummy_traffic_addon.py @@ -41,10 +41,10 @@ def test_request_non_devnull(dummy_addon): # Setup flow = tflow.tflow() flow.request.host = "example.com" - + # Test dummy_addon.request(flow) - + # Verify - should not modify normal flows assert flow.response is None @@ -54,10 +54,10 @@ def test_request_devnull_basic(dummy_addon): flow = tflow.tflow() flow.request.host = "dev-null.com" flow.request.query = {} - + # Test dummy_addon.request(flow) - + # Verify - should create default 204 response assert flow.response.status_code == 204 assert flow.response.content == b"" @@ -70,10 +70,10 @@ def test_request_devnull_with_status(dummy_addon): flow = tflow.tflow() flow.request.host = "dev-null.com" flow.request.query = {"status": "404"} - + # Test dummy_addon.request(flow) - + # Verify - should create response with specified status assert flow.response.status_code == 404 assert flow.response.content == b"" @@ -83,19 +83,16 @@ def test_request_devnull_with_har_values(dummy_addon): # Setup flow = tflow.tflow() flow.request.host = "dev-null.com" - flow.request.query = { - "timings.wait": "20", - "response.bodySize": "1453" - } - + flow.request.query = {"timings.wait": "20", "response.bodySize": "1453"} + # Test dummy_addon.request(flow) - + # Verify - should store HAR updates in metadata assert flow.response.status_code == 204 assert flow.metadata["har_updates"] == { "timings.wait": 20, - "response.bodySize": 1453 + "response.bodySize": 1453, } @@ -103,25 +100,19 @@ def test_response_updates_har_entry(dummy_addon): # Setup flow = tflow.tflow(resp=True) flow.request.host = "dev-null.com" - + # Mock a HAR entry on the flow - flow.har_entry = { - "timings": {}, - "response": {} - } - + flow.har_entry = {"timings": {}, "response": {}} + # Create a dummy HAR entry and apply updates flow.metadata = { "dummy_har_entry": create_default_har_entry(url=flow.request.url), - "har_updates": { - "timings.wait": 50, - "response.bodySize": 2000 - } + "har_updates": {"timings.wait": 50, "response.bodySize": 2000}, } - + # Test dummy_addon.response(flow) - + # Verify HAR entry was updated with both default values and custom overrides assert flow.har_entry["timings"]["wait"] == 50 # Custom override assert flow.har_entry["response"]["bodySize"] == 2000 # Custom override @@ -134,7 +125,7 @@ def test_create_default_har_entry(): # Create a default HAR entry url = "http://example.com/test" har_entry = create_default_har_entry(url=url, method="POST", status_code=201) - + # Verify it has the correct structure and values assert har_entry["request"]["url"] == url assert har_entry["request"]["method"] == "POST" @@ -149,16 +140,16 @@ def test_create_default_har_entry(): def test_resource_provides_examples(dummy_addon): # Setup resource = HarDummyResource(dummy_addon) - + req = MagicMock() resp = MagicMock() - + # Test resource.on_get(req, resp) - + # Verify response contains examples and documentation assert resp.content_type == "application/json" - response_body = json.loads(resp.body.decode('utf-8')) + response_body = json.loads(resp.body.decode("utf-8")) assert "examples" in response_body assert len(response_body["examples"]) > 0 assert "defaultValues" in response_body @@ -170,4 +161,4 @@ def dummy_addon(): a = HarDummyTrafficAddon() with taddons.context(a) as ctx: ctx.configure(a) - return a \ No newline at end of file + return a diff --git a/test/mitmproxy/addons/test_clientplayback.py b/test/mitmproxy/addons/test_clientplayback.py index 69fd06b897..b2f210606f 100644 --- a/test/mitmproxy/addons/test_clientplayback.py +++ b/test/mitmproxy/addons/test_clientplayback.py @@ -14,6 +14,7 @@ from mitmproxy.test import taddons from mitmproxy.test import tflow + @asynccontextmanager async def tcp_server(handle_conn, **server_args) -> Address: """TCP server context manager that... From 12f7cb00f491d3e742044eed4d34fdd117b631f5 Mon Sep 17 00:00:00 2001 From: Eric Beland Date: Tue, 25 Mar 2025 23:31:46 -0400 Subject: [PATCH 6/8] Fix dev-null.com handler by adding HarDummyTrafficAddon to BrowserupProxyMaster MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the HarDummyTrafficAddon to the BrowserupProxyMaster, ensuring requests to dev-null.com are intercepted and handled internally without making external network requests. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- mitmproxy/tools/browserup_proxy.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mitmproxy/tools/browserup_proxy.py b/mitmproxy/tools/browserup_proxy.py index 76db960a0e..fd43307b88 100644 --- a/mitmproxy/tools/browserup_proxy.py +++ b/mitmproxy/tools/browserup_proxy.py @@ -11,6 +11,7 @@ from mitmproxy.addons.browserup import browser_data_addon from mitmproxy.addons.browserup import browserup_addons_manager from mitmproxy.addons.browserup import har_capture_addon +from mitmproxy.addons.browserup import har_dummy_traffic_addon from mitmproxy.addons.browserup import latency_addon from mitmproxy.addons.errorcheck import ErrorCheck @@ -31,9 +32,11 @@ def __init__( self.addons.add(dumper.Dumper()) harCaptureAddon = har_capture_addon.HarCaptureAddOn() + harDummyTrafficAddon = har_dummy_traffic_addon.HarDummyTrafficAddon() self.addons.add( browserup_addons_manager.BrowserUpAddonsManagerAddOn(), harCaptureAddon, + harDummyTrafficAddon, browser_data_addon.BrowserDataAddOn(harCaptureAddon), latency_addon.LatencyAddOn(), ) From 41ac950d7e9dd1d596ce7a64988a39db1accd8fe Mon Sep 17 00:00:00 2001 From: Eric Beland Date: Wed, 26 Mar 2025 21:41:04 -0400 Subject: [PATCH 7/8] Update CLAUDE.md Fix typo --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index a840edeb4f..046a0cfb97 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -10,4 +10,4 @@ this API are generated in multiple languages via the open api specification. Th which should be ignored, as they are generated files. Browserup extends mitmproxy's mitmdump executable with addons -The most important code for browserup live in mmitmproxy/addons/browserup \ No newline at end of file +The most important code for browserup live in mitmproxy/addons/browserup From 52b09acc84af8ebfd7a85e1a51c187c8bd551144 Mon Sep 17 00:00:00 2001 From: Eric Beland Date: Wed, 26 Mar 2025 21:41:59 -0400 Subject: [PATCH 8/8] Update CLAUDE.md Revise CLAUDE.md --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 046a0cfb97..f046683d69 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,4 +1,4 @@ -This is a fork of the mitmproxy project by a company named browserup. The mitmproxy +This is a customized fork of the mitmproxy project, maintained by a company named browserup. The mitmproxy is used to man-in-the-middle connections to provide debugging info, allow for security research and other uses.