Skip to main content

no-example-for-error-with-no-model

Overview

This rule belongs to the apimatic-post-processing-validation ruleset and states that:

An example must not be set for a error response that has no error model linked to it.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageSample value was provided for an error with no model type, therefore, it has been removed.
CodeAPIMATICPOSTPROCESS_V503
TypeValidation
Rule SystemSemantic
Broad CategoryExamples
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagsapimatic postprocessing validation sample value error response endpoint

Suggested Fixes

  • Define a corresponding exception model for the error and then try again.
  • Avoid setting an example for errors that have no model type set.

For More Information