#%RAML 1.0
---
baseUri: 'http://api.phpsx.org'
version: v1
title: PSX
description: Foobar
/foo/{name}/{type}:
  description: 'lorem ipsum'
  uriParameters:
    name:
      type: string
      required: true
    type:
      type: string
      required: true
  post:
    description: 'Returns a collection'
    body:
      application/json:
        type: 1
    responses:
      200:
        body:
          application/json:
            type: EntryOrMessage
types:
  Entry: { type: object, properties: { id: { type: integer }, userId: { type: integer }, title: { type: string, pattern: '[A-z]+', minLength: 3, maxLength: 16 }, date: { format: date-time, type: string } } }
  EntryMessage: { type: object, properties: { success: { type: boolean }, message: { type: string } } }
  EntryOrMessage: { oneOf: [{ $ref: '#/types/Entry' }, { $ref: '#/types/EntryMessage' }] }
  Path: { type: object, properties: { name: { type: string }, type: { type: string } }, required: [name, type] }
