Add validation support to hal+json content type

Issue #127 resolved
Fábio Maia created an issue

Hi,

I've been developing hateos compliant apis with spring boot and I'm trying to write validate these apis using swagger-request-validator. Currently, responses are only validated when content type header of the response matches exactly with application/json. On the http apis my teams is developing, spring sets the content type header as application/hal+json hence the validation won't happen and it's skipped.

As the hateos is a superset of json I believe the validation should run just fine in the case too.

I'll submit a pull request today. How long would it take to get approval and publishing of a new version with this change? This is very critical to my team and is a top priority so they're waiting for an estimate.

Comments (13)

  1. James Navin

    Hi Fabio - thanks for the contribution!

    I think if you push your changes to a branch other than master you should then be able to raise a PR from your branch to master of the parent repository.

    Once the PR is open I'll review the changes in more detail. I'll also need to confirm that you've signed the CLA (see the README for details).

    Thanks!

  2. Fábio Maia reporter

    I think I'd tried that originally but I was not able to push to the remote. Let me check again.

  3. Fábio Maia reporter

    yeah, so I get back 'remote: Unauthorized' when I try to push to a branch.

    This is what've been trying:

    git checkout -b 127-haljson-support git add . <= to add the code changes git commit -m "Issue 127: Added hal+json content type support" git push --set-upstream origin 127-haljson-support

    output of last command

    remote: Unauthorized fatal: Authentication failed for 'https://<my-user>@bitbucket.org/atlassian/swagger-request-validator.git/'

  4. James Navin

    Sorry - I meant push a branch in your fork, then create a PR from that branch back to the master branch of the original repo.

  5. Log in to comment