DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Should Developers Switch From SQLite to DuckDB?
  • Adding Graph Retrieval to a RAG Pipeline With Python
  • PostgreSQL vs Oracle: When Higher Cost Means Better Performance
  • Catching Query Regressions Before Your Users Do

Trending

  • Fix the Target, Precompute Once: A Backend-Free Word-Ladder Solver With a BFS Distance Field
  • Part 3: End-to-End Tracing and Observability Across Goose, agentgateway, and Quarkus
  • AI Agents and Frontier Models: Insights From The Neuron
  • After the AI Commit: What Eight Retrospectives Taught Me About Working With Coding Agents

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Data Engineering
  3. Databases
  4. RAML Tutorials for Beginners and Experts [Videos]

RAML Tutorials for Beginners and Experts [Videos]

Time for a RAML rundown.

By 
Jitendra Bafna
·
Dec. 28, 20 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
23.1K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

What Is RAML?

RAML is Rest API Modeling Language, based on YAML, for describing your APIs. It is basically used to describe your API, which can be easily readable by humans and computers. It basically focuses on describing your API resources, methods, parameters, media types, etc.

Here is a video tutorial explaining how to write basic RAML.

URI Params and Query Params

URI parameters (path params) are basically used to identify a specific resource or resources, whereas a query parameter is used to sort/filter those resources. Query parameters are passed in the URL as a query string in key-value form. 

For more details on URI params and query params, please refer to https://dzone.com/articles/understanding-the-uri-param-and-query-param-with-r

Traits

Traits are like functions and are used to define common attributes for HTTP methods (GET, PUT, POST, PATCH, DELETE, etc.), such as whether or not they are filterable, searchable, or pageable. 

Here is a video tutorial explaining the traits with RAML.


Security Schemes

RAML defines a security scheme that can be applied to resource methods for authenticating API requests. 

Here is a video tutorial explaining security schemes with RAML.


Libraries and Fragments

A RAML library is a collection of the data type declaration, security scheme declaration, and resource type declaration into a modular and reusable group. It also allows you to define multiple types within the same library, unlike data types.

Fragments are basically used to externalize your security schemes, library, resource types, traits, data types, etc. They can be reused across any RAML. One of the characteristics of a fragment is that it can be published to Exchange, and it is possible to version your fragments. 

Here is a video tutorial explaining libraries and fragments with RAML.


ResourceTypes

ResourceTypes are like resources in that they can specify descriptions, methods, and parameters. A resource that uses resourceTypes can inherit its nodes. ResourceTypes can use and inherit from other resourceTypes.

A ResourceType is basically a template that is used to define the descriptions, methods, and parameters that can be used by multiple resources without writing duplicate code. 

Here is a video tutorial explaining ResourceTypes with RAML.


For more details on ResourceTypes and Traits, please refer to https://dzone.com/articles/understanding-resourcetypes-and-traits-with-raml

Complete RAML code: https://drive.google.com/file/d/1a-Dqq-0DdramcRv_Sp0AHq0BXsIB4wTU/view?usp=sharing

Database

Opinions expressed by DZone contributors are their own.

Related

  • Should Developers Switch From SQLite to DuckDB?
  • Adding Graph Retrieval to a RAG Pipeline With Python
  • PostgreSQL vs Oracle: When Higher Cost Means Better Performance
  • Catching Query Regressions Before Your Users Do

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook