Anypoint Best Practices
not-anonymous-types
general > not-anonymous-types
Guidance / Message
Instead of inlining the definition of schemas in HTTP responses,
reference declared types to provide descriptive names for the federated types.
Examples
valid
200:
description: Ok!
headers:
content-type:
description: a header
type: string
example:
'application/json'
body:
application/json:
type: MessageResult
invalid
200:
description: Ok!
body:
application/json:
type: object
description: "some description"
additionalProperties: false
properties:
count:
type: integer
message:
type: string
Applies to Operation