Skip to content

Commit

Permalink
Merge pull request #82 from fingerprintjs/INTER-481-fixed-datacenter-…
Browse files Browse the repository at this point in the history
…name

Use `datacenter` field for the `IpInfo` signal instead of the wrong `dataCenter`, deprecate `IPLocation`
  • Loading branch information
ilfa authored Jan 11, 2024
2 parents d2d09a9 + 19158aa commit ce76979
Show file tree
Hide file tree
Showing 13 changed files with 50 additions and 973 deletions.
2 changes: 2 additions & 0 deletions docs/Model/IPLocation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# IPLocation
This field is **deprecated** and will not return a result for **accounts created after December 18th, 2023**. Please use the [`ipInfo` Smart signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) for geolocation information.


## Properties
Name | Type | Description | Notes
Expand Down
2 changes: 1 addition & 1 deletion docs/Model/IpInfoResultV4.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
**address** | **string** | | [optional]
**geolocation** | [**\Fingerprint\ServerAPI\Model\IPLocation**](IPLocation.md) | | [optional]
**asn** | [**\Fingerprint\ServerAPI\Model\ASN**](ASN.md) | | [optional]
**data_center** | [**\Fingerprint\ServerAPI\Model\DataCenter**](DataCenter.md) | | [optional]
**datacenter** | [**\Fingerprint\ServerAPI\Model\DataCenter**](DataCenter.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)

2 changes: 1 addition & 1 deletion docs/Model/IpInfoResultV6.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
**address** | **string** | | [optional]
**geolocation** | [**\Fingerprint\ServerAPI\Model\IPLocation**](IPLocation.md) | | [optional]
**asn** | [**\Fingerprint\ServerAPI\Model\ASN**](ASN.md) | | [optional]
**data_center** | [**\Fingerprint\ServerAPI\Model\DataCenter**](DataCenter.md) | | [optional]
**datacenter** | [**\Fingerprint\ServerAPI\Model\DataCenter**](DataCenter.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)

14 changes: 10 additions & 4 deletions res/fingerprint-server-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ paths:
asn: '7922'
name: COMCAST-7922
network: 73.136.0.0/13
dataCenter:
datacenter:
result: true
name: DediPath
incognito:
Expand Down Expand Up @@ -3701,7 +3701,7 @@ paths:
asn: '7922'
name: COMCAST-7922
network: 73.136.0.0/13
dataCenter:
datacenter:
result: true
name: DediPath
rootApps:
Expand Down Expand Up @@ -4335,6 +4335,12 @@ components:
IPLocation:
type: object
additionalProperties: false
deprecated: true
description: >-
This field is **deprecated** and will not return a result for **accounts
created after December 18th, 2023**. Please use the [`ipInfo` Smart
signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation)
for geolocation information.
properties:
accuracyRadius:
description: >-
Expand Down Expand Up @@ -4857,7 +4863,7 @@ components:
$ref: '#/components/schemas/IPLocation'
asn:
$ref: '#/components/schemas/ASN'
dataCenter:
datacenter:
$ref: '#/components/schemas/DataCenter'
v6:
type: object
Expand All @@ -4871,7 +4877,7 @@ components:
$ref: '#/components/schemas/IPLocation'
asn:
$ref: '#/components/schemas/ASN'
dataCenter:
datacenter:
$ref: '#/components/schemas/DataCenter'
IpBlockListResult:
type: object
Expand Down
3 changes: 3 additions & 0 deletions scripts/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ platform=$(uname)
fi
)

# clean models before generating
rm -f ./src/Model/*

java -jar ./bin/swagger-codegen-cli.jar generate -t ./template -l php -i ./res/fingerprint-server-api.yaml -o ./ -c config.json

# fix invalid code generated for structure with additionalProperties
Expand Down
4 changes: 4 additions & 0 deletions scripts/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@ for example in ${examplesList[*]}; do
curl -o ./test/mocks/"$example" https://fingerprintjs.github.io/fingerprint-pro-server-api-openapi/examples/"$example"
done

# PHP function names are case insensitive, so we can just ignore wrong DataCenter value from INTER-481 bug.
# this command looks between IpInfoResult and IpBlockListResult strings and deletes the line with "dataCenter:" and next one if found
sed -i '' '/IpInfoResult:/,/IpBlockListResult:/ { /dataCenter:/ { N; d; }; }' ./res/fingerprint-server-api.yaml

./scripts/generate.sh
291 changes: 0 additions & 291 deletions src/Model/ErrorResponse.php

This file was deleted.

Loading

0 comments on commit ce76979

Please sign in to comment.