Hey folks :wave: is there any way using the Pactfl...
# pactflow
j
Hey folks 👋 is there any way using the Pactflow API to get the OpenAPI spec for a provider? I can’t see anything in the docs so just wondering if I’ve missed it somewhere
blobwave 1
y
I don’t believe it’s exposed via the public API, however you can leverage some internal api routes, with a note that they are subject to change, and that you know certain values ahead of time
Copy code
curl -H "Authorization: Bearer $PACT_BROKER_TOKEN" https://$PACT_BROKER_URL/contracts/bi-directional/provider/$PROVIDER/version/$PROVIDER_VERSION/consumer/$CONSUMER/version/$CONSUMER_VERSION/provider-contract
OAS is found at
_embedded["providerContract"]["content"]
j
Oh cool that seems to work for me - thanks Yousaf! Is there any plan to make it accessible by the public API?
y
It might be on the backlog, I’d have to check, but I would register interest in the tracking ticket for our Developer API, as getting user feedback is useful for driving feature prio. I think it would be a really valuable addition, there may be additional wants (ask for a prov contract from a version / branch, rather than having to provide an associated consumer version) - that a user might want, so if there is anything on your wish list, feel free to jot it down https://github.com/pactflow/roadmap/issues/94
🙌 1
j
Perfect thanks Yousaf, I’ll add something to that issue 😄