Download the PHP package kekos/prest-doc without Composer
On this page you can find all versions of the php package kekos/prest-doc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kekos/prest-doc
More information about kekos/prest-doc
Files in kekos/prest-doc
Package prest-doc
Short Description Static Site Generator for OpenAPI documentation
License MIT
Informations about the package prest-doc
Prest-doc
Static Site Generator for OpenAPI documentation written in PHP.
Install
Requires at least PHP 8.1.
Usage
<in_directory>
points to a directory which Prest-doc should read and convert.<out_directory>
points to a directory where converted files will be written. Please note that this directory will be deleted by Prest-doc on each run<layout_file>
is a file path to layout file. See theexamples/
directory.<config_file>
is a file path to configuration. Optional.
Configuration
API templates
You can override the default OpenAPI Markdown templates by creating a configuration file and supply it with your own instances of template interfaces:
Topics menu
Prest-doc can be configured with how it should create the main API navigation, the "topics menu". Two implementations
are included, but you can build your own by implementing the interface \Kekos\PrestDoc\ApiEntities\TopicsRepository
.
Use the Configuration
class´ api_templates_class_map
property to configure this.
TaggedTopicsRepository
(default)
All path operations must have a tag prefixed with topic-
. That tag will be used to group operations together under the
name of tag, excluding topic-
.
SingleTopicRepository
All paths are grouped to a single topic "Operations".
Features
- [x] Converts OpenAPI specifications (JSON) to HTML.
- [x] Allows for own HTML layout template, written in PHP.
- [x] Allows for own CSS and JavaScript.
- [ ] Sort paths (topics) in an order logical for you and your app.
Bugs and improvements
Report bugs in GitHub issues or feel free to make a pull request :-)
License
MIT
All versions of prest-doc with dependencies
ext-mbstring Version *
cebe/php-openapi Version ^1.7
league/commonmark Version ^2.3
symfony/yaml Version ^6.0 || ^7.0
spatie/commonmark-highlighter Version ^3.0