-
Notifications
You must be signed in to change notification settings - Fork 1
feat(client): make union deserialization more robust #521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
feat(client): add enum validation method chore(client): remove unnecessary json state from some query param classes chore(internal): add json roundtripping tests chore(internal): add invalid json deserialization tests
stainless-app bot
added a commit
that referenced
this pull request
Apr 1, 2025
feat(client): add enum validation method chore(client): remove unnecessary json state from some query param classes chore(internal): add json roundtripping tests chore(internal): add invalid json deserialization tests
Merged
jordanbrauer
pushed a commit
that referenced
this pull request
Apr 8, 2025
* docs: update URLs from stainlessapi.com to stainless.com (#467) More details at https://www.stainless.com/changelog/stainless-com * chore(internal): codegen related update (#469) * feat(client): allow configuring timeouts granularly (#470) Note that previously the `timeout(Duration)` method on the client and `RequestOptions` corresponded to connect, read, write, and request timeout. Now it only corresponds to the request timeout. Use the new `timeout(Timeout)` method to configure other timeout values granularly. * feat(client): support raw response access (#471) * chore(client)!: refactor multipart formdata impl (#473) chore(internal): move `HttpRequestBodies` file chore(internal): extract function for checking for lists in json fields # Migration 1. Builder methods that used to take `contentType` and `filename` as positional parameters after the main argument now no longer do. To set a custom `contentType` or `filename`, pass `MultipartField`, which can be constructed via `MultipartField.builder()`. 2. It's unlikely you were referencing it, but `MultipartFormValue` is now called `MultipartField` if you were. * docs: add raw response readme documentation (#474) * docs: note required fields in `builder` javadoc (#475) * chore(client): expose `Optional`, not nullable, from `ClientOptions` (#476) * feat(api): manual updates (#477) * codegen metadata * codegen metadata * feat(client): accept `InputStream` and `Path` for file params (#479) * feat(client): detect binary incompatible jackson versions (#480) * fix: compilation error * feat: generate and publish docs (#481) * chore(internal): add `.kotlin` to `.gitignore` (#483) * chore(internal): use `getOrNull` instead of `orElse(null)` (#484) * chore(internal): reenable warnings as errors (#485) chore(internal): don't use `JvmOverloads` in interfaces * docs: revise readme docs about nested params (#486) * docs: document `JsonValue` construction in readme (#487) * chore(internal): codegen related update (#488) * chore(internal): codegen related update * docs: deduplicate and refine comments (#494) * chore(internal): make test classes internal (#495) * chore(internal): add generated comment (#496) * docs: add `build` method comments (#497) * chore(internal): refactor query param serialization impl and tests (#498) * chore(internal): rename `getPathParam` (#499) chore(internal): reorder some params methodsc chore(internal): delete duplicate tests chore(internal): refactor some test assertions * chore(internal): reformat some tests (#500) chore(internal): generate more tests * chore(internal): add some tests for union classes (#501) * fix(client): support kotlin 1.8 runtime (#502) * chore(internal): refactor enum query param serialization (#503) * chore(internal): codegen related update (#504) * chore(client)!: refactor exception structure and methods (#505) # Migration Previously you would access error JSON on an exception via `exception.error()._additionalProperties()`, which would return `Map<String, JsonValue>`. Now you would access this via `exception.body()`, which returns `JsonValue`. You should no longer assume that the returned error JSON is an object. You can check via `exception.body().asObject()`. * docs: refine comments on multipart params (#507) chore(internal): make multipart assertions more robust chore(internal): remove unnecessary `assertNotNull` calls * chore(internal): fix example formatting (#508) * chore(internal): remove unnecessary import (#509) * docs: update readme exception docs (#510) * docs: minor readme tweak (#511) * feat(client): support a lower jackson version (#512) feat(client): throw on incompatible jackson version * feat(api): api update (#513) * codegen metadata * chore(internal): delete unused methods and annotations (#514) fix(client): map deserialization bug * feat(api): api update (#515) * fix(client): don't call `validate()` during deserialization if we don't have to (#516) * feat(api): api update (#517) * fix(client): limit json deserialization coercion (#518) * fix: pluralize `list` response variables (#519) * feat(api): api update (#520) * codegen metadata * feat(client): make union deserialization more robust (#521) feat(client): add enum validation method chore(client): remove unnecessary json state from some query param classes chore(internal): add json roundtripping tests chore(internal): add invalid json deserialization tests * feat(client): make datetime deserialization more lenient (#522) * feat(api): api update (#523) * feat(client): expose request body setter and getter (#524) * perf(client): cached parsed type in `HttpResponseFor` (#525) * feat(api): add new endpoints for pay statement items (#526) * feat(api): manual updates (#527) * chore(internal): swap from `getNullable` to `getOptional` (#528) * fix(client): return `Optional<T>` instead of `Optional<? extends T>` (#529) docs: add comments to `JsonField` classes * docs: swap examples used in readme (#530) docs: document how to forcibly omit required field * chore(internal): codegen related update (#531) * codegen metadata * chore(tests): improve enum examples (#532) * fix(tests): fix jackson attributes * release: 5.0.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Tomer Aberbach <tomer@stainless.com> Co-authored-by: Samuel El-Borai <sam@elborai.me>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
0 participants
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.
feat(client): add enum validation method
chore(client): remove unnecessary json state from some query param classes
chore(internal): add json roundtripping tests
chore(internal): add invalid json deserialization tests