Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add module list API definition to workload OpenAPI spec #523

Merged
merged 3 commits into from
Nov 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions edgelet/api/workload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,27 @@ tags:
description: |

paths:
/modules:
get:
tags:
- Module
summary: List modules.
produces:
- application/json
description: |
This returns the list of currently running modules and their statuses.
operationId: ListModules
parameters:
- $ref: '#/parameters/api-version'
responses:
'200':
description: Ok
schema:
$ref: '#/definitions/ModuleList'
default:
description: Error
schema:
$ref: '#/definitions/ErrorResponse'
'/modules/{name}/genid/{genid}/sign':
post:
tags:
Expand Down Expand Up @@ -209,6 +230,108 @@ paths:
$ref: '#/definitions/ErrorResponse'

definitions:
ModuleList:
type: object
properties:
modules:
type: array
items:
$ref: '#/definitions/ModuleDetails'
required:
- modules
ModuleDetails:
type: object
properties:
id:
type: string
description: System generated unique identitier.
example: happy_hawking
name:
type: string
description: The name of the module.
example: edgeHub
type:
type: string
description: The type of a module.
example: docker
config:
$ref: '#/definitions/Config'
status:
$ref: '#/definitions/Status'
required:
- id
- name
- type
- config
- status
Config:
type: object
properties:
settings:
type: object
example:
image: 'microsoft/azureiotedge-hub:1.0'
createOptions:
HostConfig:
PortBindings:
'22/tcp':
- HostPort: '11022'
env:
type: array
items:
$ref: '#/definitions/EnvVar'
required:
- settings
Status:
type: object
properties:
startTime:
type: string
format: date-time
exitStatus:
$ref: '#/definitions/ExitStatus'
runtimeStatus:
$ref: '#/definitions/RuntimeStatus'
required:
- runtimeStatus
EnvVar:
type: object
properties:
key:
type: string
example: the_key
value:
type: string
example: the_value
required:
- key
- value
ExitStatus:
type: object
properties:
exitTime:
type: string
format: date-time
statusCode:
type: string
required:
- exitTime
- statusCode
example:
exitTime: '2018-04-03T09:31:00.000Z'
statusCode: '101'
RuntimeStatus:
type: object
properties:
status:
type: string
description:
type: string
required:
- status
example:
status: the status
description: the description
SignRequest:
type: object
properties:
Expand Down