Bi-directional verification Hi folks, I am tryin...
# pactflow
j
Bi-directional verification Hi folks, I am trying to implement a bi-directional verification, but I am cracking my head with an error message regarding the path. Apparently the consumer contract and the Swagger spec are specify the same API method: POST /executeFlow/orderlookup/V1 But Pactflow says the paths are incompatible. Any thoughts? Note: The Swagger spec provided to me has a mismatch on the response body - this I know. I am confused about the error on the paths.
Consumer contract tab:
y
Hey João, can you provide your oas and pact file and we can take a look
j
Hi Yousaf, Unfortunately the complete files have some information I would prefer to keep private. I am sharing the top part of each file, where the paths are specified. Let me know if you would like to see some other part of the files.
y
Appreciate that you want to keep the files confidential, but it will be much slower, and difficult to help. I have very limited time today before I go away on holiday for xmas, If you don't wish to provide via here, feel free to raise an email to support@pactflow.io
what happens if you take the basePath out from your
oas
wonder if it appending the basepath to the the
paths
or should your path basePath and paths be duplicated with the same path part
j
Same error when trying to simply appending or joining them without duplication. I will get back to the team that built the Swagger for clarification, maybe they specified it wrongly (manually generated). Would you know if Pactflow looks at both basePath and path in the OAS or just the path, when comparing to the path in the consumer contract?
👍 2
y
I don't think it considers the basePath, but would have to test. I would check the validity of the OAS document via something like editor.swagger.io The underlying tooling is here if it makes it easier to reason about during your debugging https://github.com/pactflow/swagger-mock-validator
j
Awesome, I will take a look and see what the other team says as well. Thanks Yousaf.
m
Would you know if Pactflow looks at both basePath and path in the OAS or just the path, when comparing to the path in the consumer contract?
Pactflow doesn’t consider the base path (because each server may have a different base path). We have a backlog item to consider how we might support it though.