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
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Liquibase: Database Change Management and Automated Deployments
  • AWS Managed Database Observability: Monitoring DynamoDB, ElastiCache, and Redshift Beyond CloudWatch
  • Production Database Migration or Modernization: A Comprehensive Planning Guide [Part 2]
  • S3 Vectors: How to Build a RAG Without a Vector Database

Trending

  • Swift Concurrency Part 4: Actors, Executors, and Reentrancy
  • Lease Coordination Under Serializable Isolation in CockroachDB
  • The Prompt Isn't Hiding Inside the Image
  • Designing Effective Meetings in Tech: From Time Wasters to Strategic Tools
  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 user avatar
Jitendra Bafna
·
Dec. 28, 20 · Tutorial
Likes (5)
Comment
Save
Tweet
Share
22.6K Views

Join the DZone community and get the full member experience.

Join For Free

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

  • Liquibase: Database Change Management and Automated Deployments
  • AWS Managed Database Observability: Monitoring DynamoDB, ElastiCache, and Redshift Beyond CloudWatch
  • Production Database Migration or Modernization: A Comprehensive Planning Guide [Part 2]
  • S3 Vectors: How to Build a RAG Without a Vector Database

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • 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