#%RAML 1.0
---
baseUri: 'http://127.0.0.1/'
version: v1
title: PSX
/population/popo:
  description: 'Collection endpoint'
  get:
    queryParameters:
      startIndex:
        type: integer
        required: false
      count:
        type: integer
        required: false
    responses:
      200:
        body:
          application/json:
            type: PSXFrameworkAppApiPopulationCollectionPopoGet200Response
  post:
    body:
      application/json:
        type: 1
    responses:
      201:
        body:
          application/json:
            type: PSXFrameworkAppApiPopulationCollectionPopoPost201Response
/population/popo/{id}:
  description: 'Entity endpoint'
  uriParameters:
    id:
      type: integer
      required: true
  get:
    responses:
      200:
        body:
          application/json:
            type: PSXFrameworkAppApiPopulationEntityPopoGet200Response
  put:
    body:
      application/json:
        type: 1
    responses:
      200:
        body:
          application/json:
            type: PSXFrameworkAppApiPopulationEntityPopoPut200Response
  delete:
    responses:
      200:
        body:
          application/json:
            type: PSXFrameworkAppApiPopulationEntityPopoDelete200Response
/population/typeschema:
  description: 'Collection endpoint'
  get:
    queryParameters:
      startIndex:
        type: integer
        required: false
      count:
        type: integer
        required: false
    responses:
      200:
        body:
          application/json:
            type: PSXFrameworkAppApiPopulationCollectionTypeSchemaGet200Response
  post:
    body:
      application/json:
        type: 1
    responses:
      201:
        body:
          application/json:
            type: PSXFrameworkAppApiPopulationCollectionTypeSchemaPost201Response
/population/typeschema/{id}:
  description: 'Entity endpoint'
  uriParameters:
    id:
      type: integer
      required: true
  get:
    responses:
      200:
        body:
          application/json:
            type: PSXFrameworkAppApiPopulationEntityTypeSchemaGet200Response
  put:
    body:
      application/json:
        type: 1
    responses:
      200:
        body:
          application/json:
            type: PSXFrameworkAppApiPopulationEntityTypeSchemaPut200Response
  delete:
    responses:
      200:
        body:
          application/json:
            type: PSXFrameworkAppApiPopulationEntityTypeSchemaDelete200Response
/population/openapi:
  get:
    queryParameters:
      startIndex:
        type: integer
        required: false
      count:
        type: integer
        required: false
    responses:
      200:
        body:
          application/json:
            type: Collection
  post:
    body:
      application/json:
        type: 1
    responses:
      201:
        body:
          application/json:
            type: Message
/population/openapi/{id}:
  uriParameters:
    id:
      type: integer
      required: false
  get:
    queryParameters:
      startIndex:
        type: integer
        required: false
      count:
        type: integer
        required: false
    responses:
      200:
        body:
          application/json:
            type: Collection
  put:
    body:
      application/json:
        type: 1
    responses:
      200:
        body:
          application/json:
            type: Message
  delete:
    responses:
      200:
        body:
          application/json:
            type: Message
/tool:
  get:
    responses:
      200:
        body:
          application/json:
            type: Welcome
/tool/discovery:
  get:
    responses:
      200:
        body:
          application/json:
            type: Discovery_Collection
/tool/doc:
  get:
    responses:
      200:
        body:
          application/json:
            type: Documentation_Index
/tool/doc/{version}/{path}:
  uriParameters:
    version:
      type: string
      required: false
    path:
      type: string
      required: false
  get:
    responses:
      200:
        body:
          application/json:
            type: Documentation_Detail
/tool/routing:
  get:
    responses:
      200:
        body:
          application/json:
            type: Routing_Collection
