Module: Verquest
- Defined in:
- lib/verquest.rb,
lib/verquest/base.rb,
lib/verquest/result.rb,
lib/verquest/version.rb,
lib/verquest/versions.rb,
lib/verquest/properties.rb,
lib/verquest/transformer.rb,
lib/verquest/configuration.rb,
lib/verquest/properties/base.rb,
lib/verquest/properties/enum.rb,
lib/verquest/properties/array.rb,
lib/verquest/properties/const.rb,
lib/verquest/properties/field.rb,
lib/verquest/version_resolver.rb,
lib/verquest/properties/object.rb,
lib/verquest/properties/reference.rb,
lib/verquest/properties/collection.rb,
lib/verquest/base/helper_class_methods.rb,
lib/verquest/base/public_class_methods.rb,
lib/verquest/base/private_class_methods.rb,
lib/verquest/helper_methods/required_properties.rb
Overview
Verquest is a Ruby gem for versioning API requests
Verquest allows you to define and manage versioned API request schemas, handle parameter mapping between different versions, validate incoming parameters against schemas, and generate documentation.
Defined Under Namespace
Modules: HelperMethods, Properties Classes: Base, Configuration, Result, Transformer, Version, VersionResolver, Versions
Constant Summary collapse
- Error =
Base error class for all Verquest-related errors
Class.new(StandardError)
- VersionNotFoundError =
Error raised when a requested version cannot be found
Class.new(Verquest::Error)
- PropertyNotFoundError =
Error raised when a requested property cannot be found in a version
Class.new(Verquest::Error)
- MappingError =
Error raised when there are issues with property mappings
Class.new(Verquest::Error)
- InvalidParamsError =
Error raised when parameters do not match the expected schema
Class.new(Verquest::Error) do attr_reader :errors # @param message [String] error message # @param errors [Array] validation errors def initialize(, errors:) super() @errors = errors end end
Class Method Summary collapse
-
.configuration ⇒ Verquest::Configuration
Returns the global configuration for Verquest.
-
.configure {|configuration| ... } ⇒ void
Configure Verquest with the given block.
Class Method Details
.configuration ⇒ Verquest::Configuration
Returns the global configuration for Verquest
87 88 89 |
# File 'lib/verquest.rb', line 87 def configuration @configuration ||= Configuration.new end |
.configure {|configuration| ... } ⇒ void
This method returns an undefined value.
Configure Verquest with the given block
102 103 104 |
# File 'lib/verquest.rb', line 102 def configure yield(configuration) end |