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

Spurious errors when using application/merge-patch+json media type #197

Closed
meem opened this issue Sep 22, 2020 · 1 comment · Fixed by #198
Closed

Spurious errors when using application/merge-patch+json media type #197

meem opened this issue Sep 22, 2020 · 1 comment · Fixed by #198
Labels

Comments

@meem
Copy link
Contributor

meem commented Sep 22, 2020

Our PATCH methods use JSON merge patch semantics -- i.e., application/merge-patch+json rather than application/json. However, attempting to use that type results in the following error from the validator:

  Message :   Operations with non-form request bodies should set a name with the x-codegen-request-body-name annotation.
  Path    :   paths./dedicated_host/groups/{id}.patch
  Line    :   385

This appears to be due to src/plugins/validation/oas3/semantic-validators/operations.js having too narrow an understanding of JSON format. Per https://tools.ietf.org/html/rfc6838#section-4.2.8 any media type ending in +json needs to be regarded as being in JSON format.

@meem meem changed the title Spurious errors when using appication/merge-patch+json media type Spurious errors when using application/merge-patch+json media type Sep 22, 2020
@dpopp07
Copy link
Member

dpopp07 commented Sep 22, 2020

🎉 This issue has been resolved in version 0.29.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants