Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey @enriikke! Almost there, just a few more additions I want to squeeze in.
I do have one issue I'm hoping you can help with though. It seems that my JSON responses are not conforming to my schema, yet I can't get Committee to complain.
ActiveModel::Serializer
is setup to use theJsonApi
adapter which seems to be doing it's job. My actual responses look nice:My schema, however, wasn't built with this nesting in mind and the same response looks like this (as defined in the schema):
I'm using the test helper
assert_schema_conform
and the middleware options Committee provides. No one seems to want to complain about the difference between the actual response and the schema definitions. I can even add/remove attributes in the schema and everything still passes.Thoughts? It seems that, although the tests all pass, it may not be validating appropriately. Or perhaps I'm misunderstanding what is actually being validated, there are a couple examples but not a ton of documentation on the actual checks.