The marjory.yml file contains information about your credentials, actions and events.
While being used for technical implementation into Marjory's workflow system, we also use the data given to us in this file to auto-generate documentation.
Properties
metadata
The version relates to the marjory.yml file version. We use it to determine how to read your file. For now, we are using version 1. You also need to specify the path to your logo.
marjory.yml
version:"1"# The version of Marjory.ymllogo:logo.png# You need to update the path if you rename or move the file
credentials
The credentials needed to make your module works with Marjory. If you set isCrypt to true, it means that we will store that data hashed.
marjory.yml
credentials:apiKey:# Name of the credentialtype:string# Type of the credentialisCrypt:true# Not mandatory, default to falsedescription:Whatever# Not mandatory, default to empty
actions
All the actions metadata, with inputs and outputs given to the user.
marjory.yml
actions:getPancake:# Function namename:Get pancake# Display name for interfacedescription:Order a pancake# Used for documentation# Input parametersinputs:topping:# Name of the parametertype:string# Type of the parameterrequired:true# Not mandatory, default to falsedescription:Whatever# Used for documentationexample:HONEY# Used for documentation# Outputsoutputs:200:# Return code with a content (Object or String)topping:BUTTERpancake:🥞401:"You are not authorized 👎🏻"404:"Pancake not found 🕵🏻♂️"500:"We... are... down.... 🤖"
webservices
All the web-services metadata, with inputs and outputs given to the user.
marjory.yml
webservices:getPancake:# Function namename:Get pancake# Display name for interfacedescription:Order a pancake# Used for documentation# Input parametersinputs:topping:# Name of the parametertype:string# Type of the parameterrequired:true# Not mandatory, default to falsedescription:Whatever# Used for documentationexample:HONEY# Used for documentation# Outputsoutputs:200:# Return code with a content (Object or String)topping:BUTTERpancake:🥞401:"You are not authorized 👎🏻"404:"Pancake not found 🕵🏻♂️"500:"We... are... down.... 🤖"
customEvents
All the custom events metadata, with events given to the user.
customEvents:checkShippingStatus:# Function namename:Check shipping status# Display namedescription:Check if an order is shipped# Description of you functionperiod:1# Interval of executions in minutesoutputs:# List of events with payloadorder_shipped:# Event nameid:# Payload variabletype:integer# Type of the variabledescription:The ID of the order# Description of the variableexample:'1'# Example of the variable
events
All the events metadata, with payload and an example given to the user.
marjory.yml
events:pancakeOrdered:# Event namename:Pancake ordered# Display namedescription:Triggered on pancake order# Used for documentation# Payload of the eventpayload:orderId:# Name of the variabletype:string# Type of the variabledescription:Pancake order identity# Not mandatory, default to emptyexample:xxx-yyy-zzz# Used for documentationstatus:# Name of the variabletype:string# Type of the variableenum: [SERVED,COOKING,ERROR] # Possible values of the variabledescription:Pancake order status# Not mandatory, default to emptyexample:SERVED# Used for documentation