Skip to content

Commit ff0a8b9

Browse files
fern-api[bot]gavinsharpclaude
authored
v8.0.0: Breaking FHIR provider auth refactor + ServiceRequest support (#90)
* SDK regeneration Unable to analyze changes with AI, incrementing PATCH version. * Bump to 8.0.0 (major) for breaking FHIR provider auth changes The discriminated union refactor for FHIR provider auth config is a breaking change: FhirProviderCreateRequest now uses a typed auth union instead of flat fields, and addAuthConfig takes a new union type. Patch version was incorrectly auto-generated; this should be a major bump. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Gavin Sharp <gavin@phenoml.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7c956ae commit ff0a8b9

20 files changed

+1855
-750
lines changed

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.phenoml.maven'
4949

50-
version = '7.1.0'
50+
version = '8.0.0'
5151

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

changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 8.0.0 - 2026-02-26
2+
* **BREAKING**: Refactor FHIR provider auth to use discriminated unions
3+
* `FhirProviderCreateRequest` now uses a typed `auth` union (`FhirProviderCreateRequestAuth`) instead of flat `auth_method` + optional credential fields
4+
* `addAuthConfig` now takes a new union type `FhirProviderAddAuthConfigRequest` with discriminated auth variants
5+
* New concrete auth types: `JwtAuth`, `ClientSecretAuth`, `OnBehalfOfAuth`, `GoogleHealthcareAuth`, `TokenPassthroughAuth`, `NoAuth`
6+
* Add `SERVICEREQUEST` to lang2fhir resource enums in `CreateRequest` and `Lang2FhirAndCreateRequest`
7+
18
## 7.1.0 - 2026-02-24
29
* feat: add clientId parameter to FHIR provider auth configuration
310
* Add clientId as an optional parameter to FhirProviderAddAuthConfigRequest and

reference.md

Lines changed: 16 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -2949,8 +2949,15 @@ client.fhirProvider().create(
29492949
.builder()
29502950
.name("Epic Sandbox")
29512951
.provider(Provider.ATHENAHEALTH)
2952-
.authMethod(AuthMethod.CLIENT_SECRET)
29532952
.baseUrl("https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4")
2953+
.auth(
2954+
FhirProviderCreateRequestAuth.jwt(
2955+
JwtAuth
2956+
.builder()
2957+
.clientId("your-client-id")
2958+
.build()
2959+
)
2960+
)
29542961
.build()
29552962
);
29562963
```
@@ -2991,14 +2998,6 @@ client.fhirProvider().create(
29912998
<dl>
29922999
<dd>
29933000

2994-
**authMethod:** `AuthMethod`
2995-
2996-
</dd>
2997-
</dl>
2998-
2999-
<dl>
3000-
<dd>
3001-
30023001
**baseUrl:** `String` — Base URL of the FHIR server
30033002

30043003
</dd>
@@ -3007,47 +3006,7 @@ client.fhirProvider().create(
30073006
<dl>
30083007
<dd>
30093008

3010-
**clientId:** `Optional<String>` — OAuth client ID (required for jwt, client_secret, and on_behalf_of auth methods)
3011-
3012-
</dd>
3013-
</dl>
3014-
3015-
<dl>
3016-
<dd>
3017-
3018-
**clientSecret:** `Optional<String>` — OAuth client secret (required for client_secret and on_behalf_of auth methods)
3019-
3020-
</dd>
3021-
</dl>
3022-
3023-
<dl>
3024-
<dd>
3025-
3026-
**serviceAccountKey:** `Optional<ServiceAccountKey>`
3027-
3028-
</dd>
3029-
</dl>
3030-
3031-
<dl>
3032-
<dd>
3033-
3034-
**credentialExpiry:** `Optional<OffsetDateTime>` — Expiry time for JWT credentials (only applicable for JWT auth method). If omitted, a default expiry is used.
3035-
3036-
</dd>
3037-
</dl>
3038-
3039-
<dl>
3040-
<dd>
3041-
3042-
**role:** `Optional<Role>`
3043-
3044-
</dd>
3045-
</dl>
3046-
3047-
<dl>
3048-
<dd>
3049-
3050-
**scopes:** `Optional<String>` — OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. Only applicable to `client_secret`, `jwt`, and `on_behalf_of` auth methods; specifying scopes for other auth methods will return an error. Make sure the scopes you specify are appropriate for the auth config and provider you are using.
3009+
**auth:** `FhirProviderCreateRequestAuth`
30513010

30523011
</dd>
30533012
</dl>
@@ -3246,10 +3205,12 @@ Note: Sandbox providers cannot be modified.
32463205
```java
32473206
client.fhirProvider().addAuthConfig(
32483207
"1716d214-de93-43a4-aa6b-a878d864e2ad",
3249-
FhirProviderAddAuthConfigRequest
3250-
.builder()
3251-
.authMethod(AuthMethod.CLIENT_SECRET)
3252-
.build()
3208+
FhirProviderAddAuthConfigRequest.jwt(
3209+
JwtAuth
3210+
.builder()
3211+
.clientId("your-client-id")
3212+
.build()
3213+
)
32533214
);
32543215
```
32553216
</dd>
@@ -3273,55 +3234,7 @@ client.fhirProvider().addAuthConfig(
32733234
<dl>
32743235
<dd>
32753236

3276-
**authMethod:** `AuthMethod`
3277-
3278-
</dd>
3279-
</dl>
3280-
3281-
<dl>
3282-
<dd>
3283-
3284-
**clientId:** `Optional<String>` — OAuth client ID for this auth configuration. Required for jwt, client_secret, and on_behalf_of auth methods if the provider does not already have a client_id set.
3285-
3286-
</dd>
3287-
</dl>
3288-
3289-
<dl>
3290-
<dd>
3291-
3292-
**clientSecret:** `Optional<String>` — OAuth client secret (required for client_secret and on_behalf_of auth methods)
3293-
3294-
</dd>
3295-
</dl>
3296-
3297-
<dl>
3298-
<dd>
3299-
3300-
**serviceAccountKey:** `Optional<ServiceAccountKey>`
3301-
3302-
</dd>
3303-
</dl>
3304-
3305-
<dl>
3306-
<dd>
3307-
3308-
**credentialExpiry:** `Optional<OffsetDateTime>` — Expiry time for JWT credentials (only applicable for JWT auth method). If omitted, a default expiry is used.
3309-
3310-
</dd>
3311-
</dl>
3312-
3313-
<dl>
3314-
<dd>
3315-
3316-
**role:** `Optional<Role>`
3317-
3318-
</dd>
3319-
</dl>
3320-
3321-
<dl>
3322-
<dd>
3323-
3324-
**scopes:** `Optional<String>` — OAuth scopes to request. Cannot be specified with role. If neither role nor scopes are specified, the provider-specific default role will be used. Only applicable to `client_secret`, `jwt`, and `on_behalf_of` auth methods; specifying scopes for other auth methods will return an error. Make sure the scopes you specify are appropriate for the auth config and provider you are using.
3237+
**request:** `FhirProviderAddAuthConfigRequest`
33253238

33263239
</dd>
33273240
</dl>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ private ClientOptions(
3232
this.headers.putAll(headers);
3333
this.headers.putAll(new HashMap<String, String>() {
3434
{
35-
put("User-Agent", "com.phenoml.maven:phenoml-java-sdk/7.1.0");
35+
put("User-Agent", "com.phenoml.maven:phenoml-java-sdk/8.0.0");
3636
put("X-Fern-Language", "JAVA");
3737
put("X-Fern-SDK-Name", "com.phenoml.fern:api-sdk");
38-
put("X-Fern-SDK-Version", "7.1.0");
38+
put("X-Fern-SDK-Version", "8.0.0");
3939
}
4040
});
4141
this.headerSuppliers = headerSuppliers;

src/main/java/com/phenoml/api/resources/fhirprovider/AsyncFhirProviderClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
import com.phenoml.api.core.ClientOptions;
77
import com.phenoml.api.core.RequestOptions;
8-
import com.phenoml.api.resources.fhirprovider.requests.FhirProviderAddAuthConfigRequest;
98
import com.phenoml.api.resources.fhirprovider.requests.FhirProviderCreateRequest;
109
import com.phenoml.api.resources.fhirprovider.requests.FhirProviderRemoveAuthConfigRequest;
1110
import com.phenoml.api.resources.fhirprovider.requests.FhirProviderSetActiveAuthConfigRequest;
11+
import com.phenoml.api.resources.fhirprovider.types.FhirProviderAddAuthConfigRequest;
1212
import com.phenoml.api.resources.fhirprovider.types.FhirProviderDeleteResponse;
1313
import com.phenoml.api.resources.fhirprovider.types.FhirProviderListResponse;
1414
import com.phenoml.api.resources.fhirprovider.types.FhirProviderRemoveAuthConfigResponse;

src/main/java/com/phenoml/api/resources/fhirprovider/AsyncRawFhirProviderClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
import com.phenoml.api.resources.fhirprovider.errors.InternalServerError;
1717
import com.phenoml.api.resources.fhirprovider.errors.NotFoundError;
1818
import com.phenoml.api.resources.fhirprovider.errors.UnauthorizedError;
19-
import com.phenoml.api.resources.fhirprovider.requests.FhirProviderAddAuthConfigRequest;
2019
import com.phenoml.api.resources.fhirprovider.requests.FhirProviderCreateRequest;
2120
import com.phenoml.api.resources.fhirprovider.requests.FhirProviderRemoveAuthConfigRequest;
2221
import com.phenoml.api.resources.fhirprovider.requests.FhirProviderSetActiveAuthConfigRequest;
22+
import com.phenoml.api.resources.fhirprovider.types.FhirProviderAddAuthConfigRequest;
2323
import com.phenoml.api.resources.fhirprovider.types.FhirProviderDeleteResponse;
2424
import com.phenoml.api.resources.fhirprovider.types.FhirProviderListResponse;
2525
import com.phenoml.api.resources.fhirprovider.types.FhirProviderRemoveAuthConfigResponse;

src/main/java/com/phenoml/api/resources/fhirprovider/FhirProviderClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
import com.phenoml.api.core.ClientOptions;
77
import com.phenoml.api.core.RequestOptions;
8-
import com.phenoml.api.resources.fhirprovider.requests.FhirProviderAddAuthConfigRequest;
98
import com.phenoml.api.resources.fhirprovider.requests.FhirProviderCreateRequest;
109
import com.phenoml.api.resources.fhirprovider.requests.FhirProviderRemoveAuthConfigRequest;
1110
import com.phenoml.api.resources.fhirprovider.requests.FhirProviderSetActiveAuthConfigRequest;
11+
import com.phenoml.api.resources.fhirprovider.types.FhirProviderAddAuthConfigRequest;
1212
import com.phenoml.api.resources.fhirprovider.types.FhirProviderDeleteResponse;
1313
import com.phenoml.api.resources.fhirprovider.types.FhirProviderListResponse;
1414
import com.phenoml.api.resources.fhirprovider.types.FhirProviderRemoveAuthConfigResponse;

src/main/java/com/phenoml/api/resources/fhirprovider/RawFhirProviderClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
import com.phenoml.api.resources.fhirprovider.errors.InternalServerError;
1717
import com.phenoml.api.resources.fhirprovider.errors.NotFoundError;
1818
import com.phenoml.api.resources.fhirprovider.errors.UnauthorizedError;
19-
import com.phenoml.api.resources.fhirprovider.requests.FhirProviderAddAuthConfigRequest;
2019
import com.phenoml.api.resources.fhirprovider.requests.FhirProviderCreateRequest;
2120
import com.phenoml.api.resources.fhirprovider.requests.FhirProviderRemoveAuthConfigRequest;
2221
import com.phenoml.api.resources.fhirprovider.requests.FhirProviderSetActiveAuthConfigRequest;
22+
import com.phenoml.api.resources.fhirprovider.types.FhirProviderAddAuthConfigRequest;
2323
import com.phenoml.api.resources.fhirprovider.types.FhirProviderDeleteResponse;
2424
import com.phenoml.api.resources.fhirprovider.types.FhirProviderListResponse;
2525
import com.phenoml.api.resources.fhirprovider.types.FhirProviderRemoveAuthConfigResponse;

0 commit comments

Comments
 (0)