types:
  Collection: { description: 'Collection result', type: object, properties: { totalResults: { type: integer }, entry: { type: array, items: { $ref: '#/types/Entity' } } } }
  Discovery_Collection: { type: object, properties: { links: { type: array, items: { $ref: '#/types/Discovery_Link' } } } }
  Discovery_Link: { type: object, properties: { rel: { type: string }, href: { type: string } } }
  Documentation_Detail: { type: object, properties: { path: { type: string }, version: { type: string }, status: { type: integer }, description: { type: string }, schema: { $ref: '#/types/Documentation_Schema' }, pathParameters: { type: string }, methods: { $ref: '#/types/Documentation_Methods' }, links: { type: array, items: { $ref: '#/types/Discovery_Link' } } } }
  Documentation_Index: { type: object, properties: { routings: { type: array, items: { $ref: '#/types/Documentation_Route' } }, links: { type: array, items: { $ref: '#/types/Discovery_Link' } } } }
  Documentation_Method: { type: object, properties: { description: { type: string }, queryParameters: { type: string }, request: { type: string }, responses: { $ref: '#/types/Documentation_Method_Responses' } } }
  Documentation_Method_Responses: { type: object, additionalProperties: { type: string } }
  Documentation_Methods: { type: object, additionalProperties: { $ref: '#/types/Documentation_Method' } }
  Documentation_Path: { type: object, properties: { version: { type: string }, path: { type: string } } }
  Documentation_Route: { type: object, properties: { path: { type: string }, methods: { type: array, items: { type: string } }, version: { type: string } } }
  Documentation_Schema: { type: object, additionalProperties: true }
  DogetQuery: { type: object, properties: { startIndex: { type: integer }, count: { type: integer } }, required: {  } }
  Entity: { description: 'Represents an internet population entity', type: object, properties: { id: { description: 'Unique id for each entry', type: integer }, place: { description: 'Position in the top list', type: integer, minimum: 1, maximum: 64 }, region: { description: 'Name of the region', type: string, pattern: '[A-z]+', minLength: 3, maxLength: 64 }, population: { description: 'Complete number of population', type: integer }, users: { description: 'Number of internet users', type: integer }, worldUsers: { description: 'Percentage users of the world', type: number }, datetime: { description: 'Date when the entity was created', format: date-time, type: string } }, required: [place, region, population, users, worldUsers] }
  Message: { title: message, description: 'Operation message', type: object }
  PSXFrameworkAppApiPopulationCollectionPopoGet200Response: { $ref: '#/types/Collection' }
  PSXFrameworkAppApiPopulationCollectionPopoPost201Response: { $ref: '#/types/Message' }
  PSXFrameworkAppApiPopulationCollectionPopoPostRequest: { $ref: '#/types/Entity' }
  PSXFrameworkAppApiPopulationCollectionTypeSchemaGet200Response: { $ref: '#/types/Collection' }
  PSXFrameworkAppApiPopulationCollectionTypeSchemaPost201Response: { $ref: '#/types/Message' }
  PSXFrameworkAppApiPopulationCollectionTypeSchemaPostRequest: { $ref: '#/types/Entity' }
  PSXFrameworkAppApiPopulationEntityPopoDelete200Response: { $ref: '#/types/Message' }
  PSXFrameworkAppApiPopulationEntityPopoGet200Response: { $ref: '#/types/Entity' }
  PSXFrameworkAppApiPopulationEntityPopoPut200Response: { $ref: '#/types/Message' }
  PSXFrameworkAppApiPopulationEntityPopoPutRequest: { $ref: '#/types/Entity' }
  PSXFrameworkAppApiPopulationEntityTypeSchemaDelete200Response: { $ref: '#/types/Message' }
  PSXFrameworkAppApiPopulationEntityTypeSchemaGet200Response: { $ref: '#/types/Entity' }
  PSXFrameworkAppApiPopulationEntityTypeSchemaPut200Response: { $ref: '#/types/Message' }
  PSXFrameworkAppApiPopulationEntityTypeSchemaPutRequest: { $ref: '#/types/Entity' }
  Path: { type: object, properties: { id: { type: integer } }, required: [id] }
  PopulationOpenapiGetQuery: { type: object, properties: { startIndex: { type: integer }, count: { type: integer } }, required: {  } }
  PopulationOpenapiIdGetQuery: { type: object, properties: { startIndex: { type: integer }, count: { type: integer } }, required: {  } }
  PopulationOpenapiIdPath: { type: object, properties: { id: { type: integer } }, required: {  } }
  Routing_Collection: { type: object, properties: { routings: { type: array, items: { $ref: '#/types/Routing_Route' } } } }
  Routing_Route: { type: object, properties: { methods: { type: array, items: { type: string } }, path: { type: string }, source: { type: string } } }
  Welcome: { type: object, properties: { message: { type: string }, url: { type: string } } }
