{"id":15459175,"url":"https://github.com/smridge/swagcov","last_synced_at":"2025-04-22T10:19:45.755Z","repository":{"id":39876257,"uuid":"341429422","full_name":"smridge/swagcov","owner":"smridge","description":"OpenAPI documentation coverage check for Rails Routes.","archived":false,"fork":false,"pushed_at":"2025-04-16T23:23:11.000Z","size":2761,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-17T09:32:33.256Z","etag":null,"topics":["openapi","rspec","rswag","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/smridge.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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}},"created_at":"2021-02-23T04:36:40.000Z","updated_at":"2025-04-16T23:23:14.000Z","dependencies_parsed_at":"2025-04-16T23:03:00.774Z","dependency_job_id":"e1795f68-9fdf-410d-8b05-2ce45fe22605","html_url":"https://github.com/smridge/swagcov","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smridge%2Fswagcov","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smridge%2Fswagcov/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smridge%2Fswagcov/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smridge%2Fswagcov/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smridge","download_url":"https://codeload.github.com/smridge/swagcov/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249390013,"owners_count":21263021,"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":["openapi","rspec","rswag","ruby"],"created_at":"2024-10-01T23:05:14.074Z","updated_at":"2025-04-22T10:19:45.740Z","avatar_url":"https://github.com/smridge.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swagcov\n[![Gem Version](https://img.shields.io/gem/v/swagcov)](https://rubygems.org/gems/swagcov)\n![Gem Downloads](https://img.shields.io/gem/dt/swagcov)\n[![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop-hq/rubocop)\n[![GitHub License](https://img.shields.io/github/license/smridge/swagcov.svg)](https://github.com/smridge/swagcov/blob/main/LICENSE)\n\n![Tests Build](https://github.com/smridge/swagcov/actions/workflows/tests.yml/badge.svg)\n![Linting Build](https://github.com/smridge/swagcov/actions/workflows/linting.yml/badge.svg)\n![CodeQL Build](https://github.com/smridge/swagcov/actions/workflows/codeql-analysis.yml/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/smridge/swagcov/badge.svg?branch=main)](https://coveralls.io/github/smridge/swagcov?branch=main)\n\nSee OpenAPI documentation coverage report for Rails Routes.\n\n## Usages\n- See overview of different endpoints covered, missing and what you choose to ignore.\n- Add pass/fail to your build pipeline when missing Documentation Coverage.\n\n| `rake task` | `rails console` | Description |\n| :--- | :--- | :--- |\n| `rake swagcov` | `Swagcov::Command::ReportCoverage.new.run` | Check documentation coverage |\n| `rake swagcov:install` | `Swagcov::Command::GenerateDotfile.new.run` | Install required `.swagcov.yml` config file |\n| `rake swagcov:generate_todo` | `Swagcov::Command::GenerateTodoFile.new.run` | Generate `.swagcov_todo.yml` |\n\n## Ruby and Rails Version Support\nVersioning support from a test coverage perspective, see [tests.yml](/.github/workflows/tests.yml) for detail\n| `ruby -v` | `rails 4.2` | `rails 5.0` | `rails 5.1` | `rails 5.2` | `rails 6.0` | `rails 6.1` | `rails 7.0` | `rails 7.1` | `rails 7.2` | `rails 8.0` |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| `2.5` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |\n| `2.6` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |\n| `2.7` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |\n| `3.0` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |\n| `3.1` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |\n| `3.2` | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |\n| `3.3` | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |\n| `3.4` | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |\n| `3.5` | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |\n\n## Installation\nAdd this line to your application's Gemfile:\n```ruby\ngem \"swagcov\"\n```\n\nExecute:\n```shell\nbundle\n```\n\nCreate a `.swagcov.yml` in root of your Rails application. Alternatively, run:\n```shell\nbundle exec rake swagcov:install\n```\n\n- Add the paths of your `openapi` yml files (**required**):\n  ```yml\n  docs:\n    paths:\n      - swagger.yaml\n  ```\n\n- Add `only` routes (**optional**) :\n  ```yml\n  routes:\n    paths:\n      only:\n        - ^/v1\n  ```\n\n- Add `ignore` routes (**optional**) :\n  ```yml\n  routes:\n    paths:\n      ignore:\n        - /v1/foobar/:token\n  ```\n\n- Full Example `.swagcov.yml` Config File:\n  ```yml\n  docs:\n    paths:\n      - swagger.yaml\n\n  routes:\n    paths:\n      only:\n        - ^/v1\n      ignore:\n        - /v1/foobar/:token\n        - /v1/foobar:\n          - GET\n  ```\n\nExecute:\n```shell\nbundle exec rake swagcov\n```\n\n## Examples\nConfigurations and output from running `bundle exec rake swagcov` from the root of your Rails Application\n- All Routes (minimal configuration):\n  ```yml\n  docs:\n    paths:\n      - swagger.yaml\n  ```\n  \u003cimg src=\"https://raw.githubusercontent.com/smridge/swagcov/main/images/all-endpoints.png\"\u003e\n\n\n- With `only` endpoint configuration:\n  ```yml\n  docs:\n    paths:\n      - swagger.yaml\n\n  routes:\n    paths:\n      only:\n        - ^/v2\n  ```\n  \u003cimg src=\"https://raw.githubusercontent.com/smridge/swagcov/main/images/only-endpoints.png\"\u003e\n\n- With `ignore` and `only` endpoint configurations:\n  ```yml\n  docs:\n    paths:\n      - swagger.yaml\n\n  routes:\n    paths:\n      only:\n        - ^/v2\n      ignore:\n        - /v2/users\n        - /v2/users/:id:\n          - GET\n  ```\n  \u003cimg src=\"https://raw.githubusercontent.com/smridge/swagcov/main/images/ignore-and-only-endpoints.png\"\u003e\n\n## Contributing\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for detail\n\n### Credit\nTo [@lonelyelk](https://github.com/lonelyelk) for initial development!\n\n### Contributors\n\u003ca href=\"https://github.com/smridge/swagcov/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=smridge/swagcov\" /\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmridge%2Fswagcov","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmridge%2Fswagcov","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmridge%2Fswagcov/lists"}