Skip to content

Instantly share code, notes, and snippets.

@kevinjom
Created January 6, 2017 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinjom/1ec5b71688ab9cc9f319b48afc9d1f81 to your computer and use it in GitHub Desktop.
Save kevinjom/1ec5b71688ab9cc9f319b48afc9d1f81 to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
title: Todo API
description: A simple API to manage your todo tasks.
version: "1.0.0"
# the domain of the service
host: todo.bla.com
# array of all schemes that your API supports
schemes:
- http
produces:
- application/json
paths:
/todoitems:
get:
summary: list todo items
description: list todo items
responses:
200:
description: todo
schema:
$ref: '#/definitions/TodoItemsResponse'
default:
description: Internal server error
definitions:
TodoItem:
type: object
properties:
id:
type: integer
format: int64
description: the id the this todo item
name:
type: string
description: the name/title of the todo item
maxLength: 140
done:
type: boolean
description: if the item has been finished
timestamp:
type: string
format: date-time
description: when the item was created/updated
TodoItemsResponse:
type: object
properties:
items:
type: array
items:
$ref: '#/definitions/TodoItem'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment