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 9fd2591 commit 15ca8db
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/VpnResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**result** | **Boolean** | VPN or other anonymising service has been used when sending the request. | [optional] |
|**result** | **Boolean** | VPN or other anonymizing service has been used when sending the request. | [optional] |
|**methods** | [**VpnResultMethods**](VpnResultMethods.md) | | [optional] |


Expand Down
1 change: 1 addition & 0 deletions docs/VpnResultMethods.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
|------------ | ------------- | ------------- | -------------|
|**timezoneMismatch** | **Boolean** | User's browser timezone doesn't match the timezone from which the request was originally made. | [optional] |
|**publicVPN** | **Boolean** | Request IP address is owned and used by a public VPN service provider. | [optional] |
|**auxiliaryMobile** | **Boolean** | This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. | [optional] |



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
4 changes: 2 additions & 2 deletions src/main/java/com/fingerprint/model/VpnResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ public VpnResult result(Boolean result) {
}

/**
* VPN or other anonymising service has been used when sending the request.
* VPN or other anonymizing service has been used when sending the request.
* @return result
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "false", value = "VPN or other anonymising service has been used when sending the request.")
@ApiModelProperty(example = "false", value = "VPN or other anonymizing service has been used when sending the request.")
@JsonProperty(JSON_PROPERTY_RESULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

Expand Down
38 changes: 35 additions & 3 deletions src/main/java/com/fingerprint/model/VpnResultMethods.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
*/
@JsonPropertyOrder({
VpnResultMethods.JSON_PROPERTY_TIMEZONE_MISMATCH,
VpnResultMethods.JSON_PROPERTY_PUBLIC_V_P_N
VpnResultMethods.JSON_PROPERTY_PUBLIC_V_P_N,
VpnResultMethods.JSON_PROPERTY_AUXILIARY_MOBILE
})
@JsonTypeName("VpnResult_methods")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
Expand All @@ -44,6 +45,9 @@ public class VpnResultMethods {
public static final String JSON_PROPERTY_PUBLIC_V_P_N = "publicVPN";
private Boolean publicVPN;

public static final String JSON_PROPERTY_AUXILIARY_MOBILE = "auxiliaryMobile";
private Boolean auxiliaryMobile;

public VpnResultMethods() {
}

Expand Down Expand Up @@ -99,6 +103,32 @@ public void setPublicVPN(Boolean publicVPN) {
}


public VpnResultMethods auxiliaryMobile(Boolean auxiliaryMobile) {
this.auxiliaryMobile = auxiliaryMobile;
return this;
}

/**
* This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices.
* @return auxiliaryMobile
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "false", value = "This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices.")
@JsonProperty(JSON_PROPERTY_AUXILIARY_MOBILE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public Boolean getAuxiliaryMobile() {
return auxiliaryMobile;
}


@JsonProperty(JSON_PROPERTY_AUXILIARY_MOBILE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAuxiliaryMobile(Boolean auxiliaryMobile) {
this.auxiliaryMobile = auxiliaryMobile;
}


/**
* Return true if this VpnResult_methods object is equal to o.
*/
Expand All @@ -112,12 +142,13 @@ public boolean equals(Object o) {
}
VpnResultMethods vpnResultMethods = (VpnResultMethods) o;
return Objects.equals(this.timezoneMismatch, vpnResultMethods.timezoneMismatch) &&
Objects.equals(this.publicVPN, vpnResultMethods.publicVPN);
Objects.equals(this.publicVPN, vpnResultMethods.publicVPN) &&
Objects.equals(this.auxiliaryMobile, vpnResultMethods.auxiliaryMobile);
}

@Override
public int hashCode() {
return Objects.hash(timezoneMismatch, publicVPN);
return Objects.hash(timezoneMismatch, publicVPN, auxiliaryMobile);
}

@Override
Expand All @@ -126,6 +157,7 @@ public String toString() {
sb.append("class VpnResultMethods {\n");
sb.append(" timezoneMismatch: ").append(toIndentedString(timezoneMismatch)).append("\n");
sb.append(" publicVPN: ").append(toIndentedString(publicVPN)).append("\n");
sb.append(" auxiliaryMobile: ").append(toIndentedString(auxiliaryMobile)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/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 15ca8db

Please sign in to comment.