Skip to content

Parameters

Joseph Szobody edited this page Mar 28, 2016 · 5 revisions

Parameters define the input for your operation and how each input variable should be treated.

Specifying parameters in the operations config

The parameter config should use the parameters key in the operations array. It should then be a keyed array where the key specifies the name of the parameter.

Example of a doSomething operation with a firstName parameter:

// Master description array
[
    ...
    'operations' => [
        'doSomething' => [
           'firstName' => [
               ...
           ]
        ]
    ]
]

Top level attributes

Name Value Required Description
location string yes The location on the HTTP request where this parameter should be used. Can be body, json, uri, or query.
validate string no Validation rules specified Laravel style
default mixed no Default value to use is no value is specified.
sentAs string no Use a different parameter name when sending this input in the HTTP request. For example you may have a firstName parameter for your operation sent as first_name to the remote service.