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

Improve type-safety for request- and response-specific types #53

Closed
cmbrandenburg opened this issue Feb 8, 2016 · 1 comment
Closed

Comments

@cmbrandenburg
Copy link
Member

CouchDB uses different types in requests and responses for representing the same entity. For example, an embedded attachment contains different fields as a request originating from the client (e.g., the follows field) than as a response originating from the server (e.g.., the digest field). Currently, our crate's API uses strong types for responses and a quasi builder pattern when constructing requests.

It may be better to use strong types for both requests and responses.

This issue tracks the design and implementation of strong types for request- and response-specific types.

Here is a list of types for consideration:

  • Documents, retrieved via GET /db/doc and updated via PUT /db/doc.
  • Embedded attachments, retrieved via GET /db/doc and updated via PUT /db/doc.
  • Standalone attachments, retrieved via GET /db/doc/attachment and updated via PUT /db/doc/attachment.
@cmbrandenburg cmbrandenburg added this to the v0.6.0 milestone Feb 8, 2016
@cmbrandenburg cmbrandenburg changed the title New support for request- and response-specific types Improve type-safety for request- and response-specific types Feb 12, 2016
@cmbrandenburg cmbrandenburg modified the milestone: v0.6.0 Jul 7, 2017
@cmbrandenburg
Copy link
Member Author

Closed as out-of-scope for this crate's new purpose, as of v0.6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant