Skip to content

Commit 57d9679

Browse files
committed
Prepare for switch to 52-bit long identifier
See Hetzner Cloud announcement https://docs.hetzner.cloud/changelog#2023-05-15-api-will-return-up-to-52-bit-ids Signed-off-by: Richard Kosegi <[email protected]>
1 parent 5ab6694 commit 57d9679

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/resources/api.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ components:
1313
description: Item identifier
1414
schema:
1515
type: integer
16-
format: int32
16+
format: int64
1717
minimum: 0
1818
schemas:
1919
Identifier:
2020
description: Object identifier/unique key
21-
format: int32
21+
format: int64
2222
type: integer
2323

2424
Labeled:

src/test/java/cloud/dnation/hetznerclient/BasicTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void testGetNetworkById() throws IOException {
5656
Call<GetNetworkByIdResponse> call = api.getNetworkById(10);
5757
GetNetworkByIdResponse result = call.execute().body();
5858
assertEquals("my-net-1", result.getNetwork().getName());
59-
assertEquals(10, (int)result.getNetwork().getId());
59+
assertEquals(10, (long)result.getNetwork().getId());
6060
assertEquals("10.132.0.0/14", result.getNetwork().getIpRange());
6161
}
6262

@@ -78,7 +78,7 @@ public void testGetNetworksBySelector() throws IOException {
7878
Call<GetNetworksBySelectorResponse> call = api.getNetworkBySelector("test=1");
7979
GetNetworksBySelectorResponse result = call.execute().body();
8080
assertEquals(1, result.getNetworks().size());
81-
assertEquals(12, (int) result.getNetworks().get(0).getId());
81+
assertEquals(12, (long) result.getNetworks().get(0).getId());
8282
assertEquals("my-net-2", result.getNetworks().get(0).getName());
8383
assertEquals("10.132.0.0/14", result.getNetworks().get(0).getIpRange());
8484
assertEquals("1", result.getMeta().getPagination().getTotalEntries());

0 commit comments

Comments
 (0)