2017 © Pedro Peláez
 

library api-documenter

image

nicolas-cajelli/api-documenter

  • Monday, August 14, 2017
  • by nicolas-cajelli
  • Repository
  • 0 Watchers
  • 0 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

API documenter

This library is intended to automatically build documentation with the smallest friction possible in a defined scope (see Scope) If your use case doesn't match the current scope, please create an issue/pr, (*1)

Scope

APIS running:, (*2)

  • Php 7.1 or higher (required by gson)
  • Isolated Routes file with structure as Slim framework

Install

composer require nicolas-cajelli/api-documenter

Run (Default)

./vendor/bin/build-documentation src/routes.php "My api name" "/my/api/basepath"

Run (Custom)

Create a .php in your project:, (*3)

<?php
$loader = require 'vendor/autoload.php';

# Required by gson library
\Doctrine\Common\Annotations\AnnotationRegistry::registerLoader([$loader, 'loadClass']);

$app = new \Documenter\FakeApp('My api name');
$app->setBasePath('/my/api/basepath');
$app->setDescription('My api description');
$app->setVersion('1.0.0');

require 'src/routes.php';

$formatter = new \Documenter\Formatter\SwaggerFormatter();

echo $formatter->getDocumentation($app);

The Versions

14/08 2017

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

documentation swagger slim

14/08 2017

0.1.0

0.1.0.0

  Sources   Download

MIT

The Requires

 

documentation swagger slim