Skip to content

Instantly share code, notes, and snippets.

@qerub
Created June 25, 2016 23:00
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 qerub/e2cdbe50884056d3afbc4f74bd560b0b to your computer and use it in GitHub Desktop.
Save qerub/e2cdbe50884056d3afbc4f74bd560b0b to your computer and use it in GitHub Desktop.
First stab at a Swagger/OpenAPI specification for the LIFX API
swagger: "2.0"
info:
title: LIFX HTTP Remote Control API
version: v1
description: https://api.developer.lifx.com/
host: api.lifx.com
basePath: /v1
schemes:
- https
produces:
- application/json
securityDefinitions:
authorization:
name: Authorization
type: apiKey
in: header
paths:
/lights/{selector}:
get:
operationId: getLights
parameters:
- name: selector
in: path
required: true
type: string
responses:
200:
description: ""
schema:
type: array
items:
$ref: "#/definitions/Light"
security:
- authorization: []
# TODO: Add more paths
definitions:
Light:
type: object
properties:
id:
type: string
label:
type: string
connected:
type: boolean
# TODO: Add more properties
@qerub
Copy link
Author

qerub commented Jul 16, 2017

A more complete specification can now be found here: https://github.com/qerub/lifx-swagger-specification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment