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

Update documentation about Cachet API #2903

Closed
hugomcfonseca opened this issue Feb 5, 2018 · 22 comments
Closed

Update documentation about Cachet API #2903

hugomcfonseca opened this issue Feb 5, 2018 · 22 comments

Comments

@hugomcfonseca
Copy link

hugomcfonseca commented Feb 5, 2018

Hello.

I would like to know if it is possible to update Cachet documentation about its API (preferably, including already new routes added for Cachet v2.4). I am trying to improve existing Golang client to be compatible with your latest Cachet's version.

Thanks and congrats about your great job with this app.

@nalysius
Copy link
Contributor

Hello,

I'll take a look if laravel-apidoc-generator does the job. I would be really great if documentation was updated automatically.

@nalysius
Copy link
Contributor

nalysius commented Mar 1, 2018

This issues throws an other question: the API documentation could be updated or generated via command line, but what about the rest of the documentation? It could be really great to have a resources/docs directory that contains markdown files that explain all the install process and other. They could be updated easier.

@jbrooksuk
Copy link
Member

We could use something like Swagger?

@hugomcfonseca
Copy link
Author

Yes, it would be fine by me @jbrooksuk. And Swagger will help to keep documentation updated every time a new endpoint is added/changed/deleted, so it would be great.

@nalysius
Copy link
Contributor

nalysius commented Mar 6, 2018

The package DarkaOnLine/L5-Swagger seems to be the job.
I'll update my pull request to add the SwaggerPHP annotations in addition to the documentation block I've ever added.

@jbrooksuk
Copy link
Member

I'm keen on this being generated to support Readme.io

@nalysius
Copy link
Contributor

If we use ApiDoc (as discussed in #2929) there would be no need of Swagger and we could be synced with Readme.io.

@jbrooksuk
Copy link
Member

It looks like ApiDoc is actually unsupported though. Swagger may be the preferred option.

@nalysius
Copy link
Contributor

It could be great if a package would be able to use the Laravel's routes and the doc block to generate Swagger. Swagger-php needs all the information, but perhaps an other package or a wrapper would be able to do more?

@jbrooksuk
Copy link
Member

I don't know much about Swagger, but yeah it would be very cool!

@nalysius
Copy link
Contributor

I'm not sure if there is a such package. It would be annoying to type path and method for every route. It could be almost sufficient to generate the swagger.

@nalysius
Copy link
Contributor

I suggest to accept the documentation update that I'd done in #2929 because generated documentation always uses PHP Doc, and keeping this issue open.
When we find a package that uses Laravel's routes to generate a Swagger file we'll add it.
What do you think about it?

@jbrooksuk
Copy link
Member

I think we should get Swagger working because that's what we need to update Readme.io with.

@nalysius
Copy link
Contributor

I agree to get Swagger working. The thing with swagger-php is we have to write all path (/api/v1/components) on every method, it's not synced with the Laravel's routes.
Any solution to that point?

@jbrooksuk
Copy link
Member

Nah, but if that's what it takes, maybe we just get on with it?

@nalysius
Copy link
Contributor

If we have no solution for that, we could use Swagger with an effort to keep the documentation up to date. If you're ok with that, I'll add Swagger to my PR.

@jbrooksuk
Copy link
Member

Let's go with Swagger. We can import it into Readme.io then.

@jbrooksuk
Copy link
Member

Alternatively, we could export documentation into this https://readme.readme.io/docs/importing-documentation

@jbrooksuk
Copy link
Member

I'm actually going to do that as well because it's super useful.

@jbrooksuk
Copy link
Member

(Not for API).

@jbrooksuk
Copy link
Member

Exported to https://github.com/CachetHQ/Docs which does contain the API pages, but with no actual API info in them.

@ghost ghost deleted a comment from jbrooksuk Apr 2, 2018
@ghost
Copy link

ghost commented Apr 2, 2018

This issue was moved by @jbrooksuk to cachethq/docs/issues/4.

@ghost ghost closed this as completed Apr 2, 2018
@ghost ghost locked and limited conversation to collaborators Apr 2, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants