From 3ca8b1c0607e2372f96c5431652145e3498c1d0b Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2026 14:50:28 +0000 Subject: [PATCH] refactor: remove unused ErrorResponse type from summary package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ErrorResponse class has been removed from the summary types package as it is no longer needed in the API. This cleanup removes unused code and simplifies the SDK structure. Key changes: - Remove ErrorResponse class from com.phenoml.api.resources.summary.types package - Clean up associated builder pattern and serialization annotations - Eliminate unused success and error field definitions 🌿 Generated with Fern --- build.gradle | 4 +- changelog.md | 3 + .../com/phenoml/api/core/ClientOptions.java | 4 +- .../summary/types/ErrorResponse.java | 123 ------------------ 4 files changed, 7 insertions(+), 127 deletions(-) delete mode 100644 src/main/java/com/phenoml/api/resources/summary/types/ErrorResponse.java diff --git a/build.gradle b/build.gradle index a23fba2..ef9cc15 100644 --- a/build.gradle +++ b/build.gradle @@ -47,7 +47,7 @@ java { group = 'com.phenoml.maven' -version = '9.1.0' +version = '10.0.0' jar { dependsOn(":generatePomFileForMavenPublication") @@ -78,7 +78,7 @@ publishing { maven(MavenPublication) { groupId = 'com.phenoml.maven' artifactId = 'phenoml-java-sdk' - version = '9.1.0' + version = '10.0.0' from components.java pom { name = 'phenoml' diff --git a/changelog.md b/changelog.md index 336f813..a3e18e8 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +## 10.0.0 - 2026-03-11 +* The `ErrorResponse` class has been removed from the summary types package. If your code references `com.phenoml.api.resources.summary.types.ErrorResponse`, you'll need to update your imports and error handling logic to use alternative error response types available in the SDK. + ## 9.1.0 - 2026-03-09 * feat: add HTTP 429 and 503 error handling to FHIR client * Enhance the FHIR client with comprehensive error handling for rate limiting (429) and service unavailability (503) scenarios. This improves the SDK's resilience and provides better error feedback to developers. diff --git a/src/main/java/com/phenoml/api/core/ClientOptions.java b/src/main/java/com/phenoml/api/core/ClientOptions.java index b74b9a0..2bb1790 100644 --- a/src/main/java/com/phenoml/api/core/ClientOptions.java +++ b/src/main/java/com/phenoml/api/core/ClientOptions.java @@ -32,10 +32,10 @@ private ClientOptions( this.headers.putAll(headers); this.headers.putAll(new HashMap() { { - put("User-Agent", "com.phenoml.maven:phenoml-java-sdk/9.1.0"); + put("User-Agent", "com.phenoml.maven:phenoml-java-sdk/10.0.0"); put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.phenoml.fern:api-sdk"); - put("X-Fern-SDK-Version", "9.1.0"); + put("X-Fern-SDK-Version", "10.0.0"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/com/phenoml/api/resources/summary/types/ErrorResponse.java b/src/main/java/com/phenoml/api/resources/summary/types/ErrorResponse.java deleted file mode 100644 index 6328adc..0000000 --- a/src/main/java/com/phenoml/api/resources/summary/types/ErrorResponse.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.phenoml.api.resources.summary.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.phenoml.api.core.ObjectMappers; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ErrorResponse.Builder.class) -public final class ErrorResponse { - private final Optional success; - - private final Optional error; - - private final Map additionalProperties; - - private ErrorResponse(Optional success, Optional error, Map additionalProperties) { - this.success = success; - this.error = error; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("success") - public Optional getSuccess() { - return success; - } - - /** - * @return Error message describing what went wrong - */ - @JsonProperty("error") - public Optional getError() { - return error; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ErrorResponse && equalTo((ErrorResponse) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ErrorResponse other) { - return success.equals(other.success) && error.equals(other.error); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.success, this.error); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional success = Optional.empty(); - - private Optional error = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ErrorResponse other) { - success(other.getSuccess()); - error(other.getError()); - return this; - } - - @JsonSetter(value = "success", nulls = Nulls.SKIP) - public Builder success(Optional success) { - this.success = success; - return this; - } - - public Builder success(Boolean success) { - this.success = Optional.ofNullable(success); - return this; - } - - /** - *

Error message describing what went wrong

- */ - @JsonSetter(value = "error", nulls = Nulls.SKIP) - public Builder error(Optional error) { - this.error = error; - return this; - } - - public Builder error(String error) { - this.error = Optional.ofNullable(error); - return this; - } - - public ErrorResponse build() { - return new ErrorResponse(success, error, additionalProperties); - } - } -}