Skip to content

Commit 3dbddb8

Browse files
Create explicit schemas for enums (#40)
To avoid Fern automatically creating types for enums, we now define them explicitly so that we control the outcome. Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 0dc9206 commit 3dbddb8

19 files changed

+212
-748
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Add the dependency in your `pom.xml` file:
2525
<dependency>
2626
<groupId>com.pipedream</groupId>
2727
<artifactId>pipedream</artifactId>
28-
<version>1.0.1</version>
28+
<version>1.0.2</version>
2929
</dependency>
3030
```
3131

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ java {
4747

4848
group = 'com.pipedream'
4949

50-
version = '1.0.1'
50+
version = '1.0.2'
5151

5252
jar {
5353
dependsOn(":generatePomFileForMavenPublication")
@@ -78,7 +78,7 @@ publishing {
7878
maven(MavenPublication) {
7979
groupId = 'com.pipedream'
8080
artifactId = 'pipedream'
81-
version = '1.0.1'
81+
version = '1.0.2'
8282
from components.java
8383
pom {
8484
name = 'pipedream'

src/main/java/com/pipedream/api/core/ClientOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ private ClientOptions(
3535
this.headers.putAll(headers);
3636
this.headers.putAll(new HashMap<String, String>() {
3737
{
38-
put("User-Agent", "com.pipedream:pipedream/1.0.1");
38+
put("User-Agent", "com.pipedream:pipedream/1.0.2");
3939
put("X-Fern-Language", "JAVA");
4040
put("X-Fern-SDK-Name", "com.pipedream.fern:api-sdk");
41-
put("X-Fern-SDK-Version", "1.0.1");
41+
put("X-Fern-SDK-Version", "1.0.2");
4242
}
4343
});
4444
this.headerSuppliers = headerSuppliers;

src/main/java/com/pipedream/api/resources/actions/requests/RunActionOpts.java

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import com.fasterxml.jackson.annotation.Nulls;
1313
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
1414
import com.pipedream.api.core.ObjectMappers;
15-
import com.pipedream.api.resources.actions.types.RunActionOptsStashId;
15+
import com.pipedream.api.types.RunActionOptsStashId;
1616
import java.util.HashMap;
1717
import java.util.Map;
1818
import java.util.Objects;
@@ -90,9 +90,6 @@ public Optional<String> getDynamicPropsId() {
9090
return dynamicPropsId;
9191
}
9292

93-
/**
94-
* @return The ID of the File Stash to use for syncing the action's /tmp directory
95-
*/
9693
@JsonProperty("stash_id")
9794
public Optional<RunActionOptsStashId> getStashId() {
9895
return stashId;
@@ -175,9 +172,6 @@ public interface _FinalStage {
175172

176173
_FinalStage dynamicPropsId(String dynamicPropsId);
177174

178-
/**
179-
* <p>The ID of the File Stash to use for syncing the action's /tmp directory</p>
180-
*/
181175
_FinalStage stashId(Optional<RunActionOptsStashId> stashId);
182176

183177
_FinalStage stashId(RunActionOptsStashId stashId);
@@ -237,19 +231,12 @@ public _FinalStage externalUserId(@NotNull String externalUserId) {
237231
return this;
238232
}
239233

240-
/**
241-
* <p>The ID of the File Stash to use for syncing the action's /tmp directory</p>
242-
* @return Reference to {@code this} so that method calls can be chained together.
243-
*/
244234
@java.lang.Override
245235
public _FinalStage stashId(RunActionOptsStashId stashId) {
246236
this.stashId = Optional.ofNullable(stashId);
247237
return this;
248238
}
249239

250-
/**
251-
* <p>The ID of the File Stash to use for syncing the action's /tmp directory</p>
252-
*/
253240
@java.lang.Override
254241
@JsonSetter(value = "stash_id", nulls = Nulls.SKIP)
255242
public _FinalStage stashId(Optional<RunActionOptsStashId> stashId) {

src/main/java/com/pipedream/api/resources/tokens/AsyncRawTokensClient.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,7 @@ public CompletableFuture<BaseClientHttpResponse<ValidateTokenResponse>> validate
110110
String ctok, TokensValidateRequest request, RequestOptions requestOptions) {
111111
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
112112
.newBuilder()
113-
.addPathSegments("v1/connect")
114-
.addPathSegment(clientOptions.projectId())
115-
.addPathSegments("tokens")
113+
.addPathSegments("v1/connect/tokens")
116114
.addPathSegment(ctok)
117115
.addPathSegments("validate");
118116
if (request.getParams().isPresent()) {

src/main/java/com/pipedream/api/resources/tokens/RawTokensClient.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ public BaseClientHttpResponse<ValidateTokenResponse> validate(
9191
String ctok, TokensValidateRequest request, RequestOptions requestOptions) {
9292
HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
9393
.newBuilder()
94-
.addPathSegments("v1/connect")
95-
.addPathSegment(clientOptions.projectId())
96-
.addPathSegments("tokens")
94+
.addPathSegments("v1/connect/tokens")
9795
.addPathSegment(ctok)
9896
.addPathSegments("validate");
9997
if (request.getParams().isPresent()) {

src/main/java/com/pipedream/api/types/App.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ public String getName() {
9090
return name;
9191
}
9292

93-
/**
94-
* @return The authentication type used by the app
95-
*/
9693
@JsonProperty("auth_type")
9794
public Optional<AppAuthType> getAuthType() {
9895
return authType;
@@ -224,9 +221,6 @@ public interface _FinalStage {
224221

225222
_FinalStage id(String id);
226223

227-
/**
228-
* <p>The authentication type used by the app</p>
229-
*/
230224
_FinalStage authType(Optional<AppAuthType> authType);
231225

232226
_FinalStage authType(AppAuthType authType);
@@ -414,19 +408,12 @@ public _FinalStage description(Optional<String> description) {
414408
return this;
415409
}
416410

417-
/**
418-
* <p>The authentication type used by the app</p>
419-
* @return Reference to {@code this} so that method calls can be chained together.
420-
*/
421411
@java.lang.Override
422412
public _FinalStage authType(AppAuthType authType) {
423413
this.authType = Optional.ofNullable(authType);
424414
return this;
425415
}
426416

427-
/**
428-
* <p>The authentication type used by the app</p>
429-
*/
430417
@java.lang.Override
431418
@JsonSetter(value = "auth_type", nulls = Nulls.SKIP)
432419
public _FinalStage authType(Optional<AppAuthType> authType) {

src/main/java/com/pipedream/api/types/Component.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,6 @@ public Optional<String> getComponentType() {
103103
return componentType;
104104
}
105105

106-
/**
107-
* @return Indicates if a File Stash ID is optional or required to run the component
108-
*/
109106
@JsonProperty("stash")
110107
public Optional<ComponentStash> getStash() {
111108
return stash;
@@ -199,9 +196,6 @@ public interface _FinalStage {
199196

200197
_FinalStage componentType(String componentType);
201198

202-
/**
203-
* <p>Indicates if a File Stash ID is optional or required to run the component</p>
204-
*/
205199
_FinalStage stash(Optional<ComponentStash> stash);
206200

207201
_FinalStage stash(ComponentStash stash);
@@ -276,19 +270,12 @@ public _FinalStage version(@NotNull String version) {
276270
return this;
277271
}
278272

279-
/**
280-
* <p>Indicates if a File Stash ID is optional or required to run the component</p>
281-
* @return Reference to {@code this} so that method calls can be chained together.
282-
*/
283273
@java.lang.Override
284274
public _FinalStage stash(ComponentStash stash) {
285275
this.stash = Optional.ofNullable(stash);
286276
return this;
287277
}
288278

289-
/**
290-
* <p>Indicates if a File Stash ID is optional or required to run the component</p>
291-
*/
292279
@java.lang.Override
293280
@JsonSetter(value = "stash", nulls = Nulls.SKIP)
294281
public _FinalStage stash(Optional<ComponentStash> stash) {

src/main/java/com/pipedream/api/types/ConfigurablePropAlert.java

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
public final class ConfigurablePropAlert {
2424
private final Optional<String> type;
2525

26-
private final Optional<ConfigurablePropAlertAlertType> alertType;
26+
private final Optional<ConfigurablePropAlertType> alertType;
2727

2828
private final Optional<String> content;
2929

@@ -51,7 +51,7 @@ public final class ConfigurablePropAlert {
5151

5252
private ConfigurablePropAlert(
5353
Optional<String> type,
54-
Optional<ConfigurablePropAlertAlertType> alertType,
54+
Optional<ConfigurablePropAlertType> alertType,
5555
Optional<String> content,
5656
String name,
5757
Optional<String> label,
@@ -85,11 +85,8 @@ public Optional<String> getType() {
8585
return type;
8686
}
8787

88-
/**
89-
* @return The severity level of the alert.
90-
*/
9188
@JsonProperty("alertType")
92-
public Optional<ConfigurablePropAlertAlertType> getAlertType() {
89+
public Optional<ConfigurablePropAlertType> getAlertType() {
9390
return alertType;
9491
}
9592

@@ -251,12 +248,9 @@ public interface _FinalStage {
251248

252249
_FinalStage type(String type);
253250

254-
/**
255-
* <p>The severity level of the alert.</p>
256-
*/
257-
_FinalStage alertType(Optional<ConfigurablePropAlertAlertType> alertType);
251+
_FinalStage alertType(Optional<ConfigurablePropAlertType> alertType);
258252

259-
_FinalStage alertType(ConfigurablePropAlertAlertType alertType);
253+
_FinalStage alertType(ConfigurablePropAlertType alertType);
260254

261255
/**
262256
* <p>The content of the alert, which can include HTML or plain text.</p>
@@ -353,7 +347,7 @@ public static final class Builder implements NameStage, _FinalStage {
353347

354348
private Optional<String> content = Optional.empty();
355349

356-
private Optional<ConfigurablePropAlertAlertType> alertType = Optional.empty();
350+
private Optional<ConfigurablePropAlertType> alertType = Optional.empty();
357351

358352
private Optional<String> type = Optional.empty();
359353

@@ -592,22 +586,15 @@ public _FinalStage content(Optional<String> content) {
592586
return this;
593587
}
594588

595-
/**
596-
* <p>The severity level of the alert.</p>
597-
* @return Reference to {@code this} so that method calls can be chained together.
598-
*/
599589
@java.lang.Override
600-
public _FinalStage alertType(ConfigurablePropAlertAlertType alertType) {
590+
public _FinalStage alertType(ConfigurablePropAlertType alertType) {
601591
this.alertType = Optional.ofNullable(alertType);
602592
return this;
603593
}
604594

605-
/**
606-
* <p>The severity level of the alert.</p>
607-
*/
608595
@java.lang.Override
609596
@JsonSetter(value = "alertType", nulls = Nulls.SKIP)
610-
public _FinalStage alertType(Optional<ConfigurablePropAlertAlertType> alertType) {
597+
public _FinalStage alertType(Optional<ConfigurablePropAlertType> alertType) {
611598
this.alertType = alertType;
612599
return this;
613600
}

src/main/java/com/pipedream/api/types/ConfigurablePropAlertAlertType.java renamed to src/main/java/com/pipedream/api/types/ConfigurablePropAlertType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import com.fasterxml.jackson.annotation.JsonValue;
77

8-
public enum ConfigurablePropAlertAlertType {
8+
public enum ConfigurablePropAlertType {
99
INFO("info"),
1010

1111
NEUTRAL("neutral"),
@@ -16,7 +16,7 @@ public enum ConfigurablePropAlertAlertType {
1616

1717
private final String value;
1818

19-
ConfigurablePropAlertAlertType(String value) {
19+
ConfigurablePropAlertType(String value) {
2020
this.value = value;
2121
}
2222

0 commit comments

Comments
 (0)