Anypoint Best Practices

(14 reviews)

use-schemas-responses

general > use-schemas-responses


Guidance / Message

Use schemas or data types in the specification to determine the format of the response bodies.

Examples

valid

#%RAML 1.0
title: Ruleset API
mediaType:
- application/json
/abc:
get:
  responses:
    200:
    body:
      type: string

invalid

#%RAML 1.0
title: Ruleset API
mediaType:
- application/json
/abc:
get:
  responses:
    200:
    body:
      type: any

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