From dfe612c869be928316e00bbc3d500dfce79823bd Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 17 Mar 2026 04:22:41 +0000
Subject: [PATCH 01/14] fix(docs): make xml syntactically correct
---
src/ApiDentalPro/Core/JsonDictionary.cs | 6 +++---
src/ApiDentalPro/Core/MultipartJsonDictionary.cs | 6 +++---
.../Models/ClearCoverage/ClearCoverageRequestParams.cs | 2 +-
.../Models/Eligibility/EligibilityRequestParams.cs | 2 +-
src/ApiDentalPro/Models/Payer/PayerListParams.cs | 2 +-
src/ApiDentalPro/Services/IClearCoverageService.cs | 6 +++---
src/ApiDentalPro/Services/IEligibilityService.cs | 2 +-
src/ApiDentalPro/Services/IPayerService.cs | 6 +++---
src/Directory.Build.props | 2 +-
9 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/ApiDentalPro/Core/JsonDictionary.cs b/src/ApiDentalPro/Core/JsonDictionary.cs
index 73ddbfa..32b279d 100644
--- a/src/ApiDentalPro/Core/JsonDictionary.cs
+++ b/src/ApiDentalPro/Core/JsonDictionary.cs
@@ -11,9 +11,9 @@ namespace ApiDentalPro.Core;
///
/// A dictionary that holds JSON data.
///
-/// It can be mutated and then frozen once no more mutations are expected. This
-/// is useful for allowing the dictionary to be modified by a class's init
-/// properties, but then preventing it from being modified afterwards.
+/// It can be mutated and then frozen once no more mutations are expected.
+/// This is useful for allowing the dictionary to be modified by a class's
+/// init properties, but then preventing it from being modified afterwards.
///
/// It also caches data deserialization for performance.
///
diff --git a/src/ApiDentalPro/Core/MultipartJsonDictionary.cs b/src/ApiDentalPro/Core/MultipartJsonDictionary.cs
index 6e6cf5c..910855a 100644
--- a/src/ApiDentalPro/Core/MultipartJsonDictionary.cs
+++ b/src/ApiDentalPro/Core/MultipartJsonDictionary.cs
@@ -11,9 +11,9 @@ namespace ApiDentalPro.Core;
///
/// A dictionary that holds mixed JSON and binary content.
///
-/// It can be mutated and then frozen once no more mutations are expected. This
-/// is useful for allowing the dictionary to be modified by a class's init
-/// properties, but then preventing it from being modified afterwards.
+/// It can be mutated and then frozen once no more mutations are expected.
+/// This is useful for allowing the dictionary to be modified by a class's
+/// init properties, but then preventing it from being modified afterwards.
///
/// It also caches data deserialization for performance.
///
diff --git a/src/ApiDentalPro/Models/ClearCoverage/ClearCoverageRequestParams.cs b/src/ApiDentalPro/Models/ClearCoverage/ClearCoverageRequestParams.cs
index c023959..48774cc 100644
--- a/src/ApiDentalPro/Models/ClearCoverage/ClearCoverageRequestParams.cs
+++ b/src/ApiDentalPro/Models/ClearCoverage/ClearCoverageRequestParams.cs
@@ -152,7 +152,7 @@ FrozenDictionary rawBodyData
}
#pragma warning restore CS8618
- ///
+ ///
public static ClearCoverageRequestParams FromRawUnchecked(
IReadOnlyDictionary rawHeaderData,
IReadOnlyDictionary rawQueryData,
diff --git a/src/ApiDentalPro/Models/Eligibility/EligibilityRequestParams.cs b/src/ApiDentalPro/Models/Eligibility/EligibilityRequestParams.cs
index 9bd66c5..145277e 100644
--- a/src/ApiDentalPro/Models/Eligibility/EligibilityRequestParams.cs
+++ b/src/ApiDentalPro/Models/Eligibility/EligibilityRequestParams.cs
@@ -131,7 +131,7 @@ FrozenDictionary rawBodyData
}
#pragma warning restore CS8618
- ///
+ ///
public static EligibilityRequestParams FromRawUnchecked(
IReadOnlyDictionary rawHeaderData,
IReadOnlyDictionary rawQueryData,
diff --git a/src/ApiDentalPro/Models/Payer/PayerListParams.cs b/src/ApiDentalPro/Models/Payer/PayerListParams.cs
index 1fe414b..0dd1b13 100644
--- a/src/ApiDentalPro/Models/Payer/PayerListParams.cs
+++ b/src/ApiDentalPro/Models/Payer/PayerListParams.cs
@@ -48,7 +48,7 @@ FrozenDictionary rawQueryData
}
#pragma warning restore CS8618
- ///
+ ///
public static PayerListParams FromRawUnchecked(
IReadOnlyDictionary rawHeaderData,
IReadOnlyDictionary rawQueryData
diff --git a/src/ApiDentalPro/Services/IClearCoverageService.cs b/src/ApiDentalPro/Services/IClearCoverageService.cs
index 3ea821d..ceebb51 100644
--- a/src/ApiDentalPro/Services/IClearCoverageService.cs
+++ b/src/ApiDentalPro/Services/IClearCoverageService.cs
@@ -28,8 +28,8 @@ public interface IClearCoverageService
///
/// Submit an enhanced eligibility and benefits verification request via Vyne
- /// ClearCoverage. Returns enriched, standardized, and normalized data relevant
- /// for dental use cases with deep benefit insights across supported payers.
+ /// ClearCoverage. Returns enriched, standardized, and normalized data relevant for
+ /// dental use cases with deep benefit insights across supported payers.
///
Task Request(
ClearCoverageRequestParams parameters,
@@ -51,7 +51,7 @@ public interface IClearCoverageServiceWithRawResponse
IClearCoverageServiceWithRawResponse WithOptions(Func modifier);
///
- /// Returns a raw HTTP response for `post /ClearCoverage`, but is otherwise the
+ /// Returns a raw HTTP response for post /ClearCoverage, but is otherwise the
/// same as .
///
Task> Request(
diff --git a/src/ApiDentalPro/Services/IEligibilityService.cs b/src/ApiDentalPro/Services/IEligibilityService.cs
index 34ec11c..952f35a 100644
--- a/src/ApiDentalPro/Services/IEligibilityService.cs
+++ b/src/ApiDentalPro/Services/IEligibilityService.cs
@@ -51,7 +51,7 @@ public interface IEligibilityServiceWithRawResponse
IEligibilityServiceWithRawResponse WithOptions(Func modifier);
///
- /// Returns a raw HTTP response for `post /Eligibility`, but is otherwise the
+ /// Returns a raw HTTP response for post /Eligibility, but is otherwise the
/// same as .
///
Task> Request(
diff --git a/src/ApiDentalPro/Services/IPayerService.cs b/src/ApiDentalPro/Services/IPayerService.cs
index 915a283..b302e9c 100644
--- a/src/ApiDentalPro/Services/IPayerService.cs
+++ b/src/ApiDentalPro/Services/IPayerService.cs
@@ -28,8 +28,8 @@ public interface IPayerService
///
/// Retrieve the full list of supported dental insurance payers with their IDs,
- /// names, features, and status. No sensitive data is required. Use payer IDs
- /// from this list when making Eligibility or ClearCoverage requests.
+ /// names, features, and status. No sensitive data is required. Use payer IDs from
+ /// this list when making Eligibility or ClearCoverage requests.
///
Task List(
PayerListParams? parameters = null,
@@ -51,7 +51,7 @@ public interface IPayerServiceWithRawResponse
IPayerServiceWithRawResponse WithOptions(Func modifier);
///
- /// Returns a raw HTTP response for `get /Payer`, but is otherwise the
+ /// Returns a raw HTTP response for get /Payer, but is otherwise the
/// same as .
///
Task> List(
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index a2dd19b..f949806 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -12,7 +12,7 @@
true
- $(NoWarn),1570,1573,1574,1591
+ $(NoWarn),1573,1591
true
From aff0c128246e68eebd71a1fc4dc3388d74a7a62d Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 17 Mar 2026 04:37:33 +0000
Subject: [PATCH 02/14] chore(internal): tweak CI branches
---
.github/workflows/ci.yml | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3fd6ca1..50c640d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,12 +1,14 @@
name: CI
on:
push:
- branches-ignore:
- - 'generated'
- - 'codegen/**'
- - 'integrated/**'
- - 'stl-preview-head/**'
- - 'stl-preview-base/**'
+ branches:
+ - '**'
+ - '!integrated/**'
+ - '!stl-preview-head/**'
+ - '!stl-preview-base/**'
+ - '!generated'
+ - '!codegen/**'
+ - 'codegen/stl/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
From 6e7339bb0bbcedcc534a1567a32ed4d64b7edd33 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 21 Mar 2026 02:26:28 +0000
Subject: [PATCH 03/14] fix(client): handle root bodies in requests properly
---
src/ApiDentalPro/Core/JsonDictionary.cs | 56 +----------
.../Core/MultipartJsonDictionary.cs | 62 +------------
.../Core/WrappedJsonSerializer.cs | 87 +++++++++++++++++
.../Core/WrappedMultipartJsonSerializer.cs | 93 +++++++++++++++++++
4 files changed, 188 insertions(+), 110 deletions(-)
create mode 100644 src/ApiDentalPro/Core/WrappedJsonSerializer.cs
create mode 100644 src/ApiDentalPro/Core/WrappedMultipartJsonSerializer.cs
diff --git a/src/ApiDentalPro/Core/JsonDictionary.cs b/src/ApiDentalPro/Core/JsonDictionary.cs
index 32b279d..5d479c0 100644
--- a/src/ApiDentalPro/Core/JsonDictionary.cs
+++ b/src/ApiDentalPro/Core/JsonDictionary.cs
@@ -94,20 +94,7 @@ public T GetNotNullClass(string key)
{
throw new ApiDentalProInvalidDataException($"'{key}' cannot be absent");
}
- T deserialized;
- try
- {
- deserialized =
- JsonSerializer.Deserialize(element, ModelBase.SerializerOptions)
- ?? throw new ApiDentalProInvalidDataException($"'{key}' cannot be null");
- }
- catch (JsonException e)
- {
- throw new ApiDentalProInvalidDataException(
- $"'{key}' must be of type {typeof(T).FullName}",
- e
- );
- }
+ T deserialized = WrappedJsonSerializer.GetNotNullClass(element, key);
_deserializedData[key] = deserialized;
return deserialized;
}
@@ -123,20 +110,7 @@ public T GetNotNullStruct(string key)
{
throw new ApiDentalProInvalidDataException($"'{key}' cannot be absent");
}
- T deserialized;
- try
- {
- deserialized =
- JsonSerializer.Deserialize(element, ModelBase.SerializerOptions)
- ?? throw new ApiDentalProInvalidDataException($"'{key}' cannot be null");
- }
- catch (JsonException e)
- {
- throw new ApiDentalProInvalidDataException(
- $"'{key}' must be of type {typeof(T).FullName}",
- e
- );
- }
+ T deserialized = WrappedJsonSerializer.GetNotNullStruct(element, key);
_deserializedData[key] = deserialized;
return deserialized;
}
@@ -153,18 +127,7 @@ public T GetNotNullStruct(string key)
_deserializedData[key] = null;
return null;
}
- T? deserialized;
- try
- {
- deserialized = JsonSerializer.Deserialize(element, ModelBase.SerializerOptions);
- }
- catch (JsonException e)
- {
- throw new ApiDentalProInvalidDataException(
- $"'{key}' must be of type {typeof(T).FullName}",
- e
- );
- }
+ T? deserialized = WrappedJsonSerializer.GetNullableClass(element, key);
_deserializedData[key] = deserialized;
return deserialized;
}
@@ -181,18 +144,7 @@ public T GetNotNullStruct(string key)
_deserializedData[key] = null;
return null;
}
- T? deserialized;
- try
- {
- deserialized = JsonSerializer.Deserialize(element, ModelBase.SerializerOptions);
- }
- catch (JsonException e)
- {
- throw new ApiDentalProInvalidDataException(
- $"'{key}' must be of type {typeof(T).FullName}",
- e
- );
- }
+ T? deserialized = WrappedJsonSerializer.GetNullableStruct(element, key);
_deserializedData[key] = deserialized;
return deserialized;
}
diff --git a/src/ApiDentalPro/Core/MultipartJsonDictionary.cs b/src/ApiDentalPro/Core/MultipartJsonDictionary.cs
index 910855a..cc9d228 100644
--- a/src/ApiDentalPro/Core/MultipartJsonDictionary.cs
+++ b/src/ApiDentalPro/Core/MultipartJsonDictionary.cs
@@ -97,20 +97,7 @@ public T GetNotNullClass(string key)
{
throw new ApiDentalProInvalidDataException($"'{key}' cannot be absent");
}
- T deserialized;
- try
- {
- deserialized =
- MultipartJsonSerializer.Deserialize(element, ModelBase.SerializerOptions)
- ?? throw new ApiDentalProInvalidDataException($"'{key}' cannot be null");
- }
- catch (JsonException e)
- {
- throw new ApiDentalProInvalidDataException(
- $"'{key}' must be of type {typeof(T).FullName}",
- e
- );
- }
+ T? deserialized = WrappedMultipartJsonSerializer.GetNotNullClass(element, key);
_deserializedData[key] = deserialized;
return deserialized;
}
@@ -126,20 +113,7 @@ public T GetNotNullStruct(string key)
{
throw new ApiDentalProInvalidDataException($"'{key}' cannot be absent");
}
- T deserialized;
- try
- {
- deserialized =
- MultipartJsonSerializer.Deserialize(element, ModelBase.SerializerOptions)
- ?? throw new ApiDentalProInvalidDataException($"'{key}' cannot be null");
- }
- catch (JsonException e)
- {
- throw new ApiDentalProInvalidDataException(
- $"'{key}' must be of type {typeof(T).FullName}",
- e
- );
- }
+ T deserialized = WrappedMultipartJsonSerializer.GetNotNullStruct(element, key);
_deserializedData[key] = deserialized;
return deserialized;
}
@@ -156,21 +130,7 @@ public T GetNotNullStruct(string key)
_deserializedData[key] = null;
return null;
}
- T? deserialized;
- try
- {
- deserialized = MultipartJsonSerializer.Deserialize(
- element,
- ModelBase.SerializerOptions
- );
- }
- catch (JsonException e)
- {
- throw new ApiDentalProInvalidDataException(
- $"'{key}' must be of type {typeof(T).FullName}",
- e
- );
- }
+ T? deserialized = WrappedMultipartJsonSerializer.GetNullableClass(element, key);
_deserializedData[key] = deserialized;
return deserialized;
}
@@ -187,21 +147,7 @@ public T GetNotNullStruct(string key)
_deserializedData[key] = null;
return null;
}
- T? deserialized;
- try
- {
- deserialized = MultipartJsonSerializer.Deserialize(
- element,
- ModelBase.SerializerOptions
- );
- }
- catch (JsonException e)
- {
- throw new ApiDentalProInvalidDataException(
- $"'{key}' must be of type {typeof(T).FullName}",
- e
- );
- }
+ T? deserialized = WrappedMultipartJsonSerializer.GetNullableStruct(element, key);
_deserializedData[key] = deserialized;
return deserialized;
}
diff --git a/src/ApiDentalPro/Core/WrappedJsonSerializer.cs b/src/ApiDentalPro/Core/WrappedJsonSerializer.cs
new file mode 100644
index 0000000..02e613f
--- /dev/null
+++ b/src/ApiDentalPro/Core/WrappedJsonSerializer.cs
@@ -0,0 +1,87 @@
+using System.Text.Json;
+using ApiDentalPro.Exceptions;
+
+namespace ApiDentalPro.Core;
+
+///
+/// Helper class for deserializing <c>JsonElement</c> objects. This handles
+/// edge-cases around nullability and reference/value types.
+///
+sealed class WrappedJsonSerializer
+{
+ public static T GetNotNullClass(JsonElement element, string name)
+ where T : class
+ {
+ T deserialized;
+ try
+ {
+ deserialized =
+ JsonSerializer.Deserialize(element, ModelBase.SerializerOptions)
+ ?? throw new ApiDentalProInvalidDataException($"'{name}' cannot be null");
+ }
+ catch (JsonException e)
+ {
+ throw new ApiDentalProInvalidDataException(
+ $"'{name}' must be of type {typeof(T).FullName}",
+ e
+ );
+ }
+ return deserialized;
+ }
+
+ public static T GetNotNullStruct(JsonElement element, string name)
+ where T : struct
+ {
+ T deserialized;
+ try
+ {
+ deserialized =
+ JsonSerializer.Deserialize(element, ModelBase.SerializerOptions)
+ ?? throw new ApiDentalProInvalidDataException($"'{name}' cannot be null");
+ }
+ catch (JsonException e)
+ {
+ throw new ApiDentalProInvalidDataException(
+ $"'{name}' must be of type {typeof(T).FullName}",
+ e
+ );
+ }
+ return deserialized;
+ }
+
+ public static T? GetNullableClass(JsonElement element, string name)
+ where T : class
+ {
+ T? deserialized;
+ try
+ {
+ deserialized = JsonSerializer.Deserialize(element, ModelBase.SerializerOptions);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiDentalProInvalidDataException(
+ $"'{name}' must be of type {typeof(T).FullName}",
+ e
+ );
+ }
+ return deserialized;
+ }
+
+ public static T? GetNullableStruct(JsonElement element, string name)
+ where T : struct
+ {
+ T? deserialized;
+ try
+ {
+ deserialized = JsonSerializer.Deserialize(element, ModelBase.SerializerOptions);
+ }
+ catch (JsonException e)
+ {
+ throw new ApiDentalProInvalidDataException(
+ $"'{name}' must be of type {typeof(T).FullName}",
+ e
+ );
+ }
+ return deserialized;
+ }
+}
diff --git a/src/ApiDentalPro/Core/WrappedMultipartJsonSerializer.cs b/src/ApiDentalPro/Core/WrappedMultipartJsonSerializer.cs
new file mode 100644
index 0000000..65787bd
--- /dev/null
+++ b/src/ApiDentalPro/Core/WrappedMultipartJsonSerializer.cs
@@ -0,0 +1,93 @@
+using System.Text.Json;
+using ApiDentalPro.Exceptions;
+
+namespace ApiDentalPro.Core;
+
+///
+/// Helper class for deserializing <c>MultipartJsonElement</c> objects.
+/// This handles edge-cases around nullability and reference/value types.
+///
+sealed class WrappedMultipartJsonSerializer
+{
+ public static T GetNotNullClass(MultipartJsonElement element, string name)
+ where T : class
+ {
+ T deserialized;
+ try
+ {
+ deserialized =
+ MultipartJsonSerializer.Deserialize(element, ModelBase.SerializerOptions)
+ ?? throw new ApiDentalProInvalidDataException($"'{name}' cannot be null");
+ }
+ catch (JsonException e)
+ {
+ throw new ApiDentalProInvalidDataException(
+ $"'{name}' must be of type {typeof(T).FullName}",
+ e
+ );
+ }
+ return deserialized;
+ }
+
+ public static T GetNotNullStruct(MultipartJsonElement element, string name)
+ where T : struct
+ {
+ T deserialized;
+ try
+ {
+ deserialized =
+ MultipartJsonSerializer.Deserialize(element, ModelBase.SerializerOptions)
+ ?? throw new ApiDentalProInvalidDataException($"'{name}' cannot be null");
+ }
+ catch (JsonException e)
+ {
+ throw new ApiDentalProInvalidDataException(
+ $"'{name}' must be of type {typeof(T).FullName}",
+ e
+ );
+ }
+ return deserialized;
+ }
+
+ public static T? GetNullableClass(MultipartJsonElement element, string name)
+ where T : class
+ {
+ T? deserialized;
+ try
+ {
+ deserialized = MultipartJsonSerializer.Deserialize(
+ element,
+ ModelBase.SerializerOptions
+ );
+ }
+ catch (JsonException e)
+ {
+ throw new ApiDentalProInvalidDataException(
+ $"'{name}' must be of type {typeof(T).FullName}",
+ e
+ );
+ }
+ return deserialized;
+ }
+
+ public static T? GetNullableStruct(MultipartJsonElement element, string name)
+ where T : struct
+ {
+ T? deserialized;
+ try
+ {
+ deserialized = MultipartJsonSerializer.Deserialize(
+ element,
+ ModelBase.SerializerOptions
+ );
+ }
+ catch (JsonException e)
+ {
+ throw new ApiDentalProInvalidDataException(
+ $"'{name}' must be of type {typeof(T).FullName}",
+ e
+ );
+ }
+ return deserialized;
+ }
+}
From 3d69bda70b5295832c20fde7af1edf84c3618e50 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 24 Mar 2026 02:26:04 +0000
Subject: [PATCH 04/14] chore(internal): update gitignore
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index cb0f784..1ce7f84 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
.prism.log
+.stdy.log
bin/
obj/
.vs/
From b7b69d483b2c767749617e0af05880b4eb227891 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 25 Mar 2026 02:12:47 +0000
Subject: [PATCH 05/14] chore(ci): skip lint on metadata-only changes
Note that we still want to run tests, as these depend on the metadata.
---
.github/workflows/ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 50c640d..173ce86 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -19,7 +19,7 @@ jobs:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/api-dental-pro-csharp' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
- if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
+ if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@v6
@@ -38,7 +38,7 @@ jobs:
timeout-minutes: 10
name: build
runs-on: ${{ github.repository == 'stainless-sdks/api-dental-pro-csharp' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
- if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
+ if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@v6
From 64c8d16ae1585b38f24f06d23de377a6f7ce6959 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 1 Apr 2026 02:59:01 +0000
Subject: [PATCH 06/14] fix(client): allow cancelling when enumerating over an
http response
---
src/ApiDentalPro/Core/HttpResponse.cs | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/ApiDentalPro/Core/HttpResponse.cs b/src/ApiDentalPro/Core/HttpResponse.cs
index d2ad105..4493dbb 100644
--- a/src/ApiDentalPro/Core/HttpResponse.cs
+++ b/src/ApiDentalPro/Core/HttpResponse.cs
@@ -4,6 +4,7 @@
using System.IO;
using System.Net;
using System.Net.Http;
+using System.Runtime.CompilerServices;
using System.Text.Json;
using System.Threading.Tasks;
using ApiDentalPro.Exceptions;
@@ -161,12 +162,17 @@ internal StreamingHttpResponse(
this.CancellationToken = response.CancellationToken;
}
- public IAsyncEnumerable Enumerate(Threading::CancellationToken cancellationToken = default)
+ public async IAsyncEnumerable Enumerate(
+ [EnumeratorCancellationAttribute] Threading::CancellationToken cancellationToken = default
+ )
{
using var cts = Threading::CancellationTokenSource.CreateLinkedTokenSource(
this.CancellationToken,
cancellationToken
);
- return this._enumerate(cts.Token);
+ await foreach (var item in this._enumerate(cts.Token))
+ {
+ yield return item;
+ }
}
}
From 28a042808c79875fafb7b5962bc65395b1f178f6 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 1 Apr 2026 03:00:56 +0000
Subject: [PATCH 07/14] feat(client): enable gzip decompression
---
src/ApiDentalPro/Core/ClientOptions.cs | 3 +-
src/ApiDentalPro/Core/DecompressionMethods.cs | 49 +++++++++++++++++++
2 files changed, 51 insertions(+), 1 deletion(-)
create mode 100644 src/ApiDentalPro/Core/DecompressionMethods.cs
diff --git a/src/ApiDentalPro/Core/ClientOptions.cs b/src/ApiDentalPro/Core/ClientOptions.cs
index aba8a47..106ded9 100644
--- a/src/ApiDentalPro/Core/ClientOptions.cs
+++ b/src/ApiDentalPro/Core/ClientOptions.cs
@@ -22,7 +22,8 @@ public record struct ClientOptions()
///
/// The HTTP client to use for making requests in the SDK.
///
- public HttpClient HttpClient { get; set; } = new();
+ public HttpClient HttpClient { get; set; } =
+ new(new HttpClientHandler() { AutomaticDecompression = DecompressionMethods.Available });
Lazy _baseUrl = new(() =>
Environment.GetEnvironmentVariable("API_DENTAL_PRO_BASE_URL") ?? EnvironmentUrl.Production
diff --git a/src/ApiDentalPro/Core/DecompressionMethods.cs b/src/ApiDentalPro/Core/DecompressionMethods.cs
new file mode 100644
index 0000000..6dfa3ea
--- /dev/null
+++ b/src/ApiDentalPro/Core/DecompressionMethods.cs
@@ -0,0 +1,49 @@
+using System.IO;
+using System.IO.Compression;
+using Net = System.Net;
+
+namespace ApiDentalPro.Core;
+
+static class DecompressionMethods
+{
+ internal static readonly Net::DecompressionMethods Available;
+
+ static DecompressionMethods()
+ {
+ try
+ {
+ // Minimal valid GZip payload (empty body).
+ var gzipPayload = new byte[]
+ {
+ 0x1f,
+ 0x8b,
+ 0x08,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x03,
+ 0x03,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ };
+ using var memoryStream = new MemoryStream(gzipPayload);
+ using var gzipStream = new GZipStream(memoryStream, CompressionMode.Decompress);
+ gzipStream.CopyTo(Stream.Null);
+ Available = Net::DecompressionMethods.GZip;
+ }
+ catch
+ {
+ Available = Net::DecompressionMethods.None;
+ }
+ }
+}
From 06fb914acf21a2dd230cb32ead201db856792dad Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 16 Apr 2026 02:22:54 +0000
Subject: [PATCH 08/14] fix(tests): round-trip urls correctly
---
.../ClearCoverageRequestParamsTest.cs | 2 +-
.../EligibilityRequestParamsTest.cs | 2 +-
src/ApiDentalPro.Tests/TestBase.cs | 40 +++++++++++++++++++
3 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/src/ApiDentalPro.Tests/Models/ClearCoverage/ClearCoverageRequestParamsTest.cs b/src/ApiDentalPro.Tests/Models/ClearCoverage/ClearCoverageRequestParamsTest.cs
index c2d1b4f..527af06 100644
--- a/src/ApiDentalPro.Tests/Models/ClearCoverage/ClearCoverageRequestParamsTest.cs
+++ b/src/ApiDentalPro.Tests/Models/ClearCoverage/ClearCoverageRequestParamsTest.cs
@@ -140,7 +140,7 @@ public void Url_Works()
var url = parameters.Url(new() { ApiKey = "My API Key" });
- Assert.Equal(new Uri("https://wg.api.dental/rest/ClearCoverage"), url);
+ Assert.True(TestBase.UrisEqual(new Uri("https://wg.api.dental/rest/ClearCoverage"), url));
}
[Fact]
diff --git a/src/ApiDentalPro.Tests/Models/Eligibility/EligibilityRequestParamsTest.cs b/src/ApiDentalPro.Tests/Models/Eligibility/EligibilityRequestParamsTest.cs
index 93bb53f..9866ba3 100644
--- a/src/ApiDentalPro.Tests/Models/Eligibility/EligibilityRequestParamsTest.cs
+++ b/src/ApiDentalPro.Tests/Models/Eligibility/EligibilityRequestParamsTest.cs
@@ -128,7 +128,7 @@ public void Url_Works()
var url = parameters.Url(new() { ApiKey = "My API Key" });
- Assert.Equal(new Uri("https://wg.api.dental/rest/Eligibility"), url);
+ Assert.True(TestBase.UrisEqual(new Uri("https://wg.api.dental/rest/Eligibility"), url));
}
[Fact]
diff --git a/src/ApiDentalPro.Tests/TestBase.cs b/src/ApiDentalPro.Tests/TestBase.cs
index 2054183..db2fd27 100644
--- a/src/ApiDentalPro.Tests/TestBase.cs
+++ b/src/ApiDentalPro.Tests/TestBase.cs
@@ -1,4 +1,6 @@
using System;
+using System.Collections.Generic;
+using System.Linq;
using ApiDentalPro;
namespace ApiDentalPro.Tests;
@@ -16,4 +18,42 @@ public TestBase()
ApiKey = "My API Key",
};
}
+
+ internal static bool UrisEqual(Uri uri1, Uri uri2)
+ {
+ if (
+ uri1.Scheme != uri2.Scheme
+ || uri1.Host != uri2.Host
+ || uri1.Port != uri2.Port
+ || uri1.AbsolutePath != uri2.AbsolutePath
+ )
+ {
+ return false;
+ }
+
+ var query1 = ParseQueryString(uri1.Query);
+ var query2 = ParseQueryString(uri2.Query);
+
+ return Enumerable.SequenceEqual(query1, query2);
+ }
+
+ static SortedDictionary ParseQueryString(string query)
+ {
+ var ret = new SortedDictionary(StringComparer.Ordinal);
+
+ if (string.IsNullOrEmpty(query))
+ return ret;
+
+ var pairs = query.TrimStart('?').Split(['&'], StringSplitOptions.RemoveEmptyEntries);
+
+ foreach (var pair in pairs)
+ {
+ var parts = pair.Split(['&'], 2);
+ var key = Uri.UnescapeDataString(parts[0]);
+ var value = parts.Length > 1 ? Uri.UnescapeDataString(parts[1]) : string.Empty;
+ ret[key] = value;
+ }
+
+ return ret;
+ }
}
From d9a086cec7ca67bcf0bebc7079c07b9c6c0e8884 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 28 Apr 2026 02:14:10 +0000
Subject: [PATCH 09/14] feat: support setting headers via env
---
src/ApiDentalPro/Core/ParamsBase.cs | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/ApiDentalPro/Core/ParamsBase.cs b/src/ApiDentalPro/Core/ParamsBase.cs
index 6468f58..7f339f6 100644
--- a/src/ApiDentalPro/Core/ParamsBase.cs
+++ b/src/ApiDentalPro/Core/ParamsBase.cs
@@ -18,7 +18,7 @@ public abstract record class ParamsBase
static ParamsBase()
{
var runtime = GetRuntime();
- defaultHeaders = new Dictionary
+ var headers = new Dictionary
{
["User-Agent"] = GetUserAgent(),
["X-Stainless-Arch"] = GetOSArch(),
@@ -28,6 +28,21 @@ static ParamsBase()
["X-Stainless-Runtime"] = runtime.Name,
["X-Stainless-Runtime-Version"] = runtime.Version,
};
+
+ var customHeadersEnv = Environment.GetEnvironmentVariable("API_DENTAL_PRO_CUSTOM_HEADERS");
+ if (customHeadersEnv != null)
+ {
+ foreach (var line in customHeadersEnv.Split('\n'))
+ {
+ var colon = line.IndexOf(':');
+ if (colon >= 0)
+ {
+ headers[line.Substring(0, colon).Trim()] = line.Substring(colon + 1).Trim();
+ }
+ }
+ }
+
+ defaultHeaders = headers;
}
private protected JsonDictionary _rawQueryData = new();
From 5bddda181ef2852d81472556e865bd4257eb23ad Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 30 Apr 2026 02:38:11 +0000
Subject: [PATCH 10/14] codegen metadata
---
.stats.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.stats.yml b/.stats.yml
index bc84e50..5803fdf 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 3
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/velocitys3%2Fapi-dental-pro-d7d63efc6c52d056de2c33d52c5e447da05558069adee45c65b01edd0bd1788c.yml
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/velocitys3/api-dental-pro-d7d63efc6c52d056de2c33d52c5e447da05558069adee45c65b01edd0bd1788c.yml
openapi_spec_hash: 5660fa0723e9da2c6d2dc12e893ce3dc
config_hash: b371739ff56067c75874a694203404de
From 39d5394d39ba7c00c8497100cc47dd688440581d Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 1 May 2026 02:24:47 +0000
Subject: [PATCH 11/14] codegen metadata
---
.stats.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.stats.yml b/.stats.yml
index 5803fdf..cec13d5 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 3
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/velocitys3/api-dental-pro-d7d63efc6c52d056de2c33d52c5e447da05558069adee45c65b01edd0bd1788c.yml
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/velocitys3/api-dental-pro-331b628a571f60efd1e47614a49095ad5abefac2d83c958464f5f24132a31082.yml
openapi_spec_hash: 5660fa0723e9da2c6d2dc12e893ce3dc
config_hash: b371739ff56067c75874a694203404de
From fa2eb2348f1f1e9ccddef6c2d49b05f99c644a0e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 9 May 2026 02:23:40 +0000
Subject: [PATCH 12/14] fix(internal): disable default HttpClient timeout as we
have our own
---
src/ApiDentalPro/Core/ClientOptions.cs | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/ApiDentalPro/Core/ClientOptions.cs b/src/ApiDentalPro/Core/ClientOptions.cs
index 106ded9..5d368ed 100644
--- a/src/ApiDentalPro/Core/ClientOptions.cs
+++ b/src/ApiDentalPro/Core/ClientOptions.cs
@@ -21,9 +21,16 @@ public record struct ClientOptions()
///
/// The HTTP client to use for making requests in the SDK.
+ ///
+ /// Note: The HttpClient has a built-in timeout, which defaults to 100 seconds.
+ /// When passing a custom HttpClient, this timeout may conflict with the SDK's
+ /// own timeout handler and cause premature cancellation.
///
public HttpClient HttpClient { get; set; } =
- new(new HttpClientHandler() { AutomaticDecompression = DecompressionMethods.Available });
+ new(new HttpClientHandler() { AutomaticDecompression = DecompressionMethods.Available })
+ {
+ Timeout = global::System.Threading.Timeout.InfiniteTimeSpan,
+ };
Lazy _baseUrl = new(() =>
Environment.GetEnvironmentVariable("API_DENTAL_PRO_BASE_URL") ?? EnvironmentUrl.Production
From 000ecfd18efadf13984eecf4670d64d2b8542c33 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 13 May 2026 02:11:14 +0000
Subject: [PATCH 13/14] ci: pin GitHub Actions to commit SHAs
Pin all GitHub Actions referenced in generated workflows (both
first-party `actions/*` and third-party) to immutable commit SHAs.
Updating pinned actions is now a deliberate codegen-side bump rather
than implicit on every workflow run.
---
.github/workflows/ci.yml | 12 ++++++------
.github/workflows/publish-nuget.yml | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 173ce86..4a81ad7 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -22,10 +22,10 @@ jobs:
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up .NET
- uses: actions/setup-dotnet@v3
+ uses: actions/setup-dotnet@55ec9447dda3d1cf6bd587150f3262f30ee10815 # v3.4.2
with:
dotnet-version: '8.0.x'
@@ -41,10 +41,10 @@ jobs:
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up .NET
- uses: actions/setup-dotnet@v3
+ uses: actions/setup-dotnet@55ec9447dda3d1cf6bd587150f3262f30ee10815 # v3.4.2
with:
dotnet-version: '8.0.x'
@@ -57,10 +57,10 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/api-dental-pro-csharp' && 'depot-windows-2022' || 'windows-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up .NET
- uses: actions/setup-dotnet@v5
+ uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
with:
dotnet-version: '8.0.x'
diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml
index 3f328ba..a3043d4 100644
--- a/.github/workflows/publish-nuget.yml
+++ b/.github/workflows/publish-nuget.yml
@@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up .NET
- uses: actions/setup-dotnet@v5
+ uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
with:
dotnet-version: '8.0.x'
From 2246ae634e4c1525b5b6da9a3435dcdc544a1cdb Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 13 May 2026 02:13:44 +0000
Subject: [PATCH 14/14] release: 0.7.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 25 +++++++++++++++++++++++++
src/ApiDentalPro/ApiDentalPro.csproj | 2 +-
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 4208b5c..1b77f50 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.6.0"
+ ".": "0.7.0"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 41c0c1f..af98cfb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,30 @@
# Changelog
+## 0.7.0 (2026-05-13)
+
+Full Changelog: [v0.6.0...v0.7.0](https://github.com/api-dental/api-dental-pro-csharp/compare/v0.6.0...v0.7.0)
+
+### Features
+
+* **client:** enable gzip decompression ([28a0428](https://github.com/api-dental/api-dental-pro-csharp/commit/28a042808c79875fafb7b5962bc65395b1f178f6))
+* support setting headers via env ([d9a086c](https://github.com/api-dental/api-dental-pro-csharp/commit/d9a086cec7ca67bcf0bebc7079c07b9c6c0e8884))
+
+
+### Bug Fixes
+
+* **client:** allow cancelling when enumerating over an http response ([64c8d16](https://github.com/api-dental/api-dental-pro-csharp/commit/64c8d16ae1585b38f24f06d23de377a6f7ce6959))
+* **client:** handle root bodies in requests properly ([6e7339b](https://github.com/api-dental/api-dental-pro-csharp/commit/6e7339bb0bbcedcc534a1567a32ed4d64b7edd33))
+* **docs:** make xml syntactically correct ([dfe612c](https://github.com/api-dental/api-dental-pro-csharp/commit/dfe612c869be928316e00bbc3d500dfce79823bd))
+* **internal:** disable default HttpClient timeout as we have our own ([fa2eb23](https://github.com/api-dental/api-dental-pro-csharp/commit/fa2eb2348f1f1e9ccddef6c2d49b05f99c644a0e))
+* **tests:** round-trip urls correctly ([06fb914](https://github.com/api-dental/api-dental-pro-csharp/commit/06fb914acf21a2dd230cb32ead201db856792dad))
+
+
+### Chores
+
+* **ci:** skip lint on metadata-only changes ([b7b69d4](https://github.com/api-dental/api-dental-pro-csharp/commit/b7b69d483b2c767749617e0af05880b4eb227891))
+* **internal:** tweak CI branches ([aff0c12](https://github.com/api-dental/api-dental-pro-csharp/commit/aff0c128246e68eebd71a1fc4dc3388d74a7a62d))
+* **internal:** update gitignore ([3d69bda](https://github.com/api-dental/api-dental-pro-csharp/commit/3d69bda70b5295832c20fde7af1edf84c3618e50))
+
## 0.6.0 (2026-03-15)
Full Changelog: [v0.5.0...v0.6.0](https://github.com/api-dental/api-dental-pro-csharp/compare/v0.5.0...v0.6.0)
diff --git a/src/ApiDentalPro/ApiDentalPro.csproj b/src/ApiDentalPro/ApiDentalPro.csproj
index 6a0a4d4..eb6aad0 100644
--- a/src/ApiDentalPro/ApiDentalPro.csproj
+++ b/src/ApiDentalPro/ApiDentalPro.csproj
@@ -3,7 +3,7 @@
API Dental Pro C#
ApiDentalPro
- 0.6.0
+ 0.7.0
The official .NET library for the API Dental Pro API.
Library
README.md