Functions

Validate a custom function

Verifies that the custom function compiles without errors.

post/commons/validations/functions

Request

  • Base URL: https://example.com/businessRules
  • URL: https://example.com/businessRules/commons/validations/functions
  • Auth: none declared

Request body

descriptionstring

A description of the function.

codestring required

The DS2 function implementation, starting with the method my_func(); statement.

testCustomContextUristring

The URI of a Custom Context DS2 code file that provides a custom context to this function. Normally, this function's custom context is provided by the decision that utimately utilizes it. For syntax validation purpose, you can specify a testing-only custom context.

Example request

{
  "code": "method custom_add(integer bar, double baz, in_out double foo);\n  foo = bar + baz;\nend;",
  "description": "Sums two numbers."
}

Response

The validations for the custom function were created.

namestring

The name of the collection.

startinteger

The zero-based index of the first item in the collection.

limitinteger

The number of items that were requested for the collection.

countinteger

If populated indicates the number of items in the collection.

acceptstring

A space-delimited list of media types from which an Accept header may be constructed.

versioninteger

The version number of the collection representation. This representation is version 2.

Changes

No recorded changes to this operation across all 1 revision of this API.