Back Home

Best source for Raml documentations https://github.com/raml-org/raml-spec

Basic Setup

  1. define the url
  2. define the protocol
  • GET - Retrieve the information defined in the request URI.
  • PUT - Replace the addressed collection. At the object-level, create or update it.
  • POST - Create a new entry in the collection. This method is generally not used at the object-level.
  • DELETE - Delete the information defined in the request URI.

Basic Get and Post

#%RAML 0.8
baseUri: http://mocksvc.mulesoft.com/mocks/b87f62e2-b71b-4ff0-ac27-efbd26cddb39
title:
/event:
  get:
    description: get the next broadcast event
    responses:
      200:
        body:
          application/xml:
            example:
              <xml>hello world </xml>
 
/catchup/{catchupId}:  
  get:
    description: catchup on past events
    responses:
      200:
        body:
          application/xml:    
            example:
               <xml>hello world </xml>

Parameters

  • A simple url parameter can be added inside curly brackets e.g {authorName}
  • query parameters
1  /books:
2    get:
3      queryParameters:
4        author:
5        publicationYear:
6        rating:
7        isbn:
8    put:
9    post:

Mock Services

 
raml.txt · Last modified: 2017/05/30 06:54 by root
 
RSS - 200 © CrosswireDigitialMedia Ltd