Anypoint Best Practices

(14 reviews)

media-type-headers-response

general > media-type-headers-response


Guidance / Message

"Response '{{apiContract.statusCode}}', must Use: ‘Content-Type’ header"

Examples

valid

responses:
  200:
    description: All profiles
    headers:
      content-type:
        description: Content Type
        type: string
        example:
          'application/json'

invalid

responses:
  200:
    description: All profiles
    headers:
      someheader:
        description: definetly not content type
        type: string
        example:
          'nothingrelevant'

Applies to Response

Constraint

Type: Declarative 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