-
Notifications
You must be signed in to change notification settings - Fork 16
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
Added Request & Response to API Spec #177
Conversation
Moved from the HTTP network spec so we can reference in the API spec, needed to lock down the responses resolves #175
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.. I am missing a option that defines if updates/writes in many commands are executed sequentially or not (ordered option or something like this).
docs/jsonapi-spec.textile
Outdated
h4(#commandFindResponse). find Command Response | ||
|
||
|_. Response Element |_. Description | | ||
| @data@ | Present with fields : @data@, @count@ and @nextPageState@ which will be @null@ if no further data is available. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- first should second
@data@
be@docs@
here? - second,
nextPageState
will be null if there are no more documents, but count and docs should never be null.. These should be empty array and zero in case nothing is found?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch on the data, and bad writing from my. Intention was only to say @nextPageState@ is null . Fixing.
docs/jsonapi-spec.textile
Outdated
h4(#commandFindOneAndUpdateResponse). findOneAndUpdate Command Response | ||
|
||
|_. Response Element |_. Description | | ||
| @data@ | Present with fields : @data@ only | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again @docs@
? what doc is returned before modification or after, unclear? Can this be controlled with an option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed docs, the projection is controlled by the @returnDocument@ in the options, will mention that
h4(#commandFindOneResponse). findOne Command Response | ||
|
||
|_. Response Element |_. Description | | ||
| @data@ | Present with fields : @docs@ only | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so find one has no count? Is it ok that find commands have different responses?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We decided to only include fields when there is useful information, so dropped count. Honestly not sure we need count anywhere, it is only the size of the docs
array.
|
||
|_. Response Element |_. Description | | ||
| @data@ | Not present. | | ||
| @status@ |Present with fields: @matchedCount@ count of documents that matched the @filter@, @modifiedCount@ count of document updated (may be less than match count), @upsertedId@ if a document was upserted (when @matchCount@ is zero) not present otherwise.| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understood idea is to insert a single doc with upsert in case match count is zero? Seems fine 👍
resolves #175
should be done today (monday my time) |
Moved from the HTTP network spec so we can reference in the API spec, needed to lock down the responses
resolves #175
What this PR does:
Moved from the HTTP network spec so we can reference in the API spec, needed to lock down the responses
Which issue(s) this PR fixes:
Fixes #175
Checklist