marjory.yml

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.yml
logo: 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 credential
    type: string                  # Type of the credential
    isCrypt: true                 # Not mandatory, default to false
    description: Whatever         # Not mandatory, default to empty

actions

All the actions metadata, with inputs and outputs given to the user.

marjory.yml
actions:
  getPancake:                           # Function name
    name: Get pancake                   # Display name for interface
    description: Order a pancake        # Used for documentation

    # Input parameters
    inputs:
      topping:                          # Name of the parameter
        type: string                    # Type of the parameter
        required: true                  # Not mandatory, default to false
        description: Whatever           # Used for documentation
        example: HONEY                  # Used for documentation

    # Outputs
    outputs:
      200:                              # Return code with a content (Object or String)
        topping: BUTTER
        pancake: 🥞
      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 name
    name: Get pancake                   # Display name for interface
    description: Order a pancake        # Used for documentation

    # Input parameters
    inputs:
      topping:                          # Name of the parameter
        type: string                    # Type of the parameter
        required: true                  # Not mandatory, default to false
        description: Whatever           # Used for documentation
        example: HONEY                  # Used for documentation

    # Outputs
    outputs:
      200:                              # Return code with a content (Object or String)
        topping: BUTTER
        pancake: 🥞
      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 name
    name: Check shipping status                  # Display name
    description: Check if an order is shipped    # Description of you function
    period: 1                                    # Interval of executions in minutes
    outputs:                                     # List of events with payload
      order_shipped:                              # Event name
        id:                                        # Payload variable
          type: integer                            # Type of the variable
          description: The ID of the order         # Description of the variable
          example: '1'                             # Example of the variable

events

All the events metadata, with payload and an example given to the user.

marjory.yml
events:
  pancakeOrdered:                               # Event name
    name: Pancake ordered                       # Display name
    description: Triggered on pancake order     # Used for documentation

    # Payload of the event
    payload:
      orderId:                                  # Name of the variable
        type: string                            # Type of the variable
        description: Pancake order identity     # Not mandatory, default to empty
        example: xxx-yyy-zzz                    # Used for documentation
      status:                                   # Name of the variable
        type: string                            # Type of the variable
        enum: [SERVED, COOKING, ERROR]          # Possible values of the variable
        description: Pancake order status       # Not mandatory, default to empty
        example: SERVED                         # Used for documentation

Last updated