Laravel-apidoc-generator: PHP output? language_tabs

Created on 13 Mar 2017  路  8Comments  路  Source: mpociot/laravel-apidoc-generator

Hi @mpociot,

By default it generates a doc with "bash & javascript", but I want it to generate a PHP-example for the API also. How?

And the Includes are not added, set in the folder, like this file docs/sources/includes/_errors.md.

Just doing php artisan api:generate --routePrefix="v1/*"
What am I missing?

enhancement

Most helpful comment

@mpociot by default only there are examples for bash and javascript? how to do it like http://forge.laravel.com/api-documentation

All 8 comments

You can add your new languages to the route.blade.php file.
This file contains all available language tabs.

Which version of Laravel do you use? The includes should work :/

How can I include _errors.md file?
"...add them to the top of your index.md's frontmatter"
What does it mean?

@mpociot by default only there are examples for bash and javascript? how to do it like http://forge.laravel.com/api-documentation

@NikDevPHP you are absolutely right. I have been working with this API generator for a while and it is a great tool, but I have no idea how to "...add them to the top of your index.md's frontmatter" either. Did you get any further on this?

After digging through ond of the source projects for this (mpociot/whiteboard), I have discovered how to "...add them to the top of your index.md's frontmatter" for adding included files. If you open the _docs/source/index.md_ file you need to add the files which are in the _includes_ folder below the includes section (see the code below where I have added - errors).

title: API Reference

language_tabs:
- bash
- javascript

includes:
- errors


search: true

toc_footers:
- <a href='http://github.com/mpociot/documentarian'>Documentation Powered by Documentarian</a>
---
<!-- START_INFO -->

You must run the command below to update the documentation:

$ php artisan api:update

I think it would be nice to have PHP samples available too, given that this is a PHP app 馃榾 . Low priority, but nice.

This never happened, correct?

Correct.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wyq2214368 picture wyq2214368  路  3Comments

herpaderpaldent picture herpaderpaldent  路  7Comments

yaofong picture yaofong  路  3Comments

shalvah picture shalvah  路  5Comments

hackel picture hackel  路  8Comments