valid-predefined-default-success-response-type
Overview
This rule belongs to the apimatic-preliminary-validation
ruleset and states that:
The default success response type of an endpoint must be non-empty, non-null and a valid primitive/complex type supported by APIMatic.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | The default success response type of the endpoint is undefined. |
Code | APIMATICPRE_V307 |
Type | Validation |
Rule System | Semantic |
Broad Category | Endpoint Responses |
Products Impacted | Code Generation, Developer Experience Portal, API Transformer |
Tags | preliminary checks validation apimatic type response endpoint |
Suggested Fixes
- Set the type of the response as "Void" if no response body is expected.
- If a primitive response body is expected, set an appropriate primitive type supported by APIMatic.
- If a complex object response body is expected, define a custom type/model in APIMatic and reference that.