Skip to content

Conversation

@mfn
Copy link
Contributor

@mfn mfn commented Oct 3, 2015

Fixes #25


Continuing #25 (comment) , here an implementation how I envisioned it.

  • adds a new trait with a new assertion
  • apply the assertion where appropriate

Now, before continuing here, a few things:

  • the branch fails because the error responses are currently not according to the spec
  • the response tests also use structures violating the standard, they would need to be changed

Do you like this direction?

I'm willing to take care and enhance this PR once the other PRs are OK for you too. It gets a bit messy due all the inter-dependant changes :-)

@egeriis
Copy link
Owner

egeriis commented Oct 7, 2015

This is really awesome. It would be cool if this could be expanded beyond the error response. Do you have any ideas for that?

@mfn
Copy link
Contributor Author

mfn commented Oct 7, 2015

This is really awesome. It would be cool if this could be expanded beyond the error response. Do you have any ideas for that?

The idea would be to rewrite some of the tests in the first place to be jsonapi schema 1.0 compliant. I don't necessary plan to do it, however I think the PR itself is already a benefit to the tests on its own.

egeriis added a commit that referenced this pull request Oct 7, 2015
tests: add jsonapi schema validation where appropriate
@egeriis egeriis merged commit e139408 into egeriis:master Oct 7, 2015
@egeriis
Copy link
Owner

egeriis commented Oct 7, 2015

Great. Just wanted to hear if you planned on adding to the PR. Thank you for all the contributions, that's deeply appreciated.

@egeriis
Copy link
Owner

egeriis commented Oct 7, 2015

Since you've been so deep into the lib already, I'd be thrilled to hear your thoughts regarding #32

@mfn mfn deleted the validate-schema branch October 7, 2015 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants