-
Notifications
You must be signed in to change notification settings - Fork 14
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
Where is the id '42' coming from? #4
Comments
@proppy is the blueprint guy, but I believe 42 is simply a placeholder for a value type. In other words, an id is an integer. |
Yes, the spec doesn't enforce IDs it's just use them as placeholder and double-check that the payload types and structures (schema) match. See https://github.com/apiaryio/api-blueprint/blob/master/API%20Blueprint%20Specification.md |
@proppy, the spec may not enforce it, but the tests are. The Todo tests do a GET for
Whereas I know that doing the query for
|
@proppy, same issue with PUT and DELETE for Todos. |
@webmaven make sure you run the hooks with |
Also see #3 |
@proppy, this is how I have been running the tests: but it looks like I was missing an npm module. So now the GET passes, but PUT and DELETE still don't. Here is an entire run:
|
Which npm install? Was the dep missing in package.json? Can you run again with |
The package I was missing was 'async'. Since I installed dredd manually, I didn't get all the requirements for the hooks file. Here is the run with
|
OK, after this I got the Todo DELETEs working by forcing the returned content-type to text/plain. PUTs still not passing, though. |
Turns out the test couldn't pass. I extended the hooks.js file (PR #8 ) and now all is (finally) well:
|
Just a note for @proppy -- we were getting a false positive from our implementation because of our magic .save method, that inserts if an entity doesn't exist. |
Ah, you were using |
Include a hook for the PUT test so it passes too. Closes Issue #4
I don't understand how any implementation can be compliant if the first expected ID the system generates must be 42.
The text was updated successfully, but these errors were encountered: