{"id":46322120,"url":"https://github.com/hms5232/laravel-swagger","last_synced_at":"2026-03-04T15:31:13.885Z","repository":{"id":62108924,"uuid":"557670570","full_name":"hms5232/laravel-swagger","owner":"hms5232","description":"Integrate Swagger UI and Editor  into Laravel","archived":false,"fork":false,"pushed_at":"2026-01-22T11:52:42.000Z","size":57,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-23T02:35:05.691Z","etag":null,"topics":["laravel-package","openapi","swagger","swagger-editor","swagger-ui"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/hms5232/laravel-swagger","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/hms5232.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-10-26T04:41:38.000Z","updated_at":"2026-01-22T11:52:46.000Z","dependencies_parsed_at":"2023-02-01T01:50:14.158Z","dependency_job_id":"5131cfd9-caa0-4cc1-a15f-ead59f78873b","html_url":"https://github.com/hms5232/laravel-swagger","commit_stats":{"total_commits":27,"total_committers":2,"mean_commits":13.5,"dds":0.2962962962962963,"last_synced_commit":"fe31156ba9bf9697c52fb1fa32ab5c6f25242ab9"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/hms5232/laravel-swagger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hms5232%2Flaravel-swagger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hms5232%2Flaravel-swagger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hms5232%2Flaravel-swagger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hms5232%2Flaravel-swagger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hms5232","download_url":"https://codeload.github.com/hms5232/laravel-swagger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hms5232%2Flaravel-swagger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30084960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T13:22:36.021Z","status":"ssl_error","status_checked_at":"2026-03-04T13:20:45.750Z","response_time":59,"last_error":"SSL_read: 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":["laravel-package","openapi","swagger","swagger-editor","swagger-ui"],"created_at":"2026-03-04T15:31:13.099Z","updated_at":"2026-03-04T15:31:13.876Z","avatar_url":"https://github.com/hms5232.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# laravel-swagger\n\n[![](https://img.shields.io/packagist/v/hms5232/laravel-swagger?include_prereleases)](https://packagist.org/packages/hms5232/laravel-swagger)\n![supported PHP version](https://img.shields.io/packagist/dependency-v/hms5232/laravel-swagger/php?logo=php\u0026color=%23787cb4)\n![](https://img.shields.io/packagist/dependency-v/hms5232/laravel-swagger/illuminate/support?color=ff2d20\u0026label=Laravel\u0026logo=laravel)\n[![](https://img.shields.io/packagist/dt/hms5232/laravel-swagger)](https://packagist.org/packages/hms5232/laravel-swagger)\n[![](https://img.shields.io/packagist/l/hms5232/laravel-swagger)](https://github.com/hms5232/laravel-swagger/blob/main/README.md)\n[![](https://img.shields.io/github/actions/workflow/status/hms5232/laravel-swagger/phpunit.yml?branch=main\u0026label=test)](https://github.com/hms5232/laravel-swagger/actions?query=branch%3Amain)\n\nRender [OpenAPI](https://www.openapis.org/) JSON or YAML with [SwaggerUI](https://swagger.io/tools/swagger-ui/) and/or [Swagger Editor](https://editor.swagger.io/) in Laravel.\n\n## Usage\n\n### Installation\n\n```shell\ncomposer require hms5232/laravel-swagger\n```\n\nor you want to install only at development environment:\n\n```shell\ncomposer require hms5232/laravel-swagger --dev\n```\n\n### Configure\n\nAll configurable items are in `config/swagger.php` after you run publish command:\n\n```shell\nphp artisan vendor:publish --provider \"Hms5232\\LaravelSwagger\\LaravelSwaggerServiceProvider\"\n```\n\nIf you want to override the exists config file, execute command with `--force` flag.\n\nSee the config file for detail information.\n\n### Manually register\n\nPackage support auto-discovery. If you want to control when to register, you can do the following steps:\n\n1. Edit `composer.json` make auto discovery ignore laravel-swagger:\n    ```json\n    \"extra\": {\n        \"laravel\": {\n            \"dont-discover\": [\n                \"hms5232/laravel-swagger\"\n            ]\n        }\n    },\n    ```\n\n2. Re-generate optimized autoload files:\n    ```shell\n    composer dump-autoload\n    ```\n\n3. Edit `app/Providers/AppServiceProvider.php` define when to register:\n    ```php\n    use Hms5232\\LaravelSwagger\\LaravelSwaggerServiceProvider;  // add this\n    \n    class AppServiceProvider extends ServiceProvider\n    {\n        public function register()\n        {\n            // set condition\n            // for example, only register when env is \"local\"\n            if ($this-\u003eapp-\u003eenvironment('local')) {\n                $this-\u003eapp-\u003eregister(LaravelSwaggerServiceProvider::class);  // register laravel-swagger\n            }\n        }\n    }\n    ```\n\n## Why another package\n\nI just want to write a YAML file directly, and use Swagger UI serve/resolve docs.\n\nBut exists projects are either using annotations or only supporting JSON (seems like bug, but does not fix.).\n\nSo I develop this package, only have a view modified from [Swagger UI (unpkg)](https://swagger.io/docs/open-source-tools/swagger-ui/usage/installation/#unpkg), two routes to link documents.\n\n\u003e This section was written at version [0.1.0](https://github.com/hms5232/laravel-swagger/releases/tag/v0.1.0) and may be outdated in the future.\n\n## LICENSE\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhms5232%2Flaravel-swagger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhms5232%2Flaravel-swagger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhms5232%2Flaravel-swagger/lists"}