Skip to content

Commit

Permalink
Merge pull request #148 from Lull3rSkat3r/issue-146-add-endpoints-to-…
Browse files Browse the repository at this point in the history
…swagger

[Issue 146]: Updated Swagger docs
  • Loading branch information
parente committed Apr 1, 2016
2 parents ec87f88 + 8b5e831 commit 7a794a6
Show file tree
Hide file tree
Showing 2 changed files with 162 additions and 1 deletion.
100 changes: 100 additions & 0 deletions kernel_gateway/services/api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,51 @@
}
},
"paths": {
"/api": {
"get": {
"summary": "Get API info",
"tags": [
"api"
],
"responses": {
"200": {
"description": "Returns information about the API",
"schema": {
"$ref": "#/definitions/ApiInfo"
}
}
}
}
},
"/api/swagger.yaml": {
"get": {
"produces": [
"text/x-yaml"
],
"summary": "Get API info",
"tags": [
"api"
],
"responses": {
"200": {
"description": "Returns a swagger specification in yaml"
}
}
}
},
"/api/swagger.json": {
"get": {
"summary": "Get API info",
"tags": [
"api"
],
"responses": {
"200": {
"description": "Returns a swagger specification in json"
}
}
}
},
"/api/kernelspecs": {
"get": {
"security": [
Expand Down Expand Up @@ -192,6 +237,52 @@
}
}
},
"/kernels/{kernel_id}/interrupt": {
"parameters": [
{
"$ref": "#/parameters/kernel"
}
],
"post": {
"summary": "Interrupt a kernel",
"tags": [
"kernels"
],
"responses": {
"204": {
"description": "Kernel interrupted"
}
}
}
},
"/kernels/{kernel_id}/restart": {
"parameters": [
{
"$ref": "#/parameters/kernel"
}
],
"post": {
"summary": "Restart a kernel",
"tags": [
"kernels"
],
"responses": {
"200": {
"description": "Kernel interrupted",
"headers": {
"Location": {
"description": "URL for kernel commands",
"type": "string",
"format": "url"
}
},
"schema": {
"$ref": "#/definitions/Kernel"
}
}
}
}
},
"/api/sessions": {
"get": {
"summary": "List available sessions",
Expand Down Expand Up @@ -559,6 +650,15 @@
"$ref": "#/definitions/Kernel"
}
}
},
"ApiInfo": {
"description": "Information about the api",
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
}
}
}
63 changes: 62 additions & 1 deletion kernel_gateway/services/api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,34 @@ securityDefinitions:
form of `token {value}` where `{value}` is the value of the token.

paths:
/api:
get:
summary: Get API info
tags:
- api
responses:
200:
description: Returns information about the API
schema:
$ref: '#/definitions/ApiInfo'
/api/swagger.yaml:
get:
produces:
- text/x-yaml
summary: Get API info
tags:
- api
responses:
200:
description: Returns a swagger specification in yaml
/api/swagger.json:
get:
summary: Get API info
tags:
- api
responses:
200:
description: Returns a swagger specification in json
/api/kernelspecs:
get:
security:
Expand Down Expand Up @@ -132,6 +160,33 @@ paths:
responses:
200:
description: The connection will be upgraded to a websocket.
/kernels/{kernel_id}/interrupt:
parameters:
- $ref: '#/parameters/kernel'
post:
summary: Interrupt a kernel
tags:
- kernels
responses:
204:
description: Kernel interrupted
/kernels/{kernel_id}/restart:
parameters:
- $ref: '#/parameters/kernel'
post:
summary: Restart a kernel
tags:
- kernels
responses:
200:
description: Kernel interrupted
headers:
Location:
description: URL for kernel commands
type: string
format: url
schema:
$ref: '#/definitions/Kernel'
/api/sessions:
get:
summary: List available sessions
Expand Down Expand Up @@ -393,4 +448,10 @@ definitions:
type: string
description: path to notebook
kernel:
$ref: '#/definitions/Kernel'
$ref: '#/definitions/Kernel'
ApiInfo:
description: Information about the api
type: object
properties:
version:
type: string

0 comments on commit 7a794a6

Please sign in to comment.