If you have a comment on this topic, contact Aptify Documentation. If you want to return to the Aptify Community Site, please click here.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Value Comparer Requirement

This requirement compares two values.  If they are equal the requirement passes.  If they are different the requirement fails.

Value Comparer Requirement Metadata

Property NameValueDescription

expectedValue

stringThe value we expect to have to satisfy the requirement
actualValuestringThe value we check against the exepectedValue to see if the requirement passes.

The example metadata on this page uses Input Context Objects for some values.

Value Comparer Metadata Example
{
  "endpoints": {
    "ExamplesGetSingleProduct": {
      "route": {
        "httpMethod": "GET",
        "segments": {
          "examples": {
            "isLiteral": true,
            "type": "string"
          },
          "products": {
            "isLiteral": true,
            "type": "string"
          },
          "productId": {
            "isLiteral": false,
            "type": "long"
            "security": {
              "CurrentPersonIsAiesha": {
                "type": "ValueComparer",
                "parameters": {
                  "expectedValue": "1",
                  "actualValue": "@AuthenticatedAttributes.AuthenticatedPrincipalRecordId"
                }
              }
            }            
          }
        }
      }     
    }
    //remaining metadata omitted
  }
}
  • No labels