{"id":16506329,"url":"https://github.com/dev-crea/swagger-docs-generator","last_synced_at":"2026-05-05T10:34:17.096Z","repository":{"id":56896874,"uuid":"77629378","full_name":"Dev-Crea/swagger-docs-generator","owner":"Dev-Crea","description":null,"archived":false,"fork":false,"pushed_at":"2019-05-24T08:38:56.000Z","size":153,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T14:14:26.626Z","etag":null,"topics":["gem","rails","ruby","swagger"],"latest_commit_sha":null,"homepage":null,"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/Dev-Crea.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-29T17:42:03.000Z","updated_at":"2017-03-09T15:33:35.000Z","dependencies_parsed_at":"2022-08-21T00:50:40.608Z","dependency_job_id":null,"html_url":"https://github.com/Dev-Crea/swagger-docs-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dev-Crea%2Fswagger-docs-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dev-Crea%2Fswagger-docs-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dev-Crea%2Fswagger-docs-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dev-Crea%2Fswagger-docs-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dev-Crea","download_url":"https://codeload.github.com/Dev-Crea/swagger-docs-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241444492,"owners_count":19963822,"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":["gem","rails","ruby","swagger"],"created_at":"2024-10-11T15:18:57.139Z","updated_at":"2026-05-05T10:34:17.051Z","avatar_url":"https://github.com/Dev-Crea.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swagger::Docs::Generator | [![Travis][1]][2] [![Gem][21]][22] [![Docs][11]][12]\n\nGenerator for Swagger Apps ([Example with theme](https://github.com/Dev-Crea/swagger-ui))\n\n## Menu\n\n* [How to use](#how-to-use)\n  * [Installation](#installation)\n  * [Usage](#usage)\n* [Development](#development)\n* [Contributing](#contributing)\n\n## How to use\n\n### Installation\n\nAdd this line to your application's Gemfile :\n\n```ruby\ngem 'swagger-docs-generator'\n```\n\nAnd then execute :\n\n```linux\nbundle\n```\n\nOr install it yourself as :\n\n```linux\ngem install swagger_docs_generator\n```\n\n### Usage\n\nCreate initializer :\n\n```linux\nrails generator swagger_docs_generator:initializer\n```\n\nCreate environment :\n\n```linux\nrails generator swagger_docs_generator:environment\n```\n\nExecute rake task for generated `swagger.json` :\n\n```linux\nrake swagger:docs\n```\n\n\n## Examples\n\n```ruby\n# frozen_string_literal: true\n\nmodule V1\n  # Documentation API for AddressesController\n  class AddressesDoc \u003c BaseDoc\n    CONTROLLER = V1::Geos::AddressesController\n\n    # Describe object Addresses\n    # ###\n    scontroller 'User Addresses management'\n\n    # Describe all actions\n    # ###\n    sdoc :show do\n      summary 'Show address'\n      responses do\n        status 200\n        schema { definition 'address' }\n      end\n      responses { status 404 }\n      responses { status 422 }\n      description \u003c\u003cEOS\n  # Show address to user\n\n  Show complete address to user.\nEOS\n    end\n\n    sdoc :create do\n      summary 'Create address'\n      responses { status 201 }\n      responses { status 422 }\n      parameters do\n        body do\n          name 'address'\n          schema 'address create'\n        end\n      end\n      description \u003c\u003cEOS\n  # Add address\n\n  Save an address to user.\nEOS\n    end\n\n    sdoc :update do\n      summary 'Update address'\n      responses do\n        status 200\n        schema { definition 'address' }\n      end\n      responses { status 404 }\n      responses { status 422 }\n    end\n\n    sdoc :destroy do\n      summary 'Destroy address'\n      responses do\n        status 200\n        schema { definition 'address' }\n      end\n      responses { status 404 }\n      responses { status 422 }\n    end\n\n    # Add definition more model\n    # ###\n    sdefinition 'address create' do\n      required %w[address]\n      properties do\n        required %w{country city zip_code street}\n        properties country: { type: :string },\n                   city: { type: :string },\n                   zip_code: { type: :string },\n                   street: { type: :string },\n                   complements: { type: :string }\n      end\n    end\n\n    sdefinition 'address' do\n      required %w[address]\n      properties do\n        properties country: { type: :string },\n                   city: { type: :string },\n                   zip_code: { type: :string },\n                   street: { type: :string },\n                   complements: { type: :string },\n                   coordinates: { type: :string }\n      end\n    end\n  end\nend\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then,\nrun `rake spec` to run the tests. You can also run `bin/console` for an\ninteractive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`.\nTo release a new version, update the version number in `version.rb`, and then\nrun `bundle exec rake release`, which will create a git tag for the version,\npush git commits and tags, and push the `.gem` file to\n[rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at\n\u003chttps://github.com/Dev-Crea/swagger-docs-generator\u003e. This project is intended to\nbe a safe, welcoming space for collaboration, and contributors are expected to\nadhere to the [Contributor Covenant](http://contributor-covenant.org)\ncode of conduct.\n\n[1]: https://travis-ci.org/Dev-Crea/swagger-docs-generator.svg?branch=master\n[2]: https://travis-ci.org/Dev-Crea/swagger-docs-generator\n\n[11]: https://badge.fury.io/rb/swagger_docs_generator.svg\n[12]: https://badge.fury.io/rb/swagger_docs_generator\n\n[21]: https://inch-ci.org/github/Dev-Crea/swagger-docs-generator.svg\n[22]: https://inch-ci.org/github/Dev-Crea/swagger-docs-generator\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-crea%2Fswagger-docs-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdev-crea%2Fswagger-docs-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-crea%2Fswagger-docs-generator/lists"}