{"id":13507815,"url":"https://github.com/elixir-maru/maru_swagger","last_synced_at":"2025-10-31T13:02:42.588Z","repository":{"id":33018719,"uuid":"36653043","full_name":"elixir-maru/maru_swagger","owner":"elixir-maru","description":"Add swagger compliant documentation to your maru API","archived":false,"fork":false,"pushed_at":"2020-06-17T08:09:30.000Z","size":94,"stargazers_count":57,"open_issues_count":13,"forks_count":17,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-31T13:01:55.370Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elixir-maru.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-01T10:12:59.000Z","updated_at":"2023-12-15T22:44:18.000Z","dependencies_parsed_at":"2022-08-07T19:30:20.653Z","dependency_job_id":null,"html_url":"https://github.com/elixir-maru/maru_swagger","commit_stats":null,"previous_names":["falood/maru_swagger"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/elixir-maru/maru_swagger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-maru%2Fmaru_swagger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-maru%2Fmaru_swagger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-maru%2Fmaru_swagger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-maru%2Fmaru_swagger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elixir-maru","download_url":"https://codeload.github.com/elixir-maru/maru_swagger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-maru%2Fmaru_swagger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281992161,"owners_count":26595645,"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","status":"online","status_checked_at":"2025-10-31T02:00:07.401Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-08-01T02:00:40.006Z","updated_at":"2025-10-31T13:02:42.539Z","avatar_url":"https://github.com/elixir-maru.png","language":"Elixir","readme":"MaruSwagger\n===========\n\n[![Build status](https://img.shields.io/travis/elixir-maru/maru_swagger.svg?style=flat-square)](https://travis-ci.org/elixir-maru/maru_swagger)\n[![hex.pm Version](https://img.shields.io/hexpm/v/maru_swagger.svg?style=flat-square)](https://hex.pm/packages/maru_swagger)\n[![Hex downloads](https://img.shields.io/hexpm/dt/maru_swagger.svg?style=flat-square)](https://hex.pm/packages/maru_swagger)\n\n## Usage\n\nGOTCHA: Please keep `swagger` DSL out of `version`!\n\n```elixir\ndef deps do\n  [ {:maru_swagger, github: \"elixir-maru/maru_swagger\"} ]\nend\n\ndefmodule Router do\n  version \"v1\"\n  ...\nend\n\ndefmodule API do\n  use Maru.Router\n  use MaruSwagger\n\n  plug Plug.Logger\n\n  swagger at:         \"/swagger\",      # (required) the mount point for the URL\n          pretty:     true,            # (optional) should JSON be pretty-printed?\n          only:       [:dev],          # (optional) the environments swagger works\n          except:     [:prod],         # (optional) the environments swagger NOT works\n          force_json: true,            # (optional) force JSON for all params instead of formData\n\n          swagger_inject: [            # (optional) this will be directly injected into the root Swagger JSON\n            host: \"myapi.com\",\n            basePath: \"/api\",\n            schemes:  [ \"http\" ],\n            consumes: [ \"application/json\" ],\n            produces: [\n              \"application/json\",\n              \"application/vnd.api+json\"\n            ]\n          ]\n\n  mount Router\nend\n```\n\nand then you can get json response from `curl http://127.0.0.1:4000/swagger`.\n\nopen [Swagger Petstore](http://petstore.swagger.io) in your borwser and fill in `http://127.0.0.1:4000/swagger` and enjoy maru_swagger.\n\n\n## Thanks\n\n* [Cifer](https://github.com/Cifer-Y)\n* [Roman Heinrich](https://github.com/mindreframer)\n","funding_links":[],"categories":["Documentation"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-maru%2Fmaru_swagger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felixir-maru%2Fmaru_swagger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-maru%2Fmaru_swagger/lists"}