Repository navigation
feat: add body property injection and non-blocking async retry support - #259
Open
fern-api[bot] wants to merge 4 commits into
Open
fern-api[bot] wants to merge 4 commits into
fern-api[bot] wants to merge 4 commits into
Conversation
Generated by Fern CLI Version: unknown Generators: - fernapi/fern-java-sdk: 4.32.4
… async retry support Introduce two new capabilities to the SDK core and fix deserialization correctness across all agent request/response types. `RequestOptions` now supports injecting arbitrary key/value pairs into the JSON or form-urlencoded request body via `addBodyProperty()` and `bodyProperties()` builder methods, enabling callers to pass extra fields without subclassing request types. `RetryInterceptor` gains a new `newAsyncCall()` factory that schedules retry backoff on a dedicated daemon thread instead of sleeping inside an OkHttp dispatcher slot, so retrying calls no longer consume one of the five per-host dispatcher connections while waiting. Cancellation during a backoff wait is also now immediate. `Stream.fromSseWithEventDiscrimination()` is added to support SSE streams where certain event types model the full SSE envelope rather than just the data payload. All agent builder classes now use a private `@JsonAnySetter` method that skips known field names, preventing known properties from being double-written into `additionalProperties` during JSON deserialization. Key changes: - `RequestOptions.Builder.addBodyProperty()` and `.bodyProperties()` — inject extra fields into any request body - `RetryInterceptor.newAsyncCall()` and `AsyncCall` interface — non-blocking async retry that frees dispatcher threads during backoff - `Stream.fromSseWithEventDiscrimination()` — SSE stream factory with envelope-aware event discrimination - Fixed `@JsonAnySetter` on all agent builder types to skip known fields during deserialization 🌿 Generated with Fern
|
This PR is too large for Bugbot to review. It changes 48,715 lines and 3,908,620 characters. Split the change into smaller pull requests to get a review. |
…787dda709738cd22 [skip ci]
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
18.1.0 → 18.2.0
Added
RequestOptions.Builder.addBodyProperty/bodyProperties— inject arbitrary key/value pairs into JSON or form-urlencoded request bodies at call time, overriding matching fields already present.RetryInterceptorasync retry support — newnewAsyncCallfactory schedules retry backoff on a background daemon thread, preventing retrying requests from consuming OkHttp dispatcher slots.CreateOmopResponsegainsgetQuantityTransformations(),getRowsForReview(),getDeviceExposureContexts(),getSpecimenSourceContexts(), andgetMedicationDispenseSourceContexts();OmopTablesgainsgetDeviceExposure()andgetSpecimen();DrugExposureRowgainsgetQuantity();MeasurementRowgainsgetUnitSourceConceptId();VisitOccurrenceRowgainsgetVisitSourceConceptId();SummarygainsgetRowsForReview().DeviceExposureRow,DeviceExposureContext,SpecimenRow,MappingResolution,MappingPath,AllergyMappingResolution,QuantityTransformation,QuantityEvidence,MedicationDispenseSourceContext, and related enum types covering device exposure, allergy resolution, quantity derivation, and vocabulary mapping outcomes.CreateMultiRequest.getSmallNote()— new optional boolean field that bills the request at the lower small-note rate whentrue(text must be ≤ 15,360 bytes UTF-8).ExtractRequestConfigValidationMethod.SEMANTIC_MAPPING— new validation method constant with a correspondingvisitSemanticMapping()visitor method.Stream.fromSseWithEventDiscrimination— new SSE stream factory supporting mixed-discrimination streams where selected event types model the full SSE envelope.Changed
MappingEntry— gainsgetResolution()returning structuredMappingResolutionmetadata; Javadoc forgetMappingStatus(),getOmopField(),getSelected(), andgetNote()updated to describe expanded UNMAPPED semantics.MeasurementRow,ObservationRow,ObservationPeriodRow, andProcedureOccurrenceRownow describes multi-resource timing rules and Specimen/Death row inclusion.ProviderRow.getNpi()andReferenceDiagnosticoutcome fields — Javadoc updated to document NPI extraction/deduplication rules and all fourReferenceDiagnosticoutcome values.Fixed
@JsonAnySetter/additionalPropertiesacross all builder types — a privateputAdditionalPropertyFromJsonguard now prevents known JSON fields from being double-captured intoadditionalPropertiesduring deserialization.See full changelog