-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add create document api endpoint #467
Conversation
aabd704
to
97abaad
Compare
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.
This endpoint breaks encapsulation by requiring external services to pass data in the highly specific Yjs format, which is tightly coupled to the Doc implementation. It impacts the usability of the endpoint.
Moreover, it should implement a robust validation to ensure the content value is well-formed and will not cause errors when opening the document.
Finally, allowing the conversion of Markdown strings into Yjs format, supporting broader use cases like importing or transforming existing documents, would be a really nice enhancement.
Some of these requirements depend on the ability to execute JavaScript code. This capability is expected to be available soon, once @AntoLC completes the upgrade to the collaboration service.
We agreed to merge my draft microservice into the collaboration one.
This endpoint may need to adapt its behavior based on the input format. Should we consider adding a parameter to explicitly specify the format?
This PR also introduces documents without any owner, which might need to be discussed.
I really need this endpoint ASAP. Should we merge it as proposed initially by @sampaccoud, and iterate with other PR?
df880a0
to
1efdabf
Compare
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.
All nitpicks. Move ahead!
1efdabf
to
b260e12
Compare
The email footer file is not being used and should be deleted.
b260e12
to
1d14395
Compare
We want trusted external applications to be able to create documents via the API on behalf of any user. The user may or may not pre-exist in our database and should be notified of the document creation by email.
1d14395
to
ee8e64c
Compare
Purpose
We want trusted external applications to be able to create documents via the API on behalf of any user.
Proposal
Add an action API endpoint limited to document creation and with a basic server-to-server authentication:
/api/v1.0/documents/create-for-user/
Expected payload:
The user may or may not pre-exist in our database and should be notified of the document creation by email.