2017 © Pedro Peláez
 

library symfony-jsonrpc-http-server-doc

Symfony bundle for easy JSON-RPC server documentation

image

yoanm/symfony-jsonrpc-http-server-doc

Symfony bundle for easy JSON-RPC server documentation

  • Sunday, July 22, 2018
  • by yoanm
  • Repository
  • 0 Watchers
  • 0 Stars
  • 1 Installations
  • Makefile
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Symfony JSON-RPC server documentation

License Code size Dependabot Status, (*1)

Scrutinizer Build Status Scrutinizer Code Quality Codacy Badge, (*2)

CI codecov Symfony Versions, (*3)

Latest Stable Version Packagist PHP version, (*4)

Symfony bundle for easy JSON-RPC server documentation, (*5)

Symfony bundle for yoanm/jsonrpc-server-doc-sdk, (*6)

See yoanm/symfony-jsonrpc-params-sf-constraints-doc for params documentation generation., (*7)

Availble formats

How to use

Once configured, your project is ready to handle HTTP GET request on /doc/{?filename} endpoint., (*8)

See below how to configure it., (*9)

Configuration

Behat demo app configuration folders can be used as examples., (*10)

  • Add the bundles in your config/bundles.php file:, (*11)

    // config/bundles.php
    return [
        ...
        Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
        Yoanm\SymfonyJsonRpcHttpServer\JsonRpcHttpServerBundle::class => ['all' => true],
        Yoanm\SymfonyJsonRpcHttpServerDoc\JsonRpcHttpServerDocBundle::class => ['all' => true],
        ...
    ];
    
  • Add the following in your routing configuration :, (*12)

    # config/routes.yaml
    json-rpc-endpoint:
      resource: '@JsonRpcHttpServerBundle/Resources/config/routing/endpoint.xml'
    
    json-rpc-endpoint-doc:
      resource: '@JsonRpcHttpServerDocBundle/Resources/config/routing/endpoint.xml'
    
  • Add the following in your configuration :, (*13)

    # config/config.yaml
    framework:
      secret: '%env(APP_SECRET)%'
    
    json_rpc_http_server: ~
    
    json_rpc_http_server_doc: ~
    # Or the following in case you want to customize endpoint path
    #json_rpc_http_server_doc:
    #  endpoint: '/my-custom-doc-endpoint' # Default to '/doc'
    
  • Register JSON-RPC methods as described on yoanm/symfony-jsonrpc-http-server documentation., (*14)

  • Query your project at /doc endpoint and you will have a json documentation of your server., (*15)

Contributing

See contributing note, (*16)

The Versions