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

json based spec for implementors to use #114

Closed
wants to merge 1 commit into from

Conversation

spastorino
Copy link
Contributor

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:

  1. fixtures.json

Defines the data that servers must load to test reading and updating.

  1. read.json

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.

  1. write.json

Similar to read.json

Let me know your thoughts.

❤️ ❤️ ❤️

@brixen
Copy link
Contributor

brixen commented May 31, 2013

My opinion would be to put this into a separate repository (eg json-api/json-spec).

@steveklabnik
Copy link
Contributor

That's the idea, after it's working.

On Thu, May 30, 2013 at 8:59 PM, Brian Shirai notifications@github.com
wrote:

My opinion would be to put this into a separate repository (eg json-api/json-spec).

Reply to this email directly or view it on GitHub:
#114 (comment)

@spastorino
Copy link
Contributor Author

@brixen yes I agree. Let's discuss this first here.

Three files are provided:

1) fixtures.json

Defines the data that servers must load to test reading and updating.

2) read.json

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.

3) write.json

Similar to read.json
@steveklabnik
Copy link
Contributor

This is really old, and @spastorino, i'm not sure you're interested in updating it, given our recent discussions. Let's just give this a close for now.

I'm not sure this problem has been figured out adequately yet.

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.

None yet

3 participants