{"id":18375737,"url":"https://github.com/factomproject/swapi","last_synced_at":"2025-04-11T04:39:41.003Z","repository":{"id":79532998,"uuid":"88058059","full_name":"FactomProject/swapi","owner":"FactomProject","description":null,"archived":false,"fork":false,"pushed_at":"2017-05-10T12:40:48.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-11T04:39:35.487Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FactomProject.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":"2017-04-12T13:58:57.000Z","updated_at":"2019-07-08T10:21:25.000Z","dependencies_parsed_at":"2023-05-01T10:19:37.322Z","dependency_job_id":null,"html_url":"https://github.com/FactomProject/swapi","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/FactomProject%2Fswapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FactomProject%2Fswapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FactomProject%2Fswapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FactomProject%2Fswapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FactomProject","download_url":"https://codeload.github.com/FactomProject/swapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345272,"owners_count":21088241,"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":[],"created_at":"2024-11-06T00:20:05.852Z","updated_at":"2025-04-11T04:39:40.969Z","avatar_url":"https://github.com/FactomProject.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swapi\n\nTool for checking consistency between swagger file and routes in phoenix\napplication.\nUse only with phoenix framework.\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `swapi` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [{:swapi, \"~\u003e 0.1.0\", only: :dev}]\nend\n```\nOtherwise please add it with `git:` directive:\n\n```elixir\ndef deps do\n     {:swapi, git: \"git@github.com:FactomProject/swapi.git\", only: :dev},\nend\n```\n\n## How to use it\n\n```elixir\nmix swapi swagger.yaml\n```\n\nwhere `swagger.yaml` is a swagger specification file.\n\n### Uniform parameters in paths\n\nSometimes paths in swagger file and routes are consistent but because\ndocumentation, and developer convenience could differ parameters have different\nnames, like: `/users/:user_id` vs. `/users/:id`. You may use `--uniform` option\nwhich will change given path parameters to `:param1`, `:param2` etc.\n\n```elixir\nmix swapi swagger.yaml --uniform\n```\n\nThis way you can still check if documentation and routes are consistent but\npreserve naming (which is hard).\n\n## Misc\n\nRight now `swapi` omits `PATCH` methods, as phoenix generates those and `PUT`\nmethods with `resource` directive for updates, making it redundant.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffactomproject%2Fswapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffactomproject%2Fswapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffactomproject%2Fswapi/lists"}