Skip to content

Instantly share code, notes, and snippets.

@robertpostill
Last active January 5, 2016 13:18
Show Gist options
  • Save robertpostill/c6d148dea082baae1c45 to your computer and use it in GitHub Desktop.
Save robertpostill/c6d148dea082baae1c45 to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
version: 0.2.0
title: 'donesafe_visitor'
paths:
/visits:
post:
description: Create a visit record
parameters:
- name: visit
in: body
description: A JSON representation of the visit data.
schema:
$ref: '#/definitions/visit'
responses:
201:
description: Created
schema:
- name: id
type: integer
format: int64
description: The ID of the visit record.
422:
description: Unable to process, error supplied.
'/visits/{phone_number}':
delete:
description: Sign out of a visit
parameters:
- name: phone_number
in: path
description: Phone number of visitor
type: string
responses:
204:
description: Deleted
422:
description: Unable to process, error supplied.
/staff:
get:
description: A list of the staff a visitor could visit.
parameters:
- name: name
in: query
description: A partial or full name of a member of staff.
type: string
required: false
responses:
200:
description: OK
/logo:
get:
description: Get the logo
responses:
200:
description: OK
/background:
get:
description: The background to be displayed
responses:
200:
description: OK
definitions:
"visit":
type: object
required: [ "first_name", "last_name", "mobile", "visitee_id" ]
properties:
first_name:
type: string
last_name:
type: string
mobile:
type: string
email:
type: string
visitee_id:
type: integer
arrive_at:
type: dateTime
company:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment