-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Document OCA, OCP Javascript classes #894
Comments
cc @skjnldsv and @juliushaertl |
Not sure about this. Are these official APIs? How long do they have to stay stable (untouched)? Why are there no We have to discuss this. As a few of you know, I've been working on a little library with the goal of providing a stable interface to the Nextcloud (server) API: https://github.com/ChristophWurst/nextcloud-server. I'm not yet sure if it's the right way to go but feel free to experiment with it and let me/us know what you think. Edit: you can browse the package API here: http://blog.wuc.me/nextcloud-server/ (just an experiment, URL might change at any time) |
I found the jsdoc build script in the server has been broken for quite some time, so with nextcloud/server#11988 it will at least build properly again. But unfortunately the javascript code annotations are really in a bad state. Here is the current jsdoc build result: https://download.bitgrid.net/nextcloud/jsdocs/index.html
I'd approach that the same way we do it with out PHP API.
Especially for building apps and maybe mocking calls in tests this makes a lot of sense. But I think we need a proper stable API in the server besides that, since your approach is just a wrapper. Maybe we should try to move to a properly annotated javascript API with the OCP/OCA namespaces? |
👍 one reason to write a wrapper was to have the ability to re-export APIs in a typed (TypeScript), structured (proper modules), independent (can be used on CI without the server code, works with existing js analyzers) and modern API design (promises for all aync stuff) without having to change/break the existing functions. Wouldn't hurt to also get the underlying APIs in better shape, of course. |
So, what's our roadmap for this? I think https://download.bitgrid.net/nextcloud/jsdocs/index.html this one is already quite useful. |
We either can build it and add it to docs.nextcloud.com or look for some automated builds, maybe just use readthedocs for publishing? |
We can also automatically build on our systems and publish to docs.nextcloud.com ;) |
In the documentation there is no mention of Javascript classes that the developers can use, such as OCA, OCP (and there's likely more that I don't know of).
For example, I didn't know there is
OCP.AppConfig
utility to help with saving settings until reading the javascript code from a official plugin https://github.com/nextcloud/limit_login_to_ip/blob/master/js/settings.jsI know it's hard to be complete, but at least there should be a pointer to let developers know that there are these js classes available and they can look into the source code.
The text was updated successfully, but these errors were encountered: