yoanm/jsonrpc-server-doc-sdk

SDK to generate (Http) JSON-RPC server documentation

v0.3.0 2022-03-19 01:11 UTC

This package is auto-updated.

Last update: 2022-06-19 02:08:35 UTC


README

License Code size Dependabot Status

Scrutinizer Build Status Scrutinizer Code Quality Code Coverage

CI codecov

Latest Stable Version Packagist PHP version

Php SDK to generate (Http) JSON-RPC server documentation

See yoanm/symfony-jsonrpc-http-server-doc for automatic dependency injection.

See yoanm/jsonrpc-params-symfony-constraint-doc-sdk for params documentation generation.

Availble formats

How to use

Php objects

Available documentation objects:

Normalizers

Available normalizers :

  • TypeDocNormalizer
    use Yoanm\JsonRpcServerDoc\Infra\Normalizer\TypeDocNormalizer;
    
    $typeDocNormalizer = new TypeDocNormalizer();
  • TagDocNormalizer
    use Yoanm\JsonRpcServerDoc\Infra\Normalizer\TagDocNormalizer;
    
    $tagDocNormalizer = new TagDocNormalizer();
  • ErrorDocNormalizer
    use Yoanm\JsonRpcServerDoc\Infra\Normalizer\MethodDocNormalizer;
    
    $errorDocNormalizer = new ErrorDocNormalizer($typeDocNormalizer);
  • MethodDocNormalizer
    use Yoanm\JsonRpcServerDoc\Infra\Normalizer\MethodDocNormalizer;
    
    $tagDocNormalizer = new MethodDocNormalizer(
      $typeDocNormalizer,
      $errorDocNormalizer
    );
  • ServerDocNormalizer and HttpServerDocNormalizer for HTTP server
    use Yoanm\JsonRpcServerDoc\Infra\Normalizer\ServerDocNormalizer;
    use Yoanm\JsonRpcServerDoc\Infra\Normalizer\HttpServerDocNormalizer;
    
    $normalizer = new ServerDocNormalizer(
      $methodDocNormalizer,
      $tagDocNormalizer,
      $errorDocNormalizer
    );
    
    $httpNormalizer = new HttpServerDocNormalizer($normalizer);

Contributing

See contributing note