{"id":42032653,"url":"https://github.com/blumilksoftware/openapi-toolbox","last_synced_at":"2026-01-26T04:37:45.379Z","repository":{"id":170568653,"uuid":"641848026","full_name":"blumilksoftware/openapi-toolbox","owner":"blumilksoftware","description":"🧰 OpenAPI handy toolbox for Laravel applications.","archived":false,"fork":false,"pushed_at":"2025-04-07T08:48:45.000Z","size":58,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-07T09:33:18.321Z","etag":null,"topics":["elements","laravel","openapi","swagger","tests"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/blumilksoftware/openapi-toolbox","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/blumilksoftware.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-05-17T09:39:12.000Z","updated_at":"2025-04-07T08:46:43.000Z","dependencies_parsed_at":"2023-11-10T12:38:53.803Z","dependency_job_id":"3b80f74a-328a-4756-aecb-36c6b388d489","html_url":"https://github.com/blumilksoftware/openapi-toolbox","commit_stats":null,"previous_names":["blumilksoftware/openapi-toolbox"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/blumilksoftware/openapi-toolbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blumilksoftware%2Fopenapi-toolbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blumilksoftware%2Fopenapi-toolbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blumilksoftware%2Fopenapi-toolbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blumilksoftware%2Fopenapi-toolbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blumilksoftware","download_url":"https://codeload.github.com/blumilksoftware/openapi-toolbox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blumilksoftware%2Fopenapi-toolbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28766887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T03:54:34.369Z","status":"ssl_error","status_checked_at":"2026-01-26T03:54:33.031Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["elements","laravel","openapi","swagger","tests"],"created_at":"2026-01-26T04:37:45.309Z","updated_at":"2026-01-26T04:37:45.358Z","avatar_url":"https://github.com/blumilksoftware.png","language":"PHP","readme":"[![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/blumilksoftware/openapi-toolbox?style=for-the-badge)](https://packagist.org/packages/blumilksoftware/openapi-toolbox)\n[![Packagist Version](https://img.shields.io/packagist/v/blumilksoftware/openapi-toolbox?style=for-the-badge)](https://packagist.org/packages/blumilksoftware/openapi-toolbox)\n[![Packagist Downloads](https://img.shields.io/packagist/dt/blumilksoftware/openapi-toolbox?style=for-the-badge)](https://packagist.org/packages/blumilksoftware/openapi-toolbox/stats)\n\n## 🧰 openapi-toolbox\n\nOpenAPI Toolbox is a handy package with all important documentation-related features we are using in some of **[@blumilksoftware](https://github.com/blumilksoftware)** projects.\n\n### Installation\n\nInstall package via Composer and publish configuration file:\n\n```\ncomposer require blumilksoftware/openapi-toolbox\nphp artisan vendor:publish\n```\n\nIf you need it only for internal development (no documentation serving) you can install it with a development flag:\n\n```\ncomposer require blumilksoftware/openapi-toolbox --dev\nphp artisan vendor:publish\n```\n\n### Configuration\n\nConfiguration file should be published into your application after running `php artisan vendor:publish` command. It should look like below:\n\n```php\nreturn [\n    \"default\" =\u003e \"openapi\",\n    \"documentations\" =\u003e [\n        \"openapi\" =\u003e [\n            \"format\" =\u003e Format::YmlToJson,\n            \"specification\" =\u003e [\n                \"path\" =\u003e resource_path(\"openapi\"),\n                \"index\" =\u003e \"openapi.yml\",\n                \"allow_multiple_files\" =\u003e false,\n            ],\n             \"cache\" =\u003e [\n                \"enabled\" =\u003e false,\n                \"driver\" =\u003e \"default\",\n                \"key\" =\u003e \"openapi\",\n            ],\n            \"ui\" =\u003e [\n                \"enabled\" =\u003e false,\n                \"single_source\" =\u003e false,\n                \"title\" =\u003e \"Documentation\",\n                \"routing\" =\u003e [\n                    \"prefix\" =\u003e \"documentation\",\n                    \"name\" =\u003e \"documentation\",\n                    \"middlewares\" =\u003e [],\n                ],\n                \"provider\" =\u003e UIProvider::Elements,\n            ],\n        ],\n    ],\n    \"providers\" =\u003e [\n        \"elements\" =\u003e [\n            \"script\" =\u003e [\n                \"src\" =\u003e \"https://unpkg.com/@stoplight/elements@7.7.16/web-components.min.js\",\n                \"sri\" =\u003e \"sha384-bwBnouovwwSJc5fWe7VFNxRg+T2lPHhUcHIzdf7mFfqTZkYtM3T/ehzfEr8F02yY\",\n            ],\n            \"stylesheet\" =\u003e [\n                \"href\" =\u003e \"https://unpkg.com/@stoplight/elements@7.7.16/styles.min.css\",\n                \"sri\" =\u003e \"sha384-1lLf7J28IOR7k5RlItk6Y+G3hDgVB3y4RCgWNq6ZSwjYfvJXPtZAdW0uklsAZbGW\",\n            ],\n        ],\n        \"swagger\" =\u003e [\n            \"script\" =\u003e [\n                \"src\" =\u003e \"https://unpkg.com/swagger-ui-dist@4.5.0/swagger-ui-bundle.js\",\n                \"sri\" =\u003e \"sha384-xy3YXp34ftsoHshRtcUFjOl/M22B5OEHD5S9AjtVzQokz+BxNff8vNW08msKmH46\",\n            ],\n            \"stylesheet\" =\u003e [\n                \"href\" =\u003e \"https://unpkg.com/swagger-ui-dist@4.5.0/swagger-ui.css\",\n                \"sri\" =\u003e \"sha384-pzdBB6iZwPIzBHgXle+9cgvKuMgtWNrBopXkjrWnKCi3m4uJsPPdLQ4IPMqRDirS\",\n            ],\n        ],\n    ],\n];\n```\n\n### Features\n\n#### Multiple documentations\n\nYou can create more than one documentation by adding element to `openapi_toolbox.documentations` array. \n\n```php\n\nreturn {\n    \"test\" =\u003e [\n        \"format\" =\u003e Format::YmlToJson,\n        \"specification\" =\u003e [\n            \"path\" =\u003e resource_path(\"documentation/test\"),\n            \"index\" =\u003e \"openapi.yml\",\n            \"allow_multiple_files\" =\u003e false,\n        ],\n        \"cache\" =\u003e [\n            \"enabled\" =\u003e false,\n            \"driver\" =\u003e \"default\",\n            \"key\" =\u003e \"openapi\",\n        ],\n        \"ui\" =\u003e [\n            \"enabled\" =\u003e false,\n            \"single_source\" =\u003e false,\n            \"title\" =\u003e \"Test documentation\",\n            \"routing\" =\u003e [\n                \"prefix\" =\u003e \"documentation/test\",\n                \"name\" =\u003e \"documentation.test\",\n                \"middlewares\" =\u003e [],\n            ],\n            \"provider\" =\u003e UIProvider::Elements,\n        ],\n    ],\n}\n```\n\n#### OpenAPI documentation UI\n\nWith configuration `ui.enabled = true` a documentation UI will be built from configurable path and served on configurable route. Currently, the [Stoplight Elements](https://stoplight.io/open-source/elements) and [Swagger UI](https://swagger.io/tools/swagger-ui/) are only available UI base components configurable by `ui.provider` setting.\n\nBy default, it should be one documentation available under `GET /documentation`.\n\nBy changing configuration variable `ui.single_source` to `true`, application will serve already built single source file for GUI.\n\n#### OpenAPI documentation endpoint\n\nServing a documentation itself can be tricky, especially if specification is built from multiple nested files. Here OpenAPI specification files will be built accordingly to configuration and by default the result should be available under `GET /documentation/raw`.\n\n#### OpenAPI specification validation\n\nOpenAPI specification files will be built accordingly to configuration and validated on demand by running an Artisan command:\n\n```\nphp artisan openapi:validate {documentation}\n```\n\nGood example of usage would be adding this command to CI pipeline for opened pull requests.\n\n#### Testing requests and responses against OpenAPI specification\n\nBased on [kirschbaum-development/laravel-openapi-validator](https://github.com/kirschbaum-development/laravel-openapi-validator), special trait added to selected PHPUnit test cases enables validation against application's OpenAPI specification:\n\n```\nuse \\Blumilk\\OpenApiToolbox\\OpenApiCompatibility\\OpenApiCompatibility;\n```\n\nBy default, the documentation will be used from `openapi_toolbox.default` option. You should consider to override `getDocumentationName()` or `getDocumentationConfig()` method to select documentation you want to test. \n\nEvery time any HTTP call to application would be performed during tests, additional validation will be performed and structure of requests and responses will be checked against OpenAPI specification. For special cases (e.g. testing invalid requests) this validation can be disabled by using `$this-\u003ewithoutRequestValidation()` and `$this-\u003ewithoutResponseValidation()`.  \n\nWith configuration `cache.enabled = true` internal builders will use cached OpenAPI specifications.\nYou can change the cache store by setting the `cache.driver` option, for example: `cache.driver = redis`. Make sure to use one of the cache drivers available in your Laravel application.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblumilksoftware%2Fopenapi-toolbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblumilksoftware%2Fopenapi-toolbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblumilksoftware%2Fopenapi-toolbox/lists"}