Repository navigation
8.3.1: stream application/jsonl, and refuse the deprecated application/stream+json - #473
Merged
jemacineiras merged 2 commits intoSep 29, 2026
Merged
Conversation
…tream+json JSON Lines is the same format as NDJSON, so it takes the same generated endpoints, and NdjsonSupport now sends the media type the contract declares. ApiWebClient registers it in its codecs and streams it; a WebFlux server or a reactive @HttpExchange interface needs the application's codecs to, which the README shows with a CodecCustomizer. application/stream+json is deprecated and Spring Framework 7 no longer streams it, and ApiWebClient's codecs would not read it: the generation now fails and asks for application/x-ndjson or application/jsonl. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 5 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
7 tasks done
jemacineiras
approved these changes
Sep 29, 2026
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.
Summary
Follow-up to #472: this commit reached its branch after it was merged, so 8.3.0 shipped without it.
application/jsonlstreams likeapplication/x-ndjsonOpenAPI 3.2 names JSON Lines as a sequential media type, and it is the same format as NDJSON. It now takes the same generated code:
NdjsonSupport.stream(...)sends the media type the contract declares instead of alwaysapplication/x-ndjson.@HttpExchangeinterfaces useFlux<T>.ApiWebClientregistersapplication/jsonlin its Jackson codecs and as a streaming type of the encoder, so aFluxbody is sent line by line, not as a JSON array.Spring's own codecs stream
application/x-ndjsononly. For JSON Lines, a WebFlux server, or a reactive@HttpExchangebacked by the application'sWebClient.Builder, needs aCodecCustomizer. The README shows it for Boot 4 and for Boot 2/3.application/stream+jsonfails the generation8.3.0 treated it as a stream, but it is deprecated. Spring Framework 7 no longer streams it, and
ApiWebClient's codecs, which list JSON and NDJSON only, would not read it. The generation now fails with a message asking forapplication/x-ndjsonorapplication/jsonl.Test plan
testNdjsonStreaminggains a JSON Lines response and body (/items/lines) in every variant; new error test forapplication/stream+jsonNdjsonSupport.stream, and theApiWebClient(Boot 4) codecstest integrationTestgreen (JDK 21)Content-Type: application/jsonllines and reads a JSON Lines body;@HttpExchange(4.0) does too with the README'sCodecCustomizer, and fails withUnsupportedMediaTypeExceptionwithout it.🤖 Generated with Claude Code