Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support JSON:API #97

Open
ThomasKoppensteiner opened this issue Apr 11, 2023 · 5 comments
Open

Support JSON:API #97

ThomasKoppensteiner opened this issue Apr 11, 2023 · 5 comments
Labels
bi-directional BDCT improvements

Comments

@ThomasKoppensteiner
Copy link

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
Copy link
Author

ThomasKoppensteiner commented Apr 11, 2023

I also created this feature request.

@mefellows mefellows added the bi-directional BDCT improvements label Apr 18, 2023
@mefellows
Copy link
Contributor

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
Copy link
Author

Related issue: pactflow/swagger-mock-validator#12

@YOU54F
Copy link
Member

YOU54F commented Apr 18, 2023

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bi-directional BDCT improvements
Projects
None yet
Development

No branches or pull requests

3 participants