{"id":15014457,"url":"https://github.com/byjg/php-swagger-test","last_synced_at":"2025-05-15T20:04:49.350Z","repository":{"id":46567955,"uuid":"92078630","full_name":"byjg/php-swagger-test","owner":"byjg","description":"A set of tools for testing your REST calls based on the swagger documentation using PHPUnit","archived":false,"fork":false,"pushed_at":"2024-11-30T21:41:22.000Z","size":360,"stargazers_count":100,"open_issues_count":14,"forks_count":32,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-08T02:39:30.171Z","etag":null,"topics":["hacktoberfest","php","phpunit","swagger"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/byjg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"byjg"}},"created_at":"2017-05-22T17:06:34.000Z","updated_at":"2024-12-19T07:03:21.000Z","dependencies_parsed_at":"2024-11-27T21:24:09.252Z","dependency_job_id":"2aad1439-8c64-44ba-bc25-b5a25da1a139","html_url":"https://github.com/byjg/php-swagger-test","commit_stats":{"total_commits":185,"total_committers":16,"mean_commits":11.5625,"dds":0.2810810810810811,"last_synced_commit":"dfd9e6c7def164e1ad7e72d5ff19d7065640ac01"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byjg%2Fphp-swagger-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byjg%2Fphp-swagger-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byjg%2Fphp-swagger-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byjg%2Fphp-swagger-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byjg","download_url":"https://codeload.github.com/byjg/php-swagger-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254414499,"owners_count":22067272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","php","phpunit","swagger"],"created_at":"2024-09-24T19:45:39.536Z","updated_at":"2025-05-15T20:04:42.550Z","avatar_url":"https://github.com/byjg.png","language":"PHP","readme":"# PHP Swagger Test\n\n[![Build Status](https://github.com/byjg/php-swagger-test/actions/workflows/phpunit.yml/badge.svg?branch=master)](https://github.com/byjg/php-swagger-test/actions/workflows/phpunit.yml)\n[![Opensource ByJG](https://img.shields.io/badge/opensource-byjg-success.svg)](http://opensource.byjg.com)\n[![GitHub source](https://img.shields.io/badge/Github-source-informational?logo=github)](https://github.com/byjg/php-swagger-test/)\n[![GitHub license](https://img.shields.io/github/license/byjg/php-swagger-test.svg)](https://opensource.byjg.com/opensource/licensing.html)\n[![GitHub release](https://img.shields.io/github/release/byjg/php-swagger-test.svg)](https://github.com/byjg/php-swagger-test/releases/)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/byjg/php-swagger-test/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/byjg/php-swagger-test/?branch=master)\n\nA set of tools for testing your REST calls based on the OpenApi specification using PHPUnit.\nCurrently, this library supports the OpenApi specifications `2.0` (formerly swagger) and `3.0`.\nSome features like callbacks, links and references to external documents/objects weren't implemented.\n\nPHP Swagger Test can help you to test your REST Api. You can use this tool both for Unit Tests or Functional Tests.\n\nThis tool reads a previously Swagger JSON file (not YAML) and enables you to test the request and response.\nYou can use the tool \"[https://github.com/zircote/swagger-php](https://github.com/zircote/swagger-php)\" for creating the JSON file when you are developing your\nrest API.\n\nThe ApiTestCase's assertion process is based on throwing exceptions if some validation or test failed.\n\n## Use cases for PHP Swagger test\n\nYou can use the Swagger Test library as:\n\n- [Functional test cases](docs/functional-tests.md)\n- [Contract test cases](docs/contract-tests.md)\n- [Runtime parameters validator](docs/runtime-parameters-validator.md)\n- [Mocking Requests and Validate your specification](docs/mock-requests.md)\n\nWho is using this library?\n\n- [ByJG PHP Rest Reference Architecture](https://github.com/byjg/php-rest-reference-architecture)\n- [Laravel Swagger Test](https://github.com/pionl/laravel-swagger-test)\n\n## Install\n\n```bash\ncomposer require \"byjg/swagger-test\"\n```\n\n## Tests\n\n```bash\nSPEC=swagger php -S 127.0.0.1:8080 tests/rest/app.php \u0026\nSPEC=openapi php -S 127.0.0.1:8081 tests/rest/app.php \u0026\nvendor/bin/phpunit\n```\n\n## Questions?\n\nPlease raise your issue on [Github issue](https://github.com/byjg/php-swagger-test/issues).\n\n## References\n\nThis project uses the [byjg/webrequest](https://github.com/byjg/webrequest) component.\nIt implements the PSR-7 specification, and a HttpClient / MockClient to do the requests.\nCheck it out to get more information.\n\n## Dependencies\n\n```mermaid\nflowchart TD\n    byjg/swagger-test --\u003e byjg/webrequest\n```\n----\n[Open source ByJG](http://opensource.byjg.com)","funding_links":["https://github.com/sponsors/byjg"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyjg%2Fphp-swagger-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyjg%2Fphp-swagger-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyjg%2Fphp-swagger-test/lists"}