{"id":13551945,"url":"https://github.com/superiorlu/jsonapi-swagger","last_synced_at":"2025-04-13T08:19:18.396Z","repository":{"id":43656898,"uuid":"182005269","full_name":"superiorlu/jsonapi-swagger","owner":"superiorlu","description":"Create a JSONAPI Swagger.","archived":false,"fork":false,"pushed_at":"2022-11-14T21:06:51.000Z","size":37,"stargazers_count":55,"open_issues_count":9,"forks_count":29,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-03-15T01:21:22.864Z","etag":null,"topics":["fast-jsonapi","i18n","json","jsonapi","jsonapi-rails","jsonapi-resources","rspec","rswag","swagger"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/superiorlu.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}},"created_at":"2019-04-18T02:53:22.000Z","updated_at":"2024-01-27T17:06:14.000Z","dependencies_parsed_at":"2023-01-22T18:30:52.234Z","dependency_job_id":null,"html_url":"https://github.com/superiorlu/jsonapi-swagger","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/superiorlu%2Fjsonapi-swagger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superiorlu%2Fjsonapi-swagger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superiorlu%2Fjsonapi-swagger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superiorlu%2Fjsonapi-swagger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superiorlu","download_url":"https://codeload.github.com/superiorlu/jsonapi-swagger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681556,"owners_count":21144705,"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":["fast-jsonapi","i18n","json","jsonapi","jsonapi-rails","jsonapi-resources","rspec","rswag","swagger"],"created_at":"2024-08-01T12:01:56.191Z","updated_at":"2025-04-13T08:19:18.358Z","avatar_url":"https://github.com/superiorlu.png","language":"HTML","funding_links":[],"categories":["HTML","json"],"sub_categories":[],"readme":"# JSONAPI Swagger\n\nGenerate JSONAPI Swagger Doc.\n\n[![Gem Version](https://img.shields.io/gem/v/jsonapi-swagger.svg)](https://rubygems.org/gems/jsonapi-swagger)\n[![GitHub license](https://img.shields.io/github/license/superiorlu/jsonapi-swagger.svg)](https://github.com/superiorlu/jsonapi-swagger/blob/master/LICENSE)\n\n[![jsonapi-swagger-4-2-9.gif](https://i.loli.net/2019/05/05/5ccebf5e782b7.gif)](https://i.loli.net/2019/05/05/5ccebf5e782b7.gif)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'jsonapi-swagger'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install jsonapi-swagger\n\n## Usage\n\n 1. config jsonapi swagger\n```rb\n# config/initializers/swagger.rb\nJsonapi::Swagger.config do |config|\n  config.use_rswag = false\n  config.version = '2.0'\n  config.info = { title: 'API V1', version: 'V1'}\n  config.file_path = 'v1/swagger.json'\nend\n```\n\n2. generate swagger.json\n\n```sh\n# gen swagger/v1/swagger.json\nbundle exec rails generate jsonapi:swagger User # UserResource \u003c JSONAPI::Resource\n```\n\n3. additional\n\n use `rswag`, have to run\n\n```sh\n# gen swagger/v1/swagger.json\n bundle exec rails rswag:specs:swaggerize\n```\n\n## RoadMap\n\n- [x] immutable resources\n- [x] filter/sort resources\n- [x] mutable resources\n- [x] generate swagger.json without rswag\n\n## Resource\n\n- [JSONAPI](https://jsonapi.org/)\n- [JSONAPI::Resources](http://jsonapi-resources.com/)\n- [Rswag](https://github.com/domaindrivendev/rswag)\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at\nhttps://github.com/superiorlu/jsonapi-swagger.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperiorlu%2Fjsonapi-swagger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperiorlu%2Fjsonapi-swagger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperiorlu%2Fjsonapi-swagger/lists"}