options

On this page

Description:

This key defines configuration options for argument parser configurations.

The value is an object that can contain model and format properties. These options control how a single argument value is parsed and validated.

Appears in:
└── Snippet
    └── params
        └── *
            └── Argument Parser Configuration
                └── options
Type:
Object Required
Properties:
modelObject#

This key defines the parsing configuration for this argument.

Appears in: options.models, Argument Parser Configuration options, options.models, Snippet Definition Value, Parser Model Array.

Examples:

In this example, we have configured argument parser options with a model and format.

Copied to clipboard
_snippets:
  example:
    snippet: <<example [[param]]>>
    params:
      param:
        parser: argument
        options:
          model:
            editor_key: example_id
          format:
            string_boundary:
              - '"'
{
  "_snippets": {
    "example": {
      "snippet": "<<example [[param]]>>",
      "params": {
        "param": {
          "parser": "argument",
          "options": {
            "model": {
              "editor_key": "example_id"
            },
            "format": {
              "string_boundary": [
                "\""
              ]
            }
          }
        }
      }
    }
  }
}
Open in a new tab