Hey there :wave: I’m having some issues with a bi-...
# pactflow
j
Hey there 👋 I’m having some issues with a bi-directional contract The OpenAPI Spec that’s uploaded is using OAS 3.0.1 and has components that specify
"exclusiveMaximum": false
(apparently booleans are allowed in 3.0 but it expects a number in 3.1) Pactflow is failing the verification with a lot of errors like this:
Copy code
schema is invalid: data/definitions/ABC/properties/DEF/exclusiveMaximum must be number
As far as I can tell this should be valid, but is anyone aware of something I’m missing?
m
This is an issue we recently discovered. We will be addressing it in the coming iteration (starting today). It’s to do with a compatibility difference between OAS and JSON schema. OAS defines it as a boolean, JSON schema needs it to be a number - so we need to transform it. I think it could be mitigated in the meantime in two ways 1. Dereference all schemas prior to uploading (my understanding is that the bug is in referenced components of the schema) 2. Remove that constraint prior to uploading to PactFlow temporarily
j
Ok cool thanks for the update Matt 😄 hopefully it gets sorted soon 🤞
👍 1
Hey @Matt (pactflow.io / pact-js / pact-go) 👋 we’ve got a workaround (removing that property from the OAS file before publishing it) but just to check has there been any update on resolving this issue?
👍 1
m
Oh, sorry for not coming back to this thread. I believe it should be fixed in PactFlow now (see also https://github.com/pactflow/swagger-mock-validator/pull/37)
j
Awesome thanks Matt 😄 appreciate the response, I’ll take a look at removing our workaround and seeing if it still behaves Cheers!
thankyou 1