Skip to content

Commit a8a93db

Browse files
Merge pull request #3 from IcePanel/fern-bot/2026-06-05_19-46-04_546
SDK regeneration
2 parents befee2c + da4a623 commit a8a93db

809 files changed

Lines changed: 27674 additions & 2116 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.fern/metadata.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"cliVersion": "3.56.8",
2+
"cliVersion": "5.44.7",
33
"generatorName": "fernapi/fern-java-sdk",
4-
"generatorVersion": "3.34.6",
4+
"generatorVersion": "4.9.1",
55
"generatorConfig": {
66
"publish-to": "central",
77
"package-prefix": "com.icepanel",
@@ -12,5 +12,8 @@
1212
"package-layout": "flat",
1313
"use-local-date-for-dates": true
1414
},
15-
"sdkVersion": "0.1.4"
15+
"originGitCommit": "9f29099c1e75f465353107fd18a048873a6f3f81",
16+
"originGitCommitIsDirty": true,
17+
"invokedBy": "manual",
18+
"sdkVersion": "0.1.5"
1619
}

.fern/replay.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.fernignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Specify files that shouldn't be modified by Fern
2-
.github/workflows/ci.yml
2+
.github/workflows/ci.yml
3+
.fern/replay.lock
4+
.fern/replay.yml
5+
.gitattributes

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.fern/replay.lock linguist-generated=true

CONTRIBUTING.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Contributing
2+
3+
Thanks for your interest in contributing to this SDK! This document provides guidelines for contributing to the project.
4+
5+
## Getting Started
6+
7+
### Prerequisites
8+
9+
- Java 11+
10+
- Gradle
11+
12+
### Installation
13+
14+
Install the project dependencies:
15+
16+
```bash
17+
./gradlew build
18+
```
19+
20+
### Building
21+
22+
Build the project:
23+
24+
```bash
25+
./gradlew build
26+
```
27+
28+
### Testing
29+
30+
Run the test suite:
31+
32+
```bash
33+
./gradlew test
34+
```
35+
36+
### Formatting
37+
38+
Check and fix code style:
39+
40+
```bash
41+
./gradlew spotlessApply
42+
```
43+
44+
## About Generated Code
45+
46+
**Important**: Most files in this SDK are automatically generated by [Fern](https://buildwithfern.com) from the API definition. Direct modifications to generated files will be overwritten the next time the SDK is generated.
47+
48+
### Generated Files
49+
50+
The following directories contain generated code:
51+
- `src/` - API client classes and types
52+
- Most Java files in the project
53+
54+
### How to Customize
55+
56+
If you need to customize the SDK, you have two options:
57+
58+
#### Option 1: Use `.fernignore`
59+
60+
For custom code that should persist across SDK regenerations:
61+
62+
1. Create a `.fernignore` file in the project root
63+
2. Add file patterns for files you want to preserve (similar to `.gitignore` syntax)
64+
3. Add your custom code to those files
65+
66+
Files listed in `.fernignore` will not be overwritten when the SDK is regenerated.
67+
68+
For more information, see the [Fern documentation on custom code](https://buildwithfern.com/learn/sdks/overview/custom-code).
69+
70+
#### Option 2: Contribute to the Generator
71+
72+
If you want to change how code is generated for all users of this SDK:
73+
74+
1. The Java SDK generator lives in the [Fern repository](https://github.com/fern-api/fern)
75+
2. Generator code is located at `generators/java-v2/`
76+
3. Follow the [Fern contributing guidelines](https://github.com/fern-api/fern/blob/main/CONTRIBUTING.md)
77+
4. Submit a pull request with your changes to the generator
78+
79+
This approach is best for:
80+
- Bug fixes in generated code
81+
- New features that would benefit all users
82+
- Improvements to code generation patterns
83+
84+
## Making Changes
85+
86+
### Workflow
87+
88+
1. Create a new branch for your changes
89+
2. Make your modifications
90+
3. Run tests to ensure nothing breaks: `./gradlew test`
91+
4. Run formatting: `./gradlew spotlessApply`
92+
5. Build the project: `./gradlew build`
93+
6. Commit your changes with a clear commit message
94+
7. Push your branch and create a pull request
95+
96+
### Commit Messages
97+
98+
Write clear, descriptive commit messages that explain what changed and why.
99+
100+
### Code Style
101+
102+
This project uses automated code formatting. Run `./gradlew spotlessApply` before committing to ensure your code meets the project's style guidelines.
103+
104+
## Questions or Issues?
105+
106+
If you have questions or run into issues:
107+
108+
1. Check the [Fern documentation](https://buildwithfern.com)
109+
2. Search existing [GitHub issues](https://github.com/fern-api/fern/issues)
110+
3. Open a new issue if your question hasn't been addressed
111+
112+
## License
113+
114+
By contributing to this project, you agree that your contributions will be licensed under the same license as the project.

README.md

Lines changed: 57 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The IcePanel Java library provides convenient access to the IcePanel APIs from J
1212
- [Getting Started](#getting-started)
1313
- [Environments](#environments)
1414
- [Base Url](#base-url)
15+
- [Pagination](#pagination)
1516
- [Exception Handling](#exception-handling)
1617
- [Advanced](#advanced)
1718
- [Custom Client](#custom-client)
@@ -29,7 +30,7 @@ Add the dependency in your `build.gradle` file:
2930

3031
```groovy
3132
dependencies {
32-
implementation 'com.icepanel:sdk'
33+
implementation 'com.icepanel:sdk:0.1.5'
3334
}
3435
```
3536

@@ -41,7 +42,7 @@ Add the dependency in your `pom.xml` file:
4142
<dependency>
4243
<groupId>com.icepanel</groupId>
4344
<artifactId>sdk</artifactId>
44-
<version>0.1.4</version>
45+
<version>0.1.5</version>
4546
</dependency>
4647
```
4748

@@ -104,16 +105,56 @@ IcePanelClient client = IcePanelClient
104105
.build();
105106
```
106107

108+
## Pagination
109+
110+
Paginated requests will return an Iterable<T>, which can be used to loop through the underlying items, or stream them. You can also call
111+
`nextPage` to perform the pagination manually
112+
113+
```java
114+
import com.icepanel.IcePanelClient;
115+
import com.icepanel.core.SyncPagingIterable;
116+
import com.icepanel.types.ModelObjectExpanded;
117+
import java.util.List;
118+
119+
IcePanelClient client = IcePanelClient
120+
.builder()
121+
.build();
122+
123+
SyncPagingIterable<SyncPagingIterable<ModelObjectExpanded>> response = client.model().objects().list(...);
124+
125+
// Iterator
126+
for (item : response){
127+
// Do something with item
128+
}
129+
130+
// Streaming
131+
response.streamItems().map(item -> ...);
132+
133+
// Manual pagination
134+
for (
135+
List<SyncPagingIterable<ModelObjectExpanded>> items = response.getItems;
136+
response.hasNext();
137+
items = items.nextPage().getItems()) {
138+
// Do something with items
139+
}
140+
141+
// Access pagination metadata
142+
response.getResponse().ifPresent(r -> {
143+
String cursor = r.getNext();
144+
// Use cursor for stateless pagination
145+
});
146+
```
147+
107148
## Exception Handling
108149

109150
When the API returns a non-success status code (4xx or 5xx response), an API exception will be thrown.
110151

111152
```java
112-
import com.icepanel.core.IcepanelApiApiException;
153+
import com.icepanel.core.IcePanelClientApiException;
113154

114155
try{
115156
client.model().objects().list(...);
116-
} catch (IcepanelApiApiException e){
157+
} catch (IcePanelClientApiException e){
117158
// Do something with the API exception...
118159
}
119160
```
@@ -145,11 +186,19 @@ retry limit (default: 2). Before defaulting to exponential backoff, the SDK will
145186
the `Retry-After` header (as either in seconds or as an HTTP date), and then the `X-RateLimit-Reset` header
146187
(as a Unix timestamp in epoch seconds); failing both of those, it will fall back to exponential backoff.
147188

148-
A request is deemed retryable when any of the following HTTP status codes is returned:
189+
Which status codes are retried depends on the `retry-status-codes` generator configuration:
190+
191+
**`legacy`** (current default): retries on
192+
- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
193+
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
194+
- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#server_error_responses) (All server errors, including 500)
149195

196+
**`recommended`**: retries on
150197
- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
151198
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
152-
- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
199+
- [502](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502) (Bad Gateway)
200+
- [503](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503) (Service Unavailable)
201+
- [504](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504) (Gateway Timeout)
153202

154203
Use the `maxRetries` client option to configure this behavior.
155204

@@ -218,7 +267,7 @@ The `withRawResponse()` method returns a raw client that wraps all responses wit
218267
(A normal client's `response` is identical to a raw client's `response.body()`.)
219268

220269
```java
221-
ListHttpResponse response = client.model().objects().withRawResponse().list(...);
270+
IcePanelClientHttpResponse response = client.model().objects().withRawResponse().list(...);
222271

223272
System.out.println(response.body());
224273
System.out.println(response.headers().get("X-My-Header"));
@@ -232,4 +281,4 @@ otherwise they would be overwritten upon the next generated release. Feel free t
232281
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
233282
an issue first to discuss with us!
234283

235-
On the other hand, contributions to the README are always very welcome!
284+
On the other hand, contributions to the README are always very welcome!

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ repositories {
1515

1616
dependencies {
1717
api 'com.squareup.okhttp3:okhttp:5.2.1'
18-
api 'com.fasterxml.jackson.core:jackson-databind:2.18.2'
19-
api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2'
20-
api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2'
18+
api 'com.fasterxml.jackson.core:jackson-databind:2.18.6'
19+
api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.6'
20+
api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.6'
2121
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
2222
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
2323
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.2'
@@ -47,7 +47,7 @@ java {
4747

4848
group = 'com.icepanel'
4949

50-
version = '0.1.4'
50+
version = '0.1.5'
5151

5252
jar {
5353
dependsOn(":generatePomFileForMavenPublication")
@@ -78,7 +78,7 @@ publishing {
7878
maven(MavenPublication) {
7979
groupId = 'com.icepanel'
8080
artifactId = 'sdk'
81-
version = '0.1.4'
81+
version = '0.1.5'
8282
from components.java
8383
pom {
8484
name = 'IcePanel <mail@icepanel.io>'

0 commit comments

Comments
 (0)