mirror of
https://github.com/openfaas/faas.git
synced 2025-06-16 21:06:54 +00:00
Adjusted Swagger.yaml accordingly to feedback
Signed-off-by: Simon Pelczer <templum.dev@gmail.com>
This commit is contained in:
parent
f674211ee8
commit
4963f39e87
@ -44,7 +44,7 @@ paths:
|
||||
'400':
|
||||
description: Bad Request
|
||||
'500':
|
||||
description: Internal server error
|
||||
description: Internal Server Error
|
||||
put:
|
||||
summary: Update a function.
|
||||
description: ''
|
||||
@ -67,7 +67,7 @@ paths:
|
||||
'404':
|
||||
description: Not Found
|
||||
'500':
|
||||
description: Internal server error
|
||||
description: Internal Server Error
|
||||
delete:
|
||||
summary: Remove a deployed function.
|
||||
description: ''
|
||||
@ -90,7 +90,7 @@ paths:
|
||||
'404':
|
||||
description: Not Found
|
||||
'500':
|
||||
description: Internal server error
|
||||
description: Internal Server Error
|
||||
'/system/alert':
|
||||
post:
|
||||
summary: 'Event-sink for AlertManager, for auto-scaling'
|
||||
@ -183,7 +183,7 @@ paths:
|
||||
'404':
|
||||
description: Not Found
|
||||
'500':
|
||||
description: Internal server error
|
||||
description: Internal Server Error
|
||||
'/function/{functionName}':
|
||||
post:
|
||||
summary: Invoke a function defined in OpenFaaS
|
||||
@ -253,7 +253,7 @@ paths:
|
||||
'404':
|
||||
description: Not Found
|
||||
'500':
|
||||
description: Internal server error
|
||||
description: Internal Server Error
|
||||
'/system/info':
|
||||
get:
|
||||
summary: Get info such as provider version number and provider orchestrator
|
||||
@ -262,15 +262,12 @@ paths:
|
||||
responses:
|
||||
'200':
|
||||
description: Info result
|
||||
examples:
|
||||
application/json: |-
|
||||
{"provider":"faas-swarm","version":{"sha":"7108418d9dd6b329ddff40e7393b3166f8160a88","release":"0.2.6"},"orchestration":"swarm"}
|
||||
schema:
|
||||
$ref: '#/definitions/Info'
|
||||
'404':
|
||||
description: Endpoint Info not supported
|
||||
description: Provider does not support info endpoint
|
||||
'500':
|
||||
description: Internal server error
|
||||
description: Internal Server Error
|
||||
'/healthz':
|
||||
get:
|
||||
summary: Healthcheck
|
||||
@ -279,22 +276,31 @@ paths:
|
||||
description: Healthy
|
||||
'500':
|
||||
description: Not healthy
|
||||
securityDefinitions:
|
||||
basicAuth:
|
||||
type: basic
|
||||
definitions:
|
||||
Info:
|
||||
type: object
|
||||
properties:
|
||||
provider:
|
||||
type: string
|
||||
description: The OpenFaaS Provider
|
||||
example: faas-swarm
|
||||
version:
|
||||
type: object
|
||||
description: Version of the OpenFaaS Provider
|
||||
properties:
|
||||
sha:
|
||||
type: string
|
||||
example: 7108418d9dd6b329ddff40e7393b3166f8160a88
|
||||
release:
|
||||
type: string
|
||||
format: semver
|
||||
example: 0.2.6
|
||||
orchestration:
|
||||
type: string
|
||||
example: swarm
|
||||
required:
|
||||
- provider
|
||||
- version
|
||||
@ -305,6 +311,7 @@ definitions:
|
||||
functionName:
|
||||
type: string
|
||||
description: Name of deployed function
|
||||
example: nodeinfo
|
||||
required:
|
||||
- functionName
|
||||
FunctionDefintion:
|
||||
@ -313,15 +320,19 @@ definitions:
|
||||
service:
|
||||
type: string
|
||||
description: Name of deployed function
|
||||
example: nodeinfo
|
||||
network:
|
||||
type: string
|
||||
description: 'Docker swarm network, usually func_functions'
|
||||
description: Docker swarm network, usually func_functions
|
||||
example: func_functions
|
||||
image:
|
||||
type: string
|
||||
description: Docker image in accessible registry
|
||||
example: functions/nodeinfo:latest
|
||||
envProcess:
|
||||
type: string
|
||||
description: Process for watchdog to fork
|
||||
example: node main.js
|
||||
envVars:
|
||||
type: object
|
||||
additionalProperties:
|
||||
@ -331,27 +342,30 @@ definitions:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Constraints are specific to back-end orchestration platform
|
||||
description: Constraints are specific to OpenFaaS Provider
|
||||
example: "node.platform.os == linux"
|
||||
labels:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
items:
|
||||
type: array
|
||||
description: An array of labels used by the back-end for making scheduling or routing decisions
|
||||
annotations:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: An array of annotations used by the back-end for management, orchestration, events and build tasks
|
||||
items:
|
||||
type: array
|
||||
secrets:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: An array of names of secrets that are required to be loaded from the Docker Swarm.
|
||||
description: An array of names of secrets that are required to be loaded from the Docker Swarm.
|
||||
example: "secret-name-1"
|
||||
registryAuth:
|
||||
type: string
|
||||
description: >-
|
||||
Private registry base64-encoded basic auth (as present in
|
||||
~/.docker/config.json)
|
||||
example: Basic dXNlcjpwYXNzd29yZA==
|
||||
limits:
|
||||
type: object
|
||||
properties:
|
||||
@ -363,6 +377,13 @@ definitions:
|
||||
example: "0.01"
|
||||
requests:
|
||||
type: object
|
||||
properties:
|
||||
memory:
|
||||
type: string
|
||||
example: "128M"
|
||||
cpu:
|
||||
type: string
|
||||
example: "0.01"
|
||||
required:
|
||||
- service
|
||||
- image
|
||||
@ -371,22 +392,36 @@ definitions:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
description: The name of the function
|
||||
type: string
|
||||
example: nodeinfo
|
||||
image:
|
||||
description: The fully qualified docker image name of the function
|
||||
type: string
|
||||
example: functions/nodeinfo:latest
|
||||
invocationCount:
|
||||
description: The amount of invocations for the specified function
|
||||
type: number
|
||||
format: integer
|
||||
example: 1337
|
||||
replicas:
|
||||
description: The current minimal ammount of replicas
|
||||
type: number
|
||||
format: integer
|
||||
example: 2
|
||||
availableReplicas:
|
||||
description: The current available amount of replicas
|
||||
type: number
|
||||
format: integer
|
||||
example: 2
|
||||
envProcess:
|
||||
description: Process for watchdog to fork
|
||||
type: string
|
||||
example: node main.js
|
||||
labels:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- image
|
||||
|
Loading…
x
Reference in New Issue
Block a user