-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 PHP API documentation to developer manual #578
Conversation
Looks promising 😎
|
@nickvergessen Good points. The linking issue might need some fixes in sphinxcontrib-phpdomain. I'll have a look.
|
I like it a lot!!! |
I've added styles so that deprecated methods are crossed out. The correct way according to the phpDoc reference is to add a @see tag. That one will be linked automatically. http://docs.phpdoc.org/references/phpdoc/tags/deprecated.html
Fixed as well.
The branch can now be specified in build/generateApiDoc.php The preview URL has been updated as well. |
So, where we at here? :) |
@nickvergessen can you have a look again? |
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
.drone.yml
Outdated
@@ -2,4 +2,5 @@ pipeline: | |||
documentation: | |||
image: nextcloudci/documentation:documentation-4 | |||
commands: | |||
- make api-docs |
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.
Best would be to include "api-docs" in "all", because we also use that on our docs system deployment. 😉 Let me have a look into this.
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.
Or even better: Include it in "make dev-html" ;) Then it's just at the right spot.
@juliushaertl Any idea regarding this:
|
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
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 👍
@juliushaertl Please have a look at my commit.
Should we keep that task as an on-demand step or better check the computed stuff in? (like we do for the config sample as well - see https://github.com/nextcloud/documentation/commits/master/admin_manual/configuration_server/config_sample_php_parameters.rst) |
@MorrisJobke The commit looks good.
I see no real benefit in committing the computed files. It may lead to some confusion when people start to fix something right in the rst files, which get's overwritten later by the automated documentation generation.
I'll have a look. juliushaertl/phpdoc-to-rst#13 |
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This is the first step for #509 to add a API reference to the developer manual.
For the purpose i've written a small tool called phpdoc-to-rst that will generate sphinxcontrib-phpdomain based rst files out phpDoc annotated source code.
Here is a preview of the current state:
https://bitgrid.net/~jus/nextcloud-api/com/api.html
New features:
The current state is that both lib/public/ and lib/private/ are scanned, so we can have nice linking to classes that implement interfaces from the \OCP namespace.
I welcome any feedback, especially in terms of readability.
Todo: