title: How to model decimal type in RAML
body: <p>I am modelling a <em>REST API</em> using <strong>RAML</strong>. The response body of an endpoint (<code>JSON</code> format) is a financial transactions list. Each transactions contains an amount of money: currency and numeric value. The following is the snippet of my <code>RAML file</code>, please note the property <code>amount</code> in the <code>Transaction</code> type:</p>
  
  <pre><code>  # %RAML 1.0
    title: Trading details API
    version: v1
    mediaType: application/json
    baseUri: http://my.host.io/api/trading/v1/
    types:
      Transactions:
        type: Transaction[]
        minItems: 1
      Transaction:
        type: object
        properties:
          refNum:
            type: string 
          amount:
            type: ????
          currency:
            type: string
            minLength: 2
            maxLength: 3
  
    /trades
      get:
        description: Get details for a given trade
        queryParameters:
          userId:
            type: integer
            required: true
  
        responses:
          200:
            body:
              application/json:
                type: Transactions
  </code></pre>
  
  <p>Unfortunately <strong><em>RAML</em></strong> has no Built-in <code>decimal</code> type, and the other numeric types (integer, float or double) are not suitable for this scope, mainly because I need to specify the number of digits after the <code>.</code> .</p>
  
  <p>So question is: in <strong>RAML</strong> how do I correctly model the type <code>amount</code>?</p>
  
  <p>I need to provide an exact definition of the type for each response body values, because this file will be the contract between the backend and frontend (developed by 2 different teams).</p>
  
  <p>Any helps is welcomed.</p>
  
  <p><em>Please note that</em> I made some research on SO, and the closest question to mine is: <a href="https://stackoverflow.com/questions/29341337/how-to-define-money-amounts-in-an-api">How to define money amounts in an API
  </a>. But it is not related to RAML modelling, and the answers are not helping to me. </p>