Skip to content

Commit

Permalink
fix: update OpenAPI Schema with auxiliaryMobile method for VPN signal
Browse files Browse the repository at this point in the history
  • Loading branch information
ilfa committed Sep 19, 2023
1 parent 36fcfe3 commit ab8c25a
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/Model/VpnResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions docs/Model/VpnResultMethods.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

10 changes: 9 additions & 1 deletion res/fingerprint-server-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ paths:
methods:
timezoneMismatch: false
publicVPN: false
auxiliaryMobile: false
proxy:
data:
result: false
Expand Down Expand Up @@ -3812,6 +3813,7 @@ paths:
methods:
timezoneMismatch: false
publicVPN: false
auxiliaryMobile: false
proxy:
result: false
tampering:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/Model/VpnResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
40 changes: 35 additions & 5 deletions src/Model/VpnResultMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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,
Expand Down Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -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.
*
Expand Down
3 changes: 2 additions & 1 deletion test/mocks/get_event.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@
"result": false,
"methods": {
"timezoneMismatch": false,
"publicVPN": false
"publicVPN": false,
"auxiliaryMobile": false
}
}
},
Expand Down

0 comments on commit ab8c25a

Please sign in to comment.