I have an openRPC file which I converted to (almos...
# pactflow
j
I have an openRPC file which I converted to (almost) an openAPI file with something like this, in order to do bdct. Pact still doesn't like the file though, I tried to clean it up more by removing rpc error codes and fixing the paths but there are still some issues. What is generally the best way to deal with this? Are there any PactFlow tools to handle openRPC?
y
the snippet in that post isn’t a valid openapi file. how are you going to capture the consumer contracts? you can leverage the pact plugin framework, one of our users has done so with an internal tool for testing jsonrpc, you can read about it here https://docs.pact.io/users/community_corner/adam_cox_interview_may2023 the tool isn’t open sourced so you may want to consider creating your own https://docs.pact.io/plugins/quick_start
j
The consumer contracts are being generated by Pact already based on some Jest tests, it's mostly the Provider I'm worried about for now. Thank you for the linked resources, I'll start there!
y
Pact still doesn’t like the file though
Is this at uploading / viewing / comparing between your pact? If you could share your OAS & pact file, either here or privately if you’d prefer, I can have a quick look for validity of the OAS and a comparison between the consumer contract
j
During comparison 🙂 Please give me a second to prepare a version I can share🙏
y
no rush, fyi the underlying tool we use for comparisons is here https://github.com/pactflow/swagger-mock-validator which can help shorten your feedback loop and potentially hack at the code until you get something that works 🙂 and I also tend to throw oas files into editor.swagger.io for a quick sanity check
☝️ 1
🎯 1