Skip to content

Commit

Permalink
New docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mabar committed Mar 4, 2019
1 parent 1bb709a commit e1750bd
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 51 deletions.
51 changes: 20 additions & 31 deletions .docs/README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,41 @@
# Apitte/Debug
# Apitte Debug

## Content
Debug tools for [Apitte](https://github.com/apitte/core), based on [Tracy debugger](https://github.com/nette/tracy).

- [Installation - how to register a plugin](#plugin)
- [Tracy - debugging](#tracy)
- [Bridges - extra features](#bridges)
- [Playground - real examples](#playground)
## Setup

## Plugin
First of all, setup [core](https://github.com/apitte/core) package.

This plugin requires [Apitte/Core](https://github.com/apitte/core) library.
Install and register debug plugin

At first you have to register the main extension.

```yaml
extensions:
api: Apitte\Core\DI\ApiExtension
```bash
composer require apitte/debug
```

Secondly, add the `DebugPlugin` plugin.

```yaml
api:
plugins:
plugins:
Apitte\Debug\DI\DebugPlugin:
debug: %debugMode%
```
## Tracy
This plugin adds 2 Tracy extensions:

- panel
- bluescreen panel

## Bridges

### Apitte/Negotiation
- bar panel - displays all router
- blue screen panel - displays endpoint with invalid schema
This plugin also adds some extra features if you use `apitte/negotiation`. At first take a [quick look at documentation](https://github.com/apitte/negotiation/tree/master/.docs).
## Negotiation
This plugins register 2 more transformers:
If you have [negotiation](https://github.com/apitte/negotiation) plugin installed then you will be able to use two new suffixes.
- `DebugTransformer` - You can type `example.com/user.debug` and you'll see dump of `Apitte\Core\Http\ApiResponse`. In case of exception, you'll see the Tracy-exception.
With these suffixes you will also be able to see **Tracy bar**
- `DebugDataTransformer` - You can type `example.com/user.debugdata` and you'll see dump of response entity data.
`.debug`

## Playground
- dumps response
- `example.com/api/v1/users.debug`

I've made a repository with full applications for education.
`.debugdata`

Take a look: https://github.com/apitte/playground
- dumps response entity
- `example.com/api/v1/users.debugdata`
29 changes: 9 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Apitte\Debug
# Apitte Debug

:wrench: Debug tools for Apitte.

-----
Debug tools for [Apitte](https://github.com/apitte/core), based on [Tracy debugger](https://github.com/nette/tracy).

[![Build Status](https://img.shields.io/travis/apitte/debug.svg?style=flat-square)](https://travis-ci.org/apitte/debug)
[![Code coverage](https://img.shields.io/coveralls/apitte/debug.svg?style=flat-square)](https://coveralls.io/r/apitte/debug)
Expand All @@ -16,12 +14,6 @@

[![Join the chat](https://img.shields.io/gitter/room/apitte/apitte.svg?style=flat-square)](http://bit.ly/apittegitter)

## Install

```
composer require apitte/debug
```

## Version

| State | Version | Branch | PHP | Composer |
Expand All @@ -30,12 +22,11 @@ composer require apitte/debug
| stable | `^0.4.0` | `master` | `>= 7.1` | |
| stable | `^0.3.0` | `master` | `>= 5.6` | |

## Overview
## Documentation

- [Installation - how to register a plugin](https://github.com/apitte/debug/tree/master/.docs#plugin)
- [Tracy - debugging](https://github.com/apitte/debug/tree/master/.docs#tracy)
- [Bridges - extra features](https://github.com/apitte/debug/tree/master/.docs#bridges)
- [Playground - real examples](https://github.com/apitte/debug/tree/master/.docs#playground)
- [Setup](.docs/README.md#setup)
- [Tracy](.docs/README.md#tracy)
- [Negotiation](.docs/README.md#negotiation)

## Maintainers

Expand All @@ -60,10 +51,8 @@ composer require apitte/debug
</tbody>
</table>

-----

The development is sponsored by [Tlapnet](http://www.tlapnet.cz) and a lot of coffees. Thank you guys! :+1:
## Sponsoring

-----
<a href="https://github.com/tlapnet"><img width="200" src="https://cdn.rawgit.com/f3l1x/xsource/2463efb7/assets/tlapdev.png"></a>

Thank you for testing, reporting and contributing.
The development is sponsored by [Tlapnet](https://www.tlapnet.cz)

0 comments on commit e1750bd

Please sign in to comment.