|
1 |
| -# PHP-Drafter |
| 1 | +# PHPDraft |
2 | 2 | This is a parser for API Blueprint files in PHP.
|
3 | 3 |
|
4 | 4 | ## Usage
|
5 | 5 | For direct usage you can run:
|
6 | 6 | ```bash
|
7 |
| -$ ./php-drafter.phar blueprint-file.apib > blueprint-webpage.html |
| 7 | +$ ./phpdraft.phar blueprint-file.apib > blueprint-webpage.html |
8 | 8 | ```
|
9 | 9 | You can also install it first:
|
10 | 10 | ```bash
|
11 |
| -$ cp php-drafter.phar /usr/bin/php-drafter |
12 |
| -$ chmod +x /usr/bin/php-drafter |
13 |
| -$ php-drafter blueprint-file.apib > blueprint-webpage.html |
| 11 | +$ cp phpdraft.phar /usr/bin/phpdraft |
| 12 | +$ chmod +x /usr/bin/phpdraft |
| 13 | +$ phpdraft blueprint-file.apib > blueprint-webpage.html |
14 | 14 | ```
|
15 | 15 |
|
| 16 | +## Including Files |
| 17 | +It is possible to include other files in your blueprint by using a special include directive with a path to the included file relative to the current file's directory. Included files can be written in API Blueprint, Markdown or HTML (or JSON for response examples). Included files can include other files, so be careful of circular references. |
| 18 | + |
| 19 | +```markdown |
| 20 | +<!-- include(filename.md) --> |
| 21 | +``` |
| 22 | + |
| 23 | +For tools that do not support this include directive it will just render out as an HTML comment. API Blueprint may support its own mechanism of including files in the future, and this syntax was chosen to not interfere with the [external documents proposal](https://github.com/apiaryio/api-blueprint/issues/20) while allowing `PHPDraft` users to include documents today. |
| 24 | + |
| 25 | +_Thanks to [aglio](https://github.com/danielgtaylor/aglio) for the idea._ |
| 26 | + |
16 | 27 | ## Writing API documentation
|
17 | 28 |
|
18 | 29 | For writing API documentation using [API Blueprint](http://apiblueprint.org/) syntax. You can read about its [specification](https://github.com/apiaryio/api-blueprint/blob/master/API%20Blueprint%20Specification.md).
|
@@ -65,7 +76,7 @@ Return the information for the Person
|
65 | 76 |
|
66 | 77 |
|
67 | 78 | ## Dependencies
|
68 |
| -PHP-Drafter requires [drafter](https://github.com/apiaryio/drafter) to be installed. Refer to the drafter page for the installation details. |
| 79 | +PHPDraft requires [drafter](https://github.com/apiaryio/drafter) to be installed. Refer to the drafter page for the installation details. |
69 | 80 |
|
70 | 81 | ## Libraries
|
71 | 82 | This app usage the following libraries:
|
|
0 commit comments