Skip to content

Instantly share code, notes, and snippets.

@bradygaster-zz
Created November 23, 2015 23:07
Show Gist options
  • Save bradygaster-zz/1181ca8ab1690ff11518 to your computer and use it in GitHub Desktop.
Save bradygaster-zz/1181ca8ab1690ff11518 to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
version: v1
title: Contact List
description: A Contact list API based on Swagger and built using Node.js
host: localhost
schemes:
- http
- https
basePath: /
paths:
/contacts:
get:
tags:
- Contact
operationId: contacts_get
consumes: []
produces:
- application/json
- text/json
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Contact'
deprecated: false
'/contacts/{id}':
get:
tags:
- Contact
operationId: contacts_getById
consumes: []
produces:
- application/json
- text/json
parameters:
- name: id
in: path
required: true
type: integer
format: int32
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Contact'
deprecated: false
definitions:
Contact:
type: object
properties:
id:
format: int32
type: integer
name:
type: string
email:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment