yoanm/jsonrpc-server-doc-sdk

SDK to generate (Http) JSON-RPC server documentation

v1.0.2 2024-08-30 10:04 UTC

README

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