How should I record self-verification of OpenAPI s...
# pactflow
m
How should I record self-verification of OpenAPI specs generated from code? I am working on bi-directional contract testing using exisiting OpenAPI specs and pacts generated by new Pact tests. The OpenAPI specs have been generated from code (.NET) and are thus already self-verified. Is there a standard way to specify the verifier and verification results when I publish code-generated specs to PactFlow? I didn’t find anything in the docs but I may not have looked hard enough.
m
In that case, simply write to a file with something you feel would be helpful if it were viewed in the PactFlow verification results page e.g. this type of thing
Copy code
echo "Generated by Swashbuckle" > results.txt
pactflow publish-provider-contract .... --verification-results-content-type text/plain --verification-results result.txt
m
Thanks, Matt! That is the approach I took. I wondered if there was a perhaps less ‘clumsy’ way of signalling that a OAS is generated from code and thus self-verified.
m
Yeah, it’s a common use case. We erred on the side of “better to require it and force a discussion” than just letting people upload the contract and realise they hadn’t tested it and get a value sense of security.
👍 3