What is RAML 1.0 and what are its key features?
Suggested answer
RAML (RESTful API Modelling Language) is a YAML-based language for designing REST APIs. Key features:
1. Resource Types: Define reusable resource patterns (e.g., a collection type with GET/POST) — applied to multiple resources to avoid repetition.
2. Traits: Reusable snippets of method-level properties (e.g., a paged trait adding queryParameters for page and pageSize). Applied to any method with is: [paged].
3. Data Types: Define reusable, strongly-typed request/response schemas using RAML type syntax or JSON Schema. Enforce field types, required fields, patterns, enums.
4. !include: Modularise RAML — include external files for data types, examples, or documentation.
5. Annotations: Custom metadata on API elements. RAML specs published to Exchange enable auto-generated documentation, mock services, and can be used to auto-generate Mule flows in Design Center.
Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.
Community comments (0)
No comments yet.
Sign in or create a free account to add a comment. Comments are moderated before they appear.