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?
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.
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