Skip to content

Commit

Permalink
feat: use datacenter instead of the wrong dataCenter
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `IpInfo` field `dataCenter` renamed to `datacenter`
  • Loading branch information
ilfa committed Jan 10, 2024
1 parent 0ac17da commit 33f7336
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 270 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ Class | Method | HTTP request | Description
- [BrowserDetails](docs/BrowserDetails.md)
- [Confidence](docs/Confidence.md)
- [DataCenter](docs/DataCenter.md)
- [DataCenterInfo](docs/DataCenterInfo.md)
- [Error](docs/Error.md)
- [ErrorEvent403Response](docs/ErrorEvent403Response.md)
- [ErrorEvent403ResponseError](docs/ErrorEvent403ResponseError.md)
Expand Down
1 change: 0 additions & 1 deletion docs/DataCenter.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# DataCenter

`dataCenter` is deprecated in favor of `datacenter`

## Properties

Expand Down
14 changes: 0 additions & 14 deletions docs/DataCenterInfo.md

This file was deleted.

3 changes: 1 addition & 2 deletions docs/IpInfoResultV4.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
|**address** | **String** | | [optional] |
|**geolocation** | [**IPLocation**](IPLocation.md) | | [optional] |
|**asn** | [**ASN**](ASN.md) | | [optional] |
|**datacenter** | [**DataCenterInfo**](DataCenterInfo.md) | | [optional] |
|**dataCenter** | [**DataCenter**](DataCenter.md) | | [optional] |
|**datacenter** | [**DataCenter**](DataCenter.md) | | [optional] |



3 changes: 1 addition & 2 deletions docs/IpInfoResultV6.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
|**address** | **String** | | [optional] |
|**geolocation** | [**IPLocation**](IPLocation.md) | | [optional] |
|**asn** | [**ASN**](ASN.md) | | [optional] |
|**datacenter** | [**DataCenterInfo**](DataCenterInfo.md) | | [optional] |
|**dataCenter** | [**DataCenter**](DataCenter.md) | | [optional] |
|**datacenter** | [**DataCenter**](DataCenter.md) | | [optional] |



18 changes: 0 additions & 18 deletions res/fingerprint-server-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4320,22 +4320,8 @@ components:
- asn
- network
title: ASN
DataCenterInfo:
type: object
additionalProperties: false
properties:
result:
type: boolean
name:
type: string
example: DediPath
required:
- result
title: DataCenterInfo
DataCenter:
type: object
deprecated: true
description: '`dataCenter` is deprecated in favor of `datacenter`'
additionalProperties: false
properties:
result:
Expand Down Expand Up @@ -4878,8 +4864,6 @@ components:
asn:
$ref: '#/components/schemas/ASN'
datacenter:
$ref: '#/components/schemas/DataCenterInfo'
dataCenter:
$ref: '#/components/schemas/DataCenter'
v6:
type: object
Expand All @@ -4894,8 +4878,6 @@ components:
asn:
$ref: '#/components/schemas/ASN'
datacenter:
$ref: '#/components/schemas/DataCenterInfo'
dataCenter:
$ref: '#/components/schemas/DataCenter'
IpBlockListResult:
type: object
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/com/fingerprint/model/DataCenter.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@


/**
* `dataCenter` is deprecated in favor of `datacenter`
* @deprecated
* DataCenter
*/
@Deprecated
@ApiModel(description = "`dataCenter` is deprecated in favor of `datacenter`")
@JsonPropertyOrder({
DataCenter.JSON_PROPERTY_RESULT,
DataCenter.JSON_PROPERTY_NAME
Expand Down
144 changes: 0 additions & 144 deletions src/main/java/com/fingerprint/model/DataCenterInfo.java

This file was deleted.

49 changes: 7 additions & 42 deletions src/main/java/com/fingerprint/model/IpInfoResultV4.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import com.fasterxml.jackson.annotation.JsonValue;
import com.fingerprint.model.ASN;
import com.fingerprint.model.DataCenter;
import com.fingerprint.model.DataCenterInfo;
import com.fingerprint.model.IPLocation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
Expand All @@ -39,8 +38,7 @@
IpInfoResultV4.JSON_PROPERTY_ADDRESS,
IpInfoResultV4.JSON_PROPERTY_GEOLOCATION,
IpInfoResultV4.JSON_PROPERTY_ASN,
IpInfoResultV4.JSON_PROPERTY_DATACENTER,
IpInfoResultV4.JSON_PROPERTY_DATA_CENTER
IpInfoResultV4.JSON_PROPERTY_DATACENTER
})
@JsonTypeName("IpInfoResult_v4")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
Expand All @@ -55,10 +53,7 @@ public class IpInfoResultV4 {
private ASN asn;

public static final String JSON_PROPERTY_DATACENTER = "datacenter";
private DataCenterInfo datacenter;

public static final String JSON_PROPERTY_DATA_CENTER = "dataCenter";
private DataCenter dataCenter;
private DataCenter datacenter;

public IpInfoResultV4() {
}
Expand Down Expand Up @@ -143,7 +138,7 @@ public void setAsn(ASN asn) {
}


public IpInfoResultV4 datacenter(DataCenterInfo datacenter) {
public IpInfoResultV4 datacenter(DataCenter datacenter) {
this.datacenter = datacenter;
return this;
}
Expand All @@ -157,46 +152,18 @@ public IpInfoResultV4 datacenter(DataCenterInfo datacenter) {
@JsonProperty(JSON_PROPERTY_DATACENTER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public DataCenterInfo getDatacenter() {
public DataCenter getDatacenter() {
return datacenter;
}


@JsonProperty(JSON_PROPERTY_DATACENTER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDatacenter(DataCenterInfo datacenter) {
public void setDatacenter(DataCenter datacenter) {
this.datacenter = datacenter;
}


public IpInfoResultV4 dataCenter(DataCenter dataCenter) {
this.dataCenter = dataCenter;
return this;
}

/**
* Get dataCenter
* @return dataCenter
* @deprecated
**/
@Deprecated
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DATA_CENTER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

public DataCenter getDataCenter() {
return dataCenter;
}


@JsonProperty(JSON_PROPERTY_DATA_CENTER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDataCenter(DataCenter dataCenter) {
this.dataCenter = dataCenter;
}


/**
* Return true if this IpInfoResult_v4 object is equal to o.
*/
Expand All @@ -212,13 +179,12 @@ public boolean equals(Object o) {
return Objects.equals(this.address, ipInfoResultV4.address) &&
Objects.equals(this.geolocation, ipInfoResultV4.geolocation) &&
Objects.equals(this.asn, ipInfoResultV4.asn) &&
Objects.equals(this.datacenter, ipInfoResultV4.datacenter) &&
Objects.equals(this.dataCenter, ipInfoResultV4.dataCenter);
Objects.equals(this.datacenter, ipInfoResultV4.datacenter);
}

@Override
public int hashCode() {
return Objects.hash(address, geolocation, asn, datacenter, dataCenter);
return Objects.hash(address, geolocation, asn, datacenter);
}

@Override
Expand All @@ -229,7 +195,6 @@ public String toString() {
sb.append(" geolocation: ").append(toIndentedString(geolocation)).append("\n");
sb.append(" asn: ").append(toIndentedString(asn)).append("\n");
sb.append(" datacenter: ").append(toIndentedString(datacenter)).append("\n");
sb.append(" dataCenter: ").append(toIndentedString(dataCenter)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down
Loading

0 comments on commit 33f7336

Please sign in to comment.