hi folks, I got a few issues pop up with a couple ...
# pactflow
m
hi folks, I got a few issues pop up with a couple of our teams on pactflow validation. One was regarding a regex failure (where the regex is valid, and the yaml schema is validated), and one where a null value is not recognised as valid, where the value is compared against a nullable enum. Lemme know if anyone can help with these/either!
the error for regex
Copy code
{
  "error": {
    "message": "Invalid regular expression: /\\A\\d*\\.\\d{2}\\z/u: Invalid escape"
  }
}
the regex in swagger
Copy code
amount:
          type: string
          pattern: '\A\d*\.\d{2}\z'
          example: "3.14"
enum swagger:
Copy code
{
  "error_code": {
    "type": "string",
    "nullable": true,
    "enum": [
      "invalid_request",
      "max_stale_retries_reached",
      "fix_endpoint_is_not_connected",
      "provider_internal_server_error",
      "provider_bad_gateway"
    ]
  }
}
and error is that a
null
value is not accepted
Copy code
Response body is incompatible with the response body schema in the spec file: must be equal to one of the allowed values
interactions[0].response.body.error_code =
m
hmm mind sharing the OAS?
m
will do in a DM
thankyou 1