Skip to content

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

1 watching

Forks

Repository files navigation

GrapeSwagger::Representable

Tests Coverage Status

A grape-swagger adapter that documents Representable decorators as Swagger response models.

Installation

Add this line to your application's Gemfile:

gem 'grape-swagger-representable'

And then execute:

$ bundle

Or install it yourself as:

$ gem install grape-swagger-representable

Development

Requires Ruby 3.1 or newer, grape-swagger 2.x, and Representable 3.2 or newer within the 3.x series. After checking out the repo, run bin/setup to install dependencies. Run bundle exec rake spec for tests and bundle exec rubocop for lint. You can also run bin/pry for an interactive prompt.

GitHub Actions tests Ruby 3.1, 3.3, 3.4, and 4.0 across Grape 2, 3, and 4, including Representable 3.2 and the latest 3.x. Dependencies resolve from released gems rather than grape-swagger's development branch. Ruby 3.1 uses JSON 2.x for compatibility with its supported MultiJson versions.

To select dependencies locally, run, for example, GRAPE_VERSION='~> 2.4' REPRESENTABLE_VERSION='~> 3.2.0' bundle update, and set the same variables when running tests. GRAPE_SWAGGER_VERSION can select a particular supported grape-swagger release.

SimpleCov starts before loading the library and tracks all Ruby files under lib/. Local reports are written to coverage/index.html; CI uploads coverage/lcov.info to Coveralls using parallel matrix flags and a completion job.

To install this gem onto your local machine, run bundle exec rake install. Follow RELEASING.md to prepare and publish a release.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ruby-grape/grape-swagger-representable.

Add a pull request entry to the next release section of CHANGELOG.md, including the PR link, a short description, and author attribution. Leave the Your contribution here. placeholder for the next contributor.

Danger checks changelog updates on pull requests. Its read-only workflow generates a report, and a separate workflow posts the report as a PR comment using GitHub's built-in token; no personal access token or repository secret is required.

License

The gem is available as open source under the terms of the MIT License.

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages