Skip to content

Message placeholders not working in governance ruleset results. #4017

@Oshanath

Description

@Oshanath

Description

According to https://docs.stoplight.io/docs/spectral/d3482ff0ccae9-rules#rules-properties, the message can receive placeholders such as {{description}} and {{error}}, and they should be resolved before being displayed. Currently this is not working as expected.

Steps to Reproduce

  1. Start APIM
  2. Go to the admin portal, edit the default policy, add a blocking criteria when deploying.
  3. Edit WSO2 API Management Guidelines ruleset's api-no-insecure-transports rule to the following.
api-no-insecure-transports:
    description: "API should not have insecure transports."
    message: "{{description}}"
    severity: "warn"
    given: "$.data.transport.*"
    then:
      function: "pattern"
      functionOptions:
        notMatch: "http$"
  1. Save the policy
  2. Go to the publisher portal, deploy the sample PizzaShack API.
  3. You'll get some ruleset violation errors
  4. For the api-no-insecure-transports rule, the message will display {{description}} not the actual description.

Version

4.5.0

Environment Details (with versions)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions