Scenario
Add an HTTP Spector scenario for an operation whose successful response may either contain a model body or contain no body:
op getLayout(): {
@statusCode statusCode: 200;
@body layout: BlobLayout;
} | {
@statusCode statusCode: 204;
};
The scenario should provide test routes/cases that exercise both declared outcomes:
200 OK with a valid BlobLayout response body.
204 No Content with no response body.
Why
Emitters need to distinguish this from a nullable body on a single response. The operation succeeded in both cases, but one success variant has no representation. Without shared Spector coverage, emitters can accidentally deserialize the empty 204 response or expose a result type that incorrectly guarantees a value.
Validation
The scenario should allow language emitters to verify that:
- Both
200 and 204 are classified as successful.
- The
200 response is deserialized normally.
- The
204 response does not attempt body deserialization.
- Raw response status and headers remain available for both outcomes.
Scenario
Add an HTTP Spector scenario for an operation whose successful response may either contain a model body or contain no body:
The scenario should provide test routes/cases that exercise both declared outcomes:
200 OKwith a validBlobLayoutresponse body.204 No Contentwith no response body.Why
Emitters need to distinguish this from a nullable body on a single response. The operation succeeded in both cases, but one success variant has no representation. Without shared Spector coverage, emitters can accidentally deserialize the empty
204response or expose a result type that incorrectly guarantees a value.Validation
The scenario should allow language emitters to verify that:
200and204are classified as successful.200response is deserialized normally.204response does not attempt body deserialization.