This rule belongs to the
apimatic-preliminary-linting ruleset and states that:
If your response type is set to
Dynamic, it may be because enough information about response type could not be deduced from your API description response information. Make sure that
Void is set for only those responses where no response body is expected. And
Dynamic is used where the response type information cannot be easily represented or you need to allow multiple types. In all other cases, a valid primitive or model type must be used for the response.
|Message||Response type is set to |
|Products Impacted||Code Generation, Developer Experience Portal, API Transformer|
- If your endpoint response returns a JSON object or JSON array or an enumeration, make sure that you define a global model/custom type to represent that data and reference that model in the response type definition.
- If your endpoint response returns a single type of primitive data, make sure to choose the appropriate primitive type in the response type definition.
- If your endpoint response can return multiple types of data or a concrete type cannot be determined, use type
- If your endpoint response does not return any data or a response body is not expected, use type