mirror of
https://github.com/openfaas/faas.git
synced 2025-06-21 00:06:38 +00:00
Added optional body to function calls
The optional body parameter to be passed to STDIN wasn't part of the previous swagger spec. Signed-off-by: Lewis Cowles <lewiscowles@me.com>
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
swagger: '2.0'
|
swagger: '2.0'
|
||||||
info:
|
info:
|
||||||
description: FaaS API documentation
|
description: FaaS API documentation
|
||||||
version: 0.6.1
|
version: 0.6.5
|
||||||
title: FaaS API Gateway
|
title: FaaS API Gateway
|
||||||
license:
|
license:
|
||||||
name: MIT
|
name: MIT
|
||||||
@ -145,38 +145,56 @@ paths:
|
|||||||
description: Alert handled successfully
|
description: Alert handled successfully
|
||||||
'500':
|
'500':
|
||||||
description: Internal error with swarm or request JSON invalid
|
description: Internal error with swarm or request JSON invalid
|
||||||
/async-function/{functionName}:
|
'/async-function/{functionName}':
|
||||||
post:
|
post:
|
||||||
summary: 'Invoke a function asynchronously in OpenFaaS'
|
summary: Invoke a function asynchronously in OpenFaaS
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: functionName
|
name: functionName
|
||||||
description: Function name
|
description: Function name
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
|
- in: body
|
||||||
|
name: input
|
||||||
|
description: (Optional) data to pass to function
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: binary
|
||||||
|
example:
|
||||||
|
'{"hello": "world"}'
|
||||||
|
required: false
|
||||||
responses:
|
responses:
|
||||||
'202':
|
'202':
|
||||||
description: Request accepted and queued
|
description: Request accepted and queued
|
||||||
'500':
|
|
||||||
description: Internal server or queue error
|
|
||||||
'404':
|
'404':
|
||||||
description: Requested function not found
|
description: Requested function not found
|
||||||
/function/{functionName}:
|
'500':
|
||||||
|
description: Internal server error
|
||||||
|
'/function/{functionName}':
|
||||||
post:
|
post:
|
||||||
summary: 'Invoke a function defined in OpenFaaS'
|
summary: Invoke a function defined in OpenFaaS
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: functionName
|
name: functionName
|
||||||
description: Function name
|
description: Function name
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
|
- in: body
|
||||||
|
name: input
|
||||||
|
description: (Optional) data to pass to function
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: binary
|
||||||
|
example:
|
||||||
|
'{"hello": "world"}'
|
||||||
|
required: false
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Value returned from function
|
description: Value returned from function
|
||||||
'500':
|
|
||||||
description: Error connecting to function
|
|
||||||
'404':
|
'404':
|
||||||
description: Function not found
|
description: Function not found
|
||||||
|
'500':
|
||||||
|
description: Error connecting to function
|
||||||
definitions:
|
definitions:
|
||||||
DeleteFunctionRequest:
|
DeleteFunctionRequest:
|
||||||
type: object
|
type: object
|
||||||
|
Reference in New Issue
Block a user