Anypoint Best Practices

(14 reviews)

provide-examples

general > provide-examples


Guidance / Message

Always include examples in requests and responses.

Examples

valid

responses:
  200:
    description: Ok!
    body:
      application/json:
        type: string
        example: Hello!

invalid

responses:
  200:
    description: Ok!
    body:
      application/json:
        type: string # no example here

Applies to Payload

Constraint

Type: Rego Validation

Reviews

TypeRuleset
OrganizationMuleSoft
Published by
MuleSoft Organization
Published onDec 11, 2023
Asset overview

Asset versions for 1.6.x

Asset versions
VersionActions
1.6.1
1.6.0

Tags