json based spec for implementors to use #114
Closed
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.
NOTE: THIS IS WORK IN PROGRESS.
I'm sending this mostly for you guys to review.
I'm implementing json-api in https://github.com/rails-api/active_model_serializers
Still not sure about many things but I guess it's better to start discussing from this point better than waiting to have a perfect thing.
The idea is to provide json files for implementors to load them, there you have the use cases and you can build tests from there.
Again these files lacks of a lot of use cases, but anyway provide all the feedback you can.
Three files are provided:
Defines the data that servers must load to test reading and updating.
Provides reading use cases.
Each use case is composed of config, expectedRequest and expectedResponse
config defines which fixture should be used, and other server settings
like if the server ask for client-ids, uses url based style and/or
compounds related objects.
Similar to read.json
Let me know your thoughts.