Hello, I encountered the following error. The pro...
# pactflow
t
Hello, I encountered the following error. The producer specifies an API path similar to
GET /users/{user_id}/settings
{user_id}
is defined as
string
with a regex to validate the format in detail (int, uuid or other formats). The consumer calls the API with
GET /users/1234/settings
and the pact check fails with
"No request method is found /users/1234/settings" => "Path or method not defined in spec file: GET /users/1234/settings"
. When I remove the regex check from the producer OAS file, then the pact check works.
m
Can you please share your OAS? Does it pass basic validation? (E.g. from the SwaggerHub editor)
t
The OAS is closed source, but both Stoplight and openapi_rspec didn't noticed an validation error.
Also pactflow can render the producer OAS file.
Hmm "Stoplight Studio" (desktop versions) doesn't report errors, "Stoplight" (online) reports an error. I'll double check that.
It might be related to the usage of
Copy code
\A 	Start of string
\z 	End of string
instead of
Copy code
^ 	Start of line
$ 	End of line
Build is running.
The usage of
^
and
$
fixed it.
👍 1