- #936: Fixed default params processing for optional groups - @dm1try.
- #942: Fixed forced presence for optional params when based on a reused entity that was also required in another context - @croeck.
- #950: Status method can now accept one of Rack::Utils status code symbols (:ok, :found, :bad_request, etc.) - @dabrorius.
- #952: Status method now raises error when called with invalid status code - @dabrorius.
- #957: Regexp validator now supports
allow_blank
,nil
value behavior changed - @calfzhou. - #962: The
default
attribute withfalse
value is documented now - @ajvondrak. - Your contribution here.
- #925: Fixed
toplevel constant DateTime referenced by Virtus::Attribute::DateTime
- @u2. - #916: Added
DateTime/Date/Numeric/Boolean
type supportallow_blank
- @u2. - #871: Fixed
Grape::Middleware::Base#response
- @galathius. - #559: Added support for Rack 1.6.0, which parses requests larger than 128KB - @myitcv.
- #876: Call to
declared(params)
now returns aHashie::Mash
- @rodzyn. - #879: The
route_info
value is no longer included inparams
Hash - @rodzyn. - #881: Fixed
Grape::Validations::ValuesValidator
support forRange
type - @ajvondrak. - #901: Fix: callbacks defined in a version block are only called for the routes defined in that block - @kushkella.
- #886: Group of parameters made to require an explicit type of Hash or Array - @jrichter1.
- #912: Extended the
:using
feature for param documentation tooptional
fields - @croeck. - #906: Fix: invalid body parse errors are not rescued by handlers - @croeck.
- #913: Fix: Invalid accept headers are not processed by rescue handlers - @croeck.
- #913: Fix: Invalid accept headers cause internal processing errors (500) when http_codes are defined - @croeck.
- #917: Use HTTPS for rubygems.org - @O-I.
- #868, #862, #861: Fixed
version
,prefix
, and other settings being overridden or changing scope when mounting API - @yesmeck. - #864: Fixed
declared(params, include_missing: false)
now returning attributes withnil
andfalse
values - @ppadron.
- #803, #820: Added
all_or_none_of
parameter validator - @loveltyoic, @natecj. - #774: Extended
mutually_exclusive
,exactly_one_of
,at_least_one_of
to work inside any kind of group:requires
oroptional
,Hash
orArray
- @ShPakvel. - #743: Added
allow_blank
parameter validator to validate non-empty strings - @elado. - #745: Removed
atom+xml
,rss+xml
, andjsonapi
content-types - @akabraham. - #745: Added
:binary, application/octet-stream
content-type - @akabraham. - #757: Changed
desc
can now be used with a block syntax - @dspaeth-faber. - #779: Fixed using
values
with adefault
proc - @ShPakvel. - #799: Fixed custom validators with required
Hash
,Array
types - @bwalex. - #784: Fixed
present
to not overwrite the previously added contents of the response body whebn called more than once - @mfunaro. - #809: Removed automatic
(.:format)
suffix on paths if you're using only one format (e.g., withformat :json
,/path
will respond with JSON but/path.xml
will be a 404) - @ajvondrak. - #816: Added ability to filter out missing params if params is a nested hash with
declared(params, include_missing: false)
- @georgimitev. - #819: Allowed both
desc
anddescription
in the params DSL - @mzikherman. - #821: Fixed passing string value when hash is expected in params - @rebelact.
- #824: Validate array params against list of acceptable values - @dnd.
- #813: Routing methods dsl refactored to get rid of explicit
paths
parameter - @AlexYankee. - #826: Find
coerce_type
forArray
when not specified - @manovotn. - #645: Invoking
body false
will return204 No Content
- @dblock. - #801: Only evaluate permitted parameter
values
anddefault
lazily on each request when declared as a proc - @dblock. - #679: Fixed
OPTIONS
method returning 404 when combined withprefix
- @dblock. - #679: Fixed unsupported methods returning 404 instead of 405 when combined with
prefix
- @dblock.
- #691: Added
at_least_one_of
parameter validator - @dblock. - #698:
error!
setsstatus
forEndpoint
too - @dspaeth-faber. - #703: Added support for Auth-Middleware extension - @dspaeth-faber.
- #703: Removed
Grape::Middleware::Auth::Basic
- @dspaeth-faber. - #703: Removed
Grape::Middleware::Auth::Digest
- @dspaeth-faber. - #703: Removed
Grape::Middleware::Auth::OAuth2
- @dspaeth-faber. - #719: Allow passing options hash to a custom validator - @elado.
- #716: Calling
content-type
will now return the current content-type - @dblock. - #705: Errors can now be presented with a
Grape::Entity
class - @dspaeth-faber.
- #687: Fix:
mutually_exclusive
andexactly_one_of
validation error messages now label parameters as strings, consistently withrequires
andoptional
- @dblock.
- #639: Added support for blocks with reusable params - @mibon.
- #637: Added support for
exactly_one_of
parameter validation - @Morred. - #626: Added support for
mutually_exclusive
parameters - @oliverbarnes. - #617: Running tests on Ruby 2.1.1, Rubinius 2.1 and 2.2, Ruby and JRuby HEAD - @dblock.
- #397: Adds
Grape::Endpoint.before_each
to allow easy helper stubbing - @mbleigh. - #673: Avoid requiring non-existent fields when using Grape::Entity documentation - @qqshfox.
- #671: Allow required param with predefined set of values to be nil inside optional group - @dm1try.
- #651: The
rescue_from
keyword now properly defaults to rescuing subclasses of exceptions - @xevix. - #614: Params with
nil
value are now refused byRegexpValidator
- @dm1try. - #494: Fixed performance issue with requests carrying a large payload - @dblock.
- #619: Convert specs to RSpec 3 syntax with Transpec - @danielspector.
- #632:
Grape::Endpoint#present
causes ActiveRecord to make an extra query during entity's detection - @fixme.
- #558: Support lambda-based values for params - @wpschallenger.
- #510: Support lambda-based default values for params - @myitcv.
- #511: Added
required
option for OAuth2 middleware - @bcm. - #520: Use
default_error_status
to specify the default status code returned fromerror!
- @salimane. - #525: The default status code returned from
error!
has been changed from 403 to 500 - @dblock. - #526: Allowed specifying headers in
error!
- @dblock. - #527: The
before_validation
callback is now a distinct one - @myitcv. - #530: Added ability to restrict
declared(params)
to the local endpoint withinclude_parent_namespaces: false
- @myitcv. - #531: Helpers are now available to auth middleware, executing in the context of the endpoint - @joelvh.
- #540: Ruby 2.1.0 is now supported - @salimane.
- #544: The
rescue_from
keyword now handles subclasses of exceptions by default - @xevix. - #545: Added
type
(Array
orHash
) support torequires
,optional
andgroup
- @bwalex. - #550: Added possibility to define reusable params - @dm1try.
- #560: Use
Grape::Entity
documentation to define required and optional parameters withrequires using:
- @reynardmh. - #572: Added
documentation
support torequires
,optional
andgroup
parameters - @johnallen3d.
- #600: Don't use an
Entity
constant that is available in the namespace as presenter - @fuksito. - #590: Fix issue where endpoint param of type
Integer
cannot set values array - @xevix. - #586: Do not repeat the same validation error messages - @kiela.
- #508: Allow parameters, such as content encoding, in
content_type
- @dm1try. - #492: Don't allow to have nil value when a param is required and has a list of allowed values - @Antti.
- #495: Fixed
ParamsScope#params
for parameters nested inside arrays - @asross. - #498: Dry'ed up options and headers logic, allow headers to be passed to OPTIONS requests - @karlfreeman.
- #500: Skip entity auto-detection when explicitely passed - @yaneq.
- #503: Calling declared(params) from child namespace fails to include parent namespace defined params - @myitcv.
- #512: Don't create
Grape::Request
multiple times - @dblock. - #538: Fixed default values for grouped params - @dm1try.
- #549: Fixed handling of invalid version headers to return 406 if a header cannot be parsed - @bwalex.
- #557: Pass
content_types
option toGrape::Middleware::Error
to fix the content-type header for custom formats. - @bernd. - #585: Fix after boot thread-safety issue - @etehtsea.
- #587: Fix oauth2 middleware compatibility with draft-ietf-oauth-v2-31 spec - @etehtsea.
- #610: Fixed group keyword was not working with type parameter - @klausmeyer.
- #475: Added support for the
:jsonapi
,application/vnd.api+json
media type registered at http://jsonapi.org - @bcm. - #471: Added parameter validator for a list of allowed values - @vickychijwani.
- #488: Upgraded to Virtus 1.0 - @dblock.
- Implemented Rubocop, a Ruby code static code analyzer - @dblock.
- Grape is no longer tested against Ruby 1.8.7.
- #442: Enable incrementally building on top of a previous API version - @dblock.
- #442: API
version
can now take an array of multiple versions - @dblock. - #444: Added
:en
as fallback locale for I18n - @aew. - #448: Adding POST style parameters for DELETE requests - @dquimper.
- #450: Added option to pass an exception handler lambda as an argument to
rescue_from
- @robertopedroso. - #443: Let
requires
andoptional
take blocks that initialize new scopes - @asross. - #452: Added
with
as a hash option to specify handlers forrescue_from
anderror_formatter
@robertopedroso. - #433, #462: Validation errors are now collected and
Grape::Exceptions::ValidationErrors
is raised - @stevschmid.
- #428: Removes memoization from
Grape::Request
params to prevent middleware from freezing parameter values beforeFormatter
can get them - @mbleigh.
- #344: Added
parser :type, nil
which disables input parsing for a given content-type - @dblock. - #381: Added
cascade false
option at API level to remove theX-Cascade: true
header from the API response - @dblock. - #392: Extracted headers and params from
Endpoint
toGrape::Request
- @niedhui. - #376: Added
route_param
, syntax sugar for quick declaration of route parameters - @mbleigh. - #390: Added default value for an
optional
parameter - @oivoodoo. - #403: Added support for versioning using the
Accept-Version
header - @politician. - #407: Specifying
default_format
will also set the default POST/PUT data parser to the given format - @dblock. - #241: Present with multiple entities using an optional Symbol - @niedhui.
- #378: Fix: stop rescuing all exceptions during formatting - @kbarrette.
- #380: Fix:
Formatter#read_body_input
when transfer encoding is chunked - @paulnicholon. - #347: Fix: handling non-hash body params - @paulnicholon.
- #394: Fix: path version no longer overwrites a
version
parameter - @tmornini. - #412: Fix: specifying
content_type
will also override the selection of the data formatter - @dblock. - #383: Fix: Mounted APIs aren't inheriting settings (including
before
andafter
filters) - @seanmoon. - #408: Fix: Goliath passes request header keys as symbols not strings - @bobek.
- #417: Fix: Rails 4 does not rewind input, causes POSTed data to be empty - @dblock.
- #423: Fix:
Grape::Endpoint#declared
now correctly handles nested params (ie. declared withgroup
) - @jbarreneche. - #427: Fix:
declared(params)
breaks whenparams
contains array - @timhabermaas
- #356: Fix: presenting collections other than
Array
(eg.ActiveRecord::Relation
) - @zimbatm. - #352: Fix: using
Rack::JSONP
withGrape::Entity
responses - @deckchair. - #347: Grape will accept any valid JSON as PUT or POST, including strings, symbols and arrays - @qqshfox, @dblock.
- #347: JSON format APIs always return valid JSON, eg. strings are now returned as
"string"
and no longerstring
- @dblock. - Raw body input from POST and PUT requests (
env['rack.input'].read
) is now available inapi.request.input
- @dblock. - Parsed body input from POST and PUT requests is now available in
api.request.body
- @dblock. - #343: Fix: return
Content-Type: text/plain
with error 405 - @gustavosaume, @wyattisimo. - #357: Grape now requires Rack 1.3.0 or newer - @jhecking.
- #320: API
namespace
now supportsrequirements
- @niedhui. - #353: Revert to standard Ruby logger formatter,
require active_support/all
if you want old behavior - @rhunter, @dblock. - Fix:
undefined method 'call' for nil:NilClass
for an API method implementation without a block, now returns an empty string - @dblock.
- #294: Extracted
Grape::Entity
into a grape-entity gem - @agileanimal. - #340, #342: Added
:cascade
option toversion
to allow disabling of rack/mount cascade behavior - @dieb. - #333: Added support for validation of arrays in
params
- @flyerhzm. - #306: Added I18n support for all Grape exceptions - @niedhui.
- #309: Added XML support to the entity presenter - @johnnyiller, @dblock.
- #131: Added instructions for Grape API reloading in Rails - @jyn, @dblock.
- #317: Added
headers
that returns a hash of parsed HTTP request headers - @dblock. - #332:
Grape::Exceptions::Validation
now contains full nested parameter names - @alovak. - #328: API version can now be specified as both String and Symbol - @dblock.
- #190: When you add a
GET
route for a resource, a route for theHEAD
method will also be added automatically. You can disable this behavior withdo_not_route_head!
- @dblock. - Added
do_not_route_options!
, which disables the automatic creation of theOPTIONS
route - @dblock. - #309: An XML format API will return an error instead of returning a string representation of the response if the latter cannot be converted to XML - @dblock.
- A formatter that raises an exception will cause the API to return a 500 error - @dblock.
- #322: When returning a 406 status, Grape will include the requested format or content-type in the response body - @dblock.
- #60: Fix: mounting of a Grape API onto a path - @dblock.
- #335: Fix: request body parameters from a
PATCH
request not available inparams
- @FreakenK.
- Fix: support content-type with character set when parsing POST and PUT input - @dblock.
- Fix: CVE-2013-0175, multi_xml parse vulnerability, require multi_xml 0.5.2 - @dblock.
- Added support for custom parsers via
parser
, in addition to built-in multipart, JSON and XML parsers - @dblock. - Removed
body_params
, data sent via a POST or PUT with a supported content-type is merged intoparams
- @dblock. - Setting
format
will automatically remove other content-types by callingcontent_type
- @dblock. - Setting
content_type
will prevent any input data other than the matching content-type or any Rack-supported form and parseable media types (application/x-www-form-urlencoded
,multipart/form-data
,multipart/related
andmultipart/mixed
) from being parsed - @dblock. - #305: Fix: presenting arrays of objects via
represent
or when auto-detecting anEntity
constant in the objects being presented - @brandonweiss. - #306: Added i18n support for validation error messages - @niedhui.
- #297: Added
default_error_formatter
- @dblock. - #297: Setting
format
will automatically setdefault_error_formatter
- @dblock. - #295: Storing original API source block in endpoint's
source
attribute - @dblock. - #293: Added options to
cookies.delete
, enables passing a path - @inst. - #174: The value of
env['PATH_INFO']
is no longer altered withpath
versioning - @dblock. - #296: Fix: ArgumentError with default error formatter - @dblock.
- #298: Fix: subsequent calls to
body_params
would fail due to IO read - @justinmcp. - #301: Fix: symbol memory leak in cookie and formatter middleware - @dblock.
- #300: Fix
Grape::API.routes
to include mounted api routes - @aiwilliams. - #302: Fix: removed redundant
autoload
entries - @ugisozols. - #172: Fix: MultiJson deprecated methods warnings - @dblock.
- #133: Fix: header-based versioning with use of
prefix
- @seanmoon, @dblock. - #280: Fix: grouped parameters mangled in
route_params
hash - @marcusg, @dblock. - #304: Fix:
present x, :with => Entity
returns class references withformat :json
- @dblock. - #196: Fix: root requests don't work with
prefix
- @dblock.
- #179: Using
content_type
will remove all default content-types - @dblock. - #265: Fix: Moved
ValidationError
intoGrape::Exceptions
- @thepumpkin1979. - #269: Fix:
LocalJumpError
will not be raised when using explict return in API methods - @simulacre. - #86: Fix Path-based versioning not recognizing
/
route - @walski. - #273: Disabled formatting via
serializable_hash
and added support forformat :serializable_hash
- @dblock. - #277: Added a DSL to declare
formatter
in API settings - @tim-vandecasteele. - #284: Added a DSL to declare
error_formatter
in API settings - @dblock. - #285: Removed
error_format
from API settings, now matches request format - @dblock. - #290: The default error format for XML is now
error/message
instead ofhash/error
- @dpsk. - #44: Pass
env
into formatters to enable templating - @dblock.
- #201, #236, #221: Added coercion and validations support to
params
DSL - @schmurfy, @tim-vandecasteele, @adamgotterer. - #204: Added ability to declare shared
params
atnamespace
level - @tim-vandecasteele. - #234: Added a DSL for creating entities via mixin - @mbleigh.
- #240: Define API response format from a query string
format
parameter, if specified - @neetiraj. - Adds Endpoint#declared to easily filter out unexpected params. - @mbleigh
- #248: Fix: API
version
returns last version set - @narkoz. - #242: Fix: permanent redirect status should be
301
, was304
- @adamgotterer. - #211: Fix: custom validations are no longer triggered when optional and parameter is not present - @adamgotterer.
- #210: Fix:
Endpoint#body_params
causing undefined method 'size' - @adamgotterer. - #205: Fix: Corrected parsing of empty JSON body on POST/PUT - @tim-vandecasteele.
- #181: Fix: Corrected JSON serialization of nested hashes containing
Grape::Entity
instances - @benrosenblum. - #203: Added a check to
Entity#serializable_hash
that verifies an entity exists on an object - @adamgotterer. - #208:
Entity#serializable_hash
must also check if attribute is generated by a user supplied block - @ppadron. - #252: Resources that don't respond to a requested HTTP method return 405 (Method Not Allowed) instead of 404 (Not Found) - @simulacre
- #186: Fix: helpers allow multiple calls with modules and blocks - @ppadron.
- #188: Fix: multi-method routes append '(.:format)' only once - @kainosnoema.
- #64, #180: Added support to
GET
request bodies as parameters - @bobbytables. - #175: Added support for API versioning based on a request parameter - @jackcasey.
- #168: Fix: Formatter can parse symbol keys in the headers hash - @netmask.
- #169: Silence multi_json deprecation warnings - @whiteley.
- #166: Added support for
redirect
, including permanent and temporary - @allenwei. - #159: Added
:requirements
to routes, allowing to use reserved characters in paths - @gaiottino. - #156: Added support for adding formatters to entities - @bobbytables.
- #183: Added ability to include documentation in entities - @flah00.
- #189:
HEAD
requests no longer return a body - @stephencelis. - #97: Allow overriding
Content-Type
- @dblock.
- Added support for inheriting exposures from entities - @bobbytables.
- Extended formatting with
default_format
- @dblock. - Added support for cookies - @lukaszsliwa.
- Added support for declaring additional content-types - @joeyAghion.
- Added support for HTTP PATCH - @LTe.
- Added support for describing, documenting and reflecting APIs - @dblock.
- Added support for anchoring and vendoring - @jwkoelewijn.
- Added support for HTTP OPTIONS - @grimen.
- Added support for silencing logger - @evansj.
- Added support for helper modules - @freelancing-god.
- Added support for Accept header-based versioning - @jch, @rodzyn.
- Added support for mounting APIs and other Rack applications within APIs - @mbleigh.
- Added entities, multiple object representations - @mbleigh.
- Added ability to handle XML in the incoming request body - @jwillis.
- Added support for a configurable logger - @mbleigh.
- Added support for before and after filters - @mbleigh.
- Extended
rescue_from
, which can now take a block - @dblock.
- Extended exception handling to all exceptions - @dblock.
- Added support for returning JSON objects from within error blocks - @dblock.
- Added support for handling incoming JSON in body - @tedkulp.
- Added support for HTTP digest authentication - @daddz.
- Allow multiple definitions of the same endpoint under multiple versions - @chrisrhoden.
- Added support for multipart URL parameters - @mcastilho.
- Added support for custom formatters - @spraints.
- Added support for JSON format in route matching - @aiwilliams.
- Added suport for custom middleware - @mbleigh.
- Endpoints properly reset between each request - @mbleigh.
- Initial public release - @mbleigh.