pactflow / roadmap

Public Pactflow issue tracker and roadmap
MIT License
15 stars 0 forks source link

Support JSON:API #97

Open ThomasKoppensteiner opened 1 year ago

ThomasKoppensteiner commented 1 year ago

Hello, we are using JSON:API (https://jsonapi.org/) for many of our APIs. JSON:API is a sub-type of JSON and uses application/vnd.api+json as MIME type.

I discovered, that additional undocumented parameters in response bodies are not detected as a violation of the contract, if application/vnd.api+json is used. If simply application/json is used as content type the violation is detected.

The additionalProperties option is set to false in the OAS file.

Can you please add full support for JSON:API (application/vnd.api+json) by handling it similar to plain application/json?

ThomasKoppensteiner commented 1 year ago

I also created this feature request.

mefellows commented 1 year ago

There is currently a bug in relation to this. It is scheduled for fixing in this quarter (Q2). I'll leave this open for now to track it.

ThomasKoppensteiner commented 1 year ago

Related issue: https://github.com/pactflow/swagger-mock-validator/issues/12

YOU54F commented 1 year ago

I also created this feature request.

Hi @ThomasKoppensteiner, thanks for raising this.

I might close the canny feature request, as this would be a feature request for PactFlow, rather than one for the open source project Pact. Hope that is okay, and we can use this tracker for the PactFlow roadmap, and the linked issue for any action to resolve 👍🏾

mefellows commented 1 year ago

https://github.com/pactflow/swagger-mock-validator/pull/25 and https://github.com/pactflow/swagger-mock-validator/pull/26 should now address this. We'll be integrating that into PactFlow shortly after.