The return step allows to assign return values for the DSL query.
return_step:
return "result"
Mandatory fields:
return
- assigns the value as the final response of the processed DSL. Scripts can be used.
Optional fields:
status
- if defined, sets the status of the final response, as the assigned status.headers
- ..desired header values - assigns the headers to the response of the processed DSL. Scripts can be used.
wrapper
- specify if return value should be insideRuuterResponse
wrapper or sent as plain value. Default:true
Note - Assigning a return value does not end the processing of the DSL - additionally, an assigned return value/headers can be overwritten by another return step
return_value:
return: "result"
assign_step:
assign:
variable: "result"
return_value:
return: ${variable}
return_with_status:
return: "my_response"
status: 201
return_value:
headers:
Set-Cookie:
customCookieName: "customCookieValue"
Domain: "https://example.com"
Secure: false
HttpOnly: true
custom-header: "customValue"
return: "result"
return-headers-with-script.yml
assign_step:
assign:
setCookie:
customCookieName: "customCookieValue"
Domain: "https://example.com"
Secure: false
HttpOnly: true
customHeader: "customValue"
return_value:
headers:
Set-Cookie: ${setCookie}
custom-header: ${customHeader}
return: "result"
return_value:
wrapper: false
return: "result"