@W-23748891 feat: render SSE text/event-stream body via shapes#itemSchema fallback - #63
Draft
alexpmule wants to merge 3 commits into
Draft
@W-23748891 feat: render SSE text/event-stream body via shapes#itemSchema fallback#63alexpmule wants to merge 3 commits into
alexpmule wants to merge 3 commits into
Conversation
|
Thanks for the contribution! Unfortunately we can't verify the commit author(s): Alex Perez <a***@s***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, refresh the status of this Pull Request. |
alexpmule
force-pushed
the
W-23748891-sse-itemschema
branch
from
August 18, 2026 22:18
1bedff3 to
eb5d3d8
Compare
OAS 3.2 SSE responses carry the streamed event shape under `shapes#itemSchema` rather than `shapes#schema`, so the body renderer returned undefined and drew an empty body. `_computeSelectedSchema` now falls back to `itemSchema` when `schema` is absent, building the key from the shapes prefix (amf-helper-mixin has no `itemSchema` constant). `_computeTypeName` also suppresses the internal `itemSchema` name so it is not surfaced as a user-facing type title, matching `schema`. Covers W-23748891 AC-01/02/03. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The inline-AMF suite (sse-item-schema.test.js) is the generator-independent gating oracle and depends on no model file. The fixture-driven suite is the supporting visual/e2e check; guard it so a stripped or partial checkout without the committed console model degrades to `skip`, never a false red. Also document the fixture provenance explicitly: the JSON is produced by the console toolchain (api-model-generator 0.4.0 / AMF 5.11), not this component's pinned generator, and committed like the existing grpc-test.json fixture. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The mixed [string, boolean] variant table inferred as , tripping tsc (lint:types) where loadModelOrSkip expects a boolean. Annotate the table as Array<[string, boolean]>. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
alexpmule
force-pushed
the
W-23748891-sse-itemschema
branch
from
August 19, 2026 18:30
eb5d3d8 to
3050ff7
Compare
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.
@W-23748891
What
Renders SSE (
text/event-stream) response bodies via ashapes#itemSchemafallback.OAS 3.1/3.2 describes the per-event payload of a streaming response through
itemSchemarather than the usual body schema. This falls back toitemSchemawhen the media type istext/event-stream(or the standard schema is absent), so the streamed event payload renders instead of an empty body.Why
TD-0333486 — OAS 3.1/3.2 support in API Console v6. AC3: SSE / streaming responses must render their event payload.
Tests
Green in chromium + firefox. Includes an inline AMF expanded-model fixture; the real-model variant
this.skip()s when the generated fixture is absent (degrades to skip, never red).Scope
Draft for review.