valid-streaming-endpoint-response-type
Overview
This rule belongs to the apimatic-preliminary-validation ruleset and states that:
Primitive types cannot be used as a default response type of streaming endpoints. Only model types are allowed.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Streaming endpoint must have a model type response. |
| Code | APIMATICPRE_V308 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Endpoint Responses |
| Products Impacted | Code Generation, Developer Experience Portal, API Transformer |
| Tags | preliminary checks validation apimatic streaming response type endpoint |
Suggested Fixes
- Disable streaming for the endpoint.
- Reference an appropriate complex type for this endpoint. Define one in the custom types if it does not exist already.