Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yoanm/php-jsonrpc-server-doc-sdk
Php SDK to generate (Http) JSON-RPC server documentation
https://github.com/yoanm/php-jsonrpc-server-doc-sdk
documentation-generator json-rpc php sdk
Last synced: 3 months ago
JSON representation
Php SDK to generate (Http) JSON-RPC server documentation
- Host: GitHub
- URL: https://github.com/yoanm/php-jsonrpc-server-doc-sdk
- Owner: yoanm
- License: mit
- Created: 2018-05-13T07:50:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-30T10:07:29.000Z (4 months ago)
- Last Synced: 2024-10-03T07:09:26.018Z (3 months ago)
- Topics: documentation-generator, json-rpc, php, sdk
- Language: PHP
- Homepage:
- Size: 106 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# JSON-RPC server documentation
[![License](https://img.shields.io/github/license/yoanm/php-jsonrpc-server-doc-sdk.svg)](https://github.com/yoanm/php-jsonrpc-server-doc-sdk)
[![Code size](https://img.shields.io/github/languages/code-size/yoanm/php-jsonrpc-server-doc-sdk.svg)](https://github.com/yoanm/php-jsonrpc-server-doc-sdk)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github\&repo=yoanm/php-jsonrpc-server-doc-sdk)](https://dependabot.com)[![Scrutinizer Build Status](https://img.shields.io/scrutinizer/build/g/yoanm/php-jsonrpc-server-doc-sdk.svg?label=Scrutinizer\&logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/php-jsonrpc-server-doc-sdk/build-status/master)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/yoanm/php-jsonrpc-server-doc-sdk/master.svg?logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/php-jsonrpc-server-doc-sdk/?branch=master)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/20dd4e48499342b2ad40d6ce4e17daf2)](https://app.codacy.com/gh/yoanm/php-jsonrpc-server-doc-sdk/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)[![CI](https://github.com/yoanm/php-jsonrpc-server-doc-sdk/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/yoanm/php-jsonrpc-server-doc-sdk/actions/workflows/CI.yml)
[![codecov](https://codecov.io/gh/yoanm/php-jsonrpc-server-doc-sdk/branch/master/graph/badge.svg?token=NHdwEBUFK5)](https://codecov.io/gh/yoanm/php-jsonrpc-server-doc-sdk)[![Latest Stable Version](https://img.shields.io/packagist/v/yoanm/jsonrpc-server-doc-sdk.svg)](https://packagist.org/packages/yoanm/jsonrpc-server-doc-sdk)
[![Packagist PHP version](https://img.shields.io/packagist/php-v/yoanm/jsonrpc-server-doc-sdk.svg)](https://packagist.org/packages/yoanm/jsonrpc-server-doc-sdk)Php SDK to generate (Http) JSON-RPC server documentation
See [yoanm/symfony-jsonrpc-http-server-doc](https://github.com/yoanm/symfony-jsonrpc-http-server-doc) for automatic dependency injection.
See [yoanm/jsonrpc-params-symfony-constraint-doc-sdk](https://github.com/yoanm/php-jsonrpc-params-symfony-constraint-doc-sdk) for params documentation generation.
## Availble formats
* Raw : Built-in `json` format
* Swagger : [yoanm/jsonrpc-http-server-swagger-doc-sdk](https://github.com/yoanm/php-jsonrpc-http-server-swagger-doc-sdk)
* OpenApi : [yoanm/jsonrpc-http-server-openapi-doc-sdk](https://github.com/yoanm/php-jsonrpc-http-server-openapi-doc-sdk)## How to use
### Php objects
Available documentation objects:
* [`ServerDoc`](./src/Domain/Model/ServerDoc.php) and [`HttpServerDoc`](./src/Domain/Model/HttpServerDoc.php) for HTTP server
* [`MethodDoc`](./src/Domain/Model/MethodDoc.php)
* [`ErrorDoc`](./src/Domain/Model/ErrorDoc.php)
* [`TagDoc`](./src/Domain/Model/TagDoc.php) : Allow to tag methods
* Types :
* [`TypeDoc`](./src/Domain/Model/Type/TypeDoc.php) : Basic type
* [`BooleanDoc`](./src/Domain/Model/Type/BooleanDoc.php)
* [`ScalarDoc`](./src/Domain/Model/Type/ScalarDoc.php)
* [`StringDoc`](./src/Domain/Model/Type/StringDoc.php)
* [`NumberDoc`](./src/Domain/Model/Type/NumberDoc.php)
* [`IntegerDoc`](./src/Domain/Model/Type/IntegerDoc.php)
* [`FloatDoc`](./src/Domain/Model/Type/FloatDoc.php)
* [`CollectionDoc`](./src/Domain/Model/Type/CollectionDoc.php)
* [`ArrayDoc`](./src/Domain/Model/Type/ArrayDoc.php)
* [`ObjectDoc`](./src/Domain/Model/Type/ObjectDoc.php)### Normalizers
Available normalizers :
* [`TypeDocNormalizer`](./src/Infra/Normalizer/TypeDocNormalizer.php)
```php
use Yoanm\JsonRpcServerDoc\Infra\Normalizer\TypeDocNormalizer;$typeDocNormalizer = new TypeDocNormalizer();
```
* [`TagDocNormalizer`](./src/Infra/Normalizer/TagDocNormalizer.php)
```php
use Yoanm\JsonRpcServerDoc\Infra\Normalizer\TagDocNormalizer;$tagDocNormalizer = new TagDocNormalizer();
```
* [`ErrorDocNormalizer`](./src/Infra/Normalizer/ErrorDocNormalizer.php)
```php
use Yoanm\JsonRpcServerDoc\Infra\Normalizer\MethodDocNormalizer;$errorDocNormalizer = new ErrorDocNormalizer($typeDocNormalizer);
```
* [`MethodDocNormalizer`](./src/Infra/Normalizer/MethodDocNormalizer.php)
```php
use Yoanm\JsonRpcServerDoc\Infra\Normalizer\MethodDocNormalizer;$tagDocNormalizer = new MethodDocNormalizer(
$typeDocNormalizer,
$errorDocNormalizer
);
```
* [`ServerDocNormalizer`](./src/Infra/Normalizer/ServerDocNormalizer.php) and [`HttpServerDocNormalizer`](./src/Infra/Normalizer/HttpServerDocNormalizer.php) for HTTP server
```php
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](./CONTRIBUTING.md)