#%RAML 1.0
---
baseUri: 'http://127.0.0.1/'
version: v1
title: PSX
/api:
  description: 'lorem ipsum'
  uriParameters:
    name:
      description: 'Name parameter'
      type: string
      minLength: 0
      maxLength: 16
      pattern: '[A-z]+'
      required: false
    type:
      type: string
      enum: [foo, bar]
      required: false
  get:
    description: 'Returns a collection'
    queryParameters:
      startIndex:
        description: 'startIndex parameter'
        type: integer
        minimum: 0
        maximum: 32
        required: false
      float:
        type: number
        required: false
      boolean:
        type: boolean
        required: false
      date:
        type: date-only
        required: false
      datetime:
        type: datetime-only
        required: false
    responses:
      200:
        body:
          application/json:
            type: Collection
  post:
    body:
      application/json:
        type: 1
    responses:
      201:
        body:
          application/json:
            type: Message
  put:
    body:
      application/json:
        type: 1
    responses:
      200:
        body:
          application/json:
            type: Message
  delete:
    body:
      application/json:
        type: 1
    responses:
      200:
        body:
          application/json:
            type: Message
  patch:
    body:
      application/json:
        type: 1
    responses:
      200:
        body:
          application/json:
            type: Message
types:
  Collection: { type: object, properties: { entry: { type: array, items: { $ref: '#/types/Entry' } } } }
  Create: { 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 } }, required: [title, date] }
  Delete: { 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 } }, required: [id] }
  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 } } }
  Get_Query: { type: object, properties: { startIndex: { description: 'startIndex parameter', type: integer, minimum: 0, maximum: 32 }, float: { type: number }, boolean: { type: boolean }, date: { format: date, type: string }, datetime: { format: date-time, type: string } } }
  Message: { type: object, properties: { success: { type: boolean }, message: { type: string } } }
  Patch: { 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 } }, required: [id] }
  Path: { type: object, properties: { name: { description: 'Name parameter', type: string, pattern: '[A-z]+', minLength: 0, maxLength: 16 }, type: { enum: [foo, bar], type: string } } }
  Update: { 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 } }, required: [id] }
