From ab8c25a890a9d78b6a52cf1a784228b4702bc4a1 Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Tue, 19 Sep 2023 13:52:51 +0200 Subject: [PATCH] fix: update OpenAPI Schema with `auxiliaryMobile` method for VPN signal --- docs/Model/VpnResult.md | 2 +- docs/Model/VpnResultMethods.md | 1 + res/fingerprint-server-api.yaml | 10 ++++++++- src/Model/VpnResult.php | 2 +- src/Model/VpnResultMethods.php | 40 ++++++++++++++++++++++++++++----- test/mocks/get_event.json | 3 ++- 6 files changed, 49 insertions(+), 9 deletions(-) diff --git a/docs/Model/VpnResult.md b/docs/Model/VpnResult.md index 3dae0e49..68058850 100644 --- a/docs/Model/VpnResult.md +++ b/docs/Model/VpnResult.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**result** | **bool** | VPN or other anonymising service has been used when sending the request. | [optional] +**result** | **bool** | VPN or other anonymizing service has been used when sending the request. | [optional] **methods** | [**\Fingerprint\ServerAPI\Model\VpnResultMethods**](VpnResultMethods.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/docs/Model/VpnResultMethods.md b/docs/Model/VpnResultMethods.md index 8e82e229..b09ccef0 100644 --- a/docs/Model/VpnResultMethods.md +++ b/docs/Model/VpnResultMethods.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **timezone_mismatch** | **bool** | User's browser timezone doesn't match the timezone from which the request was originally made. | [optional] **public_vpn** | **bool** | Request IP address is owned and used by a public VPN service provider. | [optional] +**auxiliary_mobile** | **bool** | This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. | [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/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 5232357c..bdd5fc4c 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -185,6 +185,7 @@ paths: methods: timezoneMismatch: false publicVPN: false + auxiliaryMobile: false proxy: data: result: false @@ -3812,6 +3813,7 @@ paths: methods: timezoneMismatch: false publicVPN: false + auxiliaryMobile: false proxy: result: false tampering: @@ -4970,7 +4972,7 @@ components: result: type: boolean description: >- - VPN or other anonymising service has been used when sending the + VPN or other anonymizing service has been used when sending the request. example: false methods: @@ -4988,6 +4990,12 @@ components: Request IP address is owned and used by a public VPN service provider. example: false + auxiliaryMobile: + type: boolean + description: >- + This method applies to mobile devices only. Indicates the result + of additional methods used to detect a VPN in mobile devices. + example: false TamperingResult: type: object properties: diff --git a/src/Model/VpnResult.php b/src/Model/VpnResult.php index 96f38301..447d3b96 100644 --- a/src/Model/VpnResult.php +++ b/src/Model/VpnResult.php @@ -215,7 +215,7 @@ public function getResult() /** * Sets result * - * @param bool $result VPN or other anonymising service has been used when sending the request. + * @param bool $result VPN or other anonymizing service has been used when sending the request. * * @return $this */ diff --git a/src/Model/VpnResultMethods.php b/src/Model/VpnResultMethods.php index 2f9bfd37..ee01ccbd 100644 --- a/src/Model/VpnResultMethods.php +++ b/src/Model/VpnResultMethods.php @@ -57,7 +57,8 @@ class VpnResultMethods implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'timezone_mismatch' => 'bool', -'public_vpn' => 'bool' ]; +'public_vpn' => 'bool', +'auxiliary_mobile' => 'bool' ]; /** * Array of property to format mappings. Used for (de)serialization @@ -66,7 +67,8 @@ class VpnResultMethods implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'timezone_mismatch' => null, -'public_vpn' => null ]; +'public_vpn' => null, +'auxiliary_mobile' => null ]; /** * Array of property to type mappings. Used for (de)serialization @@ -96,7 +98,8 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'timezone_mismatch' => 'timezoneMismatch', -'public_vpn' => 'publicVPN' ]; +'public_vpn' => 'publicVPN', +'auxiliary_mobile' => 'auxiliaryMobile' ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -105,7 +108,8 @@ public static function swaggerFormats() */ protected static $setters = [ 'timezone_mismatch' => 'setTimezoneMismatch', -'public_vpn' => 'setPublicVpn' ]; +'public_vpn' => 'setPublicVpn', +'auxiliary_mobile' => 'setAuxiliaryMobile' ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -114,7 +118,8 @@ public static function swaggerFormats() */ protected static $getters = [ 'timezone_mismatch' => 'getTimezoneMismatch', -'public_vpn' => 'getPublicVpn' ]; +'public_vpn' => 'getPublicVpn', +'auxiliary_mobile' => 'getAuxiliaryMobile' ]; /** * Array of attributes where the key is the local name, @@ -176,6 +181,7 @@ public function __construct(array $data = null) { $this->container['timezone_mismatch'] = isset($data['timezone_mismatch']) ? $data['timezone_mismatch'] : null; $this->container['public_vpn'] = isset($data['public_vpn']) ? $data['public_vpn'] : null; + $this->container['auxiliary_mobile'] = isset($data['auxiliary_mobile']) ? $data['auxiliary_mobile'] : null; } /** @@ -249,6 +255,30 @@ public function setPublicVpn($public_vpn) return $this; } + + /** + * Gets auxiliary_mobile + * + * @return bool + */ + public function getAuxiliaryMobile() + { + return $this->container['auxiliary_mobile']; + } + + /** + * Sets auxiliary_mobile + * + * @param bool $auxiliary_mobile This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. + * + * @return $this + */ + public function setAuxiliaryMobile($auxiliary_mobile) + { + $this->container['auxiliary_mobile'] = $auxiliary_mobile; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/test/mocks/get_event.json b/test/mocks/get_event.json index 79f2b97d..90abb41c 100644 --- a/test/mocks/get_event.json +++ b/test/mocks/get_event.json @@ -141,7 +141,8 @@ "result": false, "methods": { "timezoneMismatch": false, - "publicVPN": false + "publicVPN": false, + "auxiliaryMobile": false } } },