grape
grape copied to clipboard
An opinionated framework for creating REST-like APIs in Ruby.
Going back to our discussion in https://github.com/ruby-grape/grape/pull/2040#issuecomment-615483919, I've found it a bit tedious dealing with optional `Array[Integer]`, `Array[String]`, etc. types. Suppose I have an API with an optional parameter: ```ruby...
env ``` Ruby 3.0.0 Grape 1.5.3 Rails 6.1 ``` ```ruby def route_setting(key, value = nil) get_or_set :route, key, value end ``` 'value' work like frozen hash key. You can reproduce...
In reference to #1989 (sorry, I have commented in there before I realised the issue was closed). I'm having exactly the same issue. If this is used: ```ruby env['api.format'] =...
Hey everyone! Currently iam working on a custom Railtie which wants to add a middleware to all mounted `Grape::API`s in a Rails project in the Railties `after_initialize` block. My first...
a change happen in class type in rails 6.1 User.first.errors.messages was returned a Hash instance but now it is giving back a `ActiveModel::DeprecationHandlingMessageHash` and according to the check [here](https://github.com/ruby-grape/grape/blob/master/lib/grape/error_formatter/json.rb#L25) grape...
Hi! So I've found what I _think_ is a problem with how Grape passes query parameters to Rack. Using Grape 1.5.1, I made a [simple Grape app](https://github.com/nab0310/grape-invalid-query-params) running on Puma...
```ruby ..... given name: ->(val) do val == 'name' end do requires :values, type: Array[String] end given name: ->(val) do val == 'another_name' end do requires :values, type: Array[Json] end...
It seems I'm running into an issue where if I have multiple `given` blocks testing the same parameter, the value validation for those dependent parameters is conflicting. Here's my example:...
Hello, I wanted to discuss and optional pull request about http status codes. Mainly because I often notice success status codes are often not properly documented in most tooling. This...
What I'm trying to do it to re-use type and description across grape and grape-entity. In the documentation I read the following: > You can use entity documentation directly in...