Skip to content

Latest commit

 

History

History
98 lines (74 loc) · 5 KB

README.md

File metadata and controls

98 lines (74 loc) · 5 KB

JSON-RPC server documentation

License Code size Dependabot Status

Scrutinizer Build Status Scrutinizer Code Quality Codacy Badge

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