Created
June 23, 2020 09:09
-
-
Save avivshafir/e16bb804d2bc9a95a4a9c0e2efe15024 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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