Module: Grape

Defined in:
lib/grape/middleware/versioner.rb,
lib/grape.rb,
lib/grape/api.rb,
lib/grape/path.rb,
lib/grape/route.rb,
lib/grape/version.rb,
lib/grape/cookies.rb,
lib/grape/dsl/api.rb,
lib/grape/endpoint.rb,
lib/grape/namespace.rb,
lib/grape/parser/xml.rb,
lib/grape/validations.rb,
lib/grape/api/helpers.rb,
lib/grape/dsl/routing.rb,
lib/grape/parser/base.rb,
lib/grape/dsl/helpers.rb,
lib/grape/parser/json.rb,
lib/grape/dsl/settings.rb,
lib/grape/http/request.rb,
lib/grape/formatter/xml.rb,
lib/grape/dsl/callbacks.rb,
lib/grape/formatter/txt.rb,
lib/grape/dsl/parameters.rb,
lib/grape/formatter/json.rb,
lib/grape/dsl/middleware.rb,
lib/grape/formatter/base.rb,
lib/grape/dsl/validations.rb,
lib/grape/middleware/base.rb,
lib/grape/exceptions/base.rb,
lib/grape/middleware/error.rb,
lib/grape/dsl/inside_route.rb,
lib/grape/middleware/filter.rb,
lib/grape/dsl/configuration.rb,
lib/grape/middleware/globals.rb,
lib/grape/util/content_types.rb,
lib/grape/error_formatter/txt.rb,
lib/grape/middleware/auth/dsl.rb,
lib/grape/error_formatter/xml.rb,
lib/grape/error_formatter/base.rb,
lib/grape/error_formatter/json.rb,
lib/grape/middleware/auth/base.rb,
lib/grape/dsl/request_response.rb,
lib/grape/middleware/formatter.rb,
lib/grape/util/stackable_values.rb,
lib/grape/exceptions/validation.rb,
lib/grape/util/inheritable_values.rb,
lib/grape/validations/params_scope.rb,
lib/grape/util/inheritable_setting.rb,
lib/grape/exceptions/missing_option.rb,
lib/grape/middleware/versioner/path.rb,
lib/grape/middleware/versioner/param.rb,
lib/grape/exceptions/unknown_options.rb,
lib/grape/middleware/auth/strategies.rb,
lib/grape/middleware/versioner/header.rb,
lib/grape/formatter/serializable_hash.rb,
lib/grape/validations/validators/base.rb,
lib/grape/exceptions/validation_errors.rb,
lib/grape/exceptions/missing_mime_type.rb,
lib/grape/exceptions/invalid_formatter.rb,
lib/grape/exceptions/unknown_validator.rb,
lib/grape/validations/validators/regexp.rb,
lib/grape/middleware/auth/strategy_info.rb,
lib/grape/validations/validators/values.rb,
lib/grape/validations/validators/coerce.rb,
lib/grape/validations/validators/default.rb,
lib/grape/util/strict_hash_configuration.rb,
lib/grape/validations/attributes_iterator.rb,
lib/grape/validations/validators/presence.rb,
lib/grape/exceptions/missing_vendor_option.rb,
lib/grape/validations/validators/allow_blank.rb,
lib/grape/validations/validators/all_or_none.rb,
lib/grape/exceptions/invalid_versioner_option.rb,
lib/grape/validations/validators/exactly_one_of.rb,
lib/grape/exceptions/incompatible_option_values.rb,
lib/grape/validations/validators/at_least_one_of.rb,
lib/grape/validations/validators/mutual_exclusion.rb,
lib/grape/middleware/versioner/accept_version_header.rb,
lib/grape/validations/validators/multiple_params_base.rb,
lib/grape/exceptions/invalid_with_option_for_represent.rb

Overview

Versioners set env['api.version'] when a version is defined on an API and on the requests. The current methods for determining version are:

:header - version from HTTP Accept header. :path - version from uri. e.g. /v1/resource :param - version from uri query string, e.g. /v1/resource?apiver=v1

See individual classes for details.

Defined Under Namespace

Modules: ContentTypes, DSL, ErrorFormatter, Exceptions, Formatter, Middleware, Parser, Util, Validations Classes: API, Cookies, Endpoint, Namespace, Path, Request, Route

Constant Summary

VERSION =
'0.10.0'