Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityError
MessageThe default success response type of the endpoint is undefined.
CodeAPIMATICPRE_V307
TypeValidation
Rule SystemSemantic
Broad CategoryEndpoint Responses
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagspreliminary 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.

For More Information