Skip to main content
Version: v2.0

Event Schema

An event schema defines the structured format or blueprint for representing data within an event. It outlines the specific fields, data types, and structure that an event must adhere to. The schema serves as a standardized template, ensuring consistency in the project

Request Schema

Sample spec for request schema.

http.get./greet: #The initial line depicts a fusion of the event, the employed method, and the path associated with the event.
fn: function_greet #The 'fn' key receives the function name located in 'src/functions' and forwards the accompanying parameters.
params: #It is also possible to define inputs such as 'params,' 'body,' 'headers,' and 'query parameters.'
- name: greet_message
in: query
required: true
body:
content:
application/json:
schema:
type: object
properties:
name:
type: string
  • Furthermore, you have an option to specify responses, including status codes and response body types, among other things.

Response Schema

Sample spec for response schema.

"http.get./helloworld":
fn: helloworld
body:
type: object
properties:
name:
type: string
responses:
500:
content:
application/json:
schema:
type: string
200:
content:
application/json:
schema:
type: object