Skip to content

Commit 4dd358f

Browse files
committed
improved README
1 parent 4d567fb commit 4dd358f

2 files changed

Lines changed: 20 additions & 12 deletions

File tree

README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@
55
[![Build Status](https://travis-ci.com/osteel/openapi-httpfoundation-testing.svg?token=SDx8eeySnDpzswpLVTU3&branch=main)](https://travis-ci.com/osteel/openapi-httpfoundation-testing)
66
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/osteel/openapi-httpfoundation-testing/badges/quality-score.png?b=main&s=bef9ddbf29dac69612a3092e4761e14ce768bccd)](https://scrutinizer-ci.com/g/osteel/openapi-httpfoundation-testing/?branch=main)
77

8-
Increase your API's robustness by validating your HttpFoundation responses against OpenAPI 3.0 definitions in your integration tests.
8+
Strengthen your API tests by validating HttpFoundation responses against OpenAPI (3.0.x) definitions.
99

1010
## Why?
1111

12-
[OpenAPI](https://swagger.io/specification/) is a specification intended to describe RESTful APIs built with any language, for the API to be understood by humans and machines alike.
12+
[OpenAPI](https://swagger.io/specification/) is a specification intended to describe RESTful APIs in a way that is understood by humans and machines alike.
1313

14-
Validating HTTP responses against an OpenAPI definition makes it the single source of truth for our API, as we ensure that the API's behaviour conforms to the documentation we provide.
14+
By validating an API's responses against the OpenAPI definition that describes it, we guarantee that the API's behaviour conforms to the documentation we provide, thus making the OpenAPI definition the single source of truth.
1515

16-
The [HttpFoundation component](https://symfony.com/doc/current/components/http_foundation.html) is developed and maintained as part of the [Symfony framework](https://symfony.com/), and is used to handle HTTP requests and responses in Symfony, Laravel, Drupal, and many other major industry players (see the [extended list](https://symfony.com/components/HttpFoundation)).
16+
The [HttpFoundation component](https://symfony.com/doc/current/components/http_foundation.html) is developed and maintained as part of the [Symfony framework](https://symfony.com/). It is used to handle HTTP requests and responses in projects such as Symfony, Laravel, Drupal, and many other major industry players (see the [extended list](https://symfony.com/components/HttpFoundation)).
1717

1818
## How does it work?
1919

2020
This package is built upon the [OpenAPI PSR-7 Message Validator](https://github.com/thephpleague/openapi-psr7-validator) package, which validates [PSR-7 messages](https://www.php-fig.org/psr/psr-7/) against OpenAPI definitions.
2121

22-
It essentially converts HttpFoundation response objects to PSR-7 messages using Symfony's [PSR-7 Bridge](https://symfony.com/doc/current/components/psr7.html), before passing them on to the OpenAPI PSR-7 Message Validator.
22+
It essentially converts HttpFoundation response objects to PSR-7 messages using Symfony's [PSR-7 Bridge](https://symfony.com/doc/current/components/psr7.html) and [Tobias Nyholm](https://github.com/Nyholm)'s [PSR-7 implementation](https://github.com/Nyholm/psr7), before passing them on to the OpenAPI PSR-7 Message Validator.
2323

2424
## Install
2525

2626
Via Composer:
2727

28-
``` bash
28+
```bash
2929
$ composer require --dev osteel/openapi-httpfoundation-testing
3030
```
3131

32-
> 💡 This package is meant to be used for development only, as part of your test suite.
32+
> 💡 This package is meant to be used for development only, as part of your API test suite.
3333
3434
## Usage
3535

@@ -75,7 +75,7 @@ Please see the [Releases section](../../releases) for more information on what h
7575

7676
## Testing
7777

78-
``` bash
78+
```bash
7979
$ composer test
8080
```
8181

@@ -85,13 +85,19 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE_OF_CONDUCT](CODE_OF_CONDUCT
8585

8686
## Credits
8787

88+
**People**
89+
8890
- [Yannick Chenot](https://github.com/osteel)
8991
- [All Contributors](../../contributors)
90-
- [OpenAPI PSR-7 Message Validator](https://github.com/thephpleague/openapi-psr7-validator)
91-
- [The PSR-7 Bridge](https://symfony.com/doc/current/components/psr7.html)
9292

9393
Special thanks to [Pavel Batanov](https://github.com/scaytrase) for his advice on structuring the package.
9494

95+
**Packages**
96+
97+
- [OpenAPI PSR-7 Message Validator](https://github.com/thephpleague/openapi-psr7-validator)
98+
- [The PSR-7 Bridge](https://symfony.com/doc/current/components/psr7.html)
99+
- [PSR-7 implementation](https://github.com/Nyholm/psr7)
100+
95101
## License
96102

97103
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
22
"name": "osteel/openapi-httpfoundation-testing",
33
"type": "library",
4-
"description": "Validate HttpFoundation responses against OpenAPI definitions",
4+
"description": "Strengthen your API tests by validating HttpFoundation responses against OpenAPI (3.0.x) definitions",
55
"keywords": [
66
"openapi",
77
"httpfoundation",
88
"symfony",
99
"laravel",
1010
"http",
1111
"validation",
12-
"testing"
12+
"testing",
13+
"api"
1314
],
1415
"homepage": "https://github.com/osteel/openapi-httpfoundation-testing",
1516
"license": "MIT",
@@ -23,6 +24,7 @@
2324
],
2425
"require": {
2526
"php": "^7.2",
27+
"ext-json": "*",
2628
"league/openapi-psr7-validator": "^0.12.1",
2729
"nyholm/psr7": "^1.3",
2830
"psr/http-message": "^1.0",

0 commit comments

Comments
 (0)