Skip to content

Instantly share code, notes, and snippets.

@avivshafir
Created June 23, 2020 09:09
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 avivshafir/e16bb804d2bc9a95a4a9c0e2efe15024 to your computer and use it in GitHub Desktop.
Save avivshafir/e16bb804d2bc9a95a4a9c0e2efe15024 to your computer and use it in GitHub Desktop.
{
swagger: "2.0",
info: {
title: "ClimaCell v4 API",
version: "1.0.0"
},
paths: {
/locations/{locationId}: {
get: {
description: "Returns an location based on a single ID",
operationId: "find location by id",
parameters: [
{
name: "id",
in: "path",
description: "ID of the location id to fetch",
required: true,
schema: {
type: "string"
}
}
],
responses: {
200: {
description: "alert response",
content: {
application/json: {
schema: {
type: "array",
items: {
type: "object",
properties: {
id: {
type: "string"
},
name: {
type: "string"
}
}
}
}
}
}
},
default: {
description: "unexpected error",
content: {
application/json: {
schema: {
type: "object",
required: [
"code",
"message"
],
properties: {
code: {
type: "integer",
format: "int32"
},
message: {
type: "string"
}
}
}
}
}
}
}
}
},
/alerts/{alertId}: {
get: {
description: "Returns an alert based on a single ID",
operationId: "find alert by id",
parameters: [
{
name: "id",
in: "path",
description: "ID of the alert id to fetch",
required: true,
schema: {
type: "string"
}
}
],
responses: {
200: {
description: "alert response",
content: {
application/json: {
schema: {
type: "array",
items: {
type: "object",
properties: {
id: {
type: "string"
},
name: {
type: "string"
}
}
}
}
}
}
},
default: {
description: "unexpected error",
content: {
application/json: {
schema: {
type: "object",
required: [
"code",
"message"
],
properties: {
code: {
type: "integer",
format: "int32"
},
message: {
type: "string"
}
}
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment