Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scenario to test coercion of grape entity #2036

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Apr 3, 2020

  1. Add scenario to test coercion of grape entity

    This is a first attempt at exposing a regression in Grape 1.3.1 compared
    with 1.2.4 with respect to specifying subclasses of Grape::Entity as
    parameters.
    Keith Pitty committed Apr 3, 2020
    Configuration menu
    Copy the full SHA
    33ac1de View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2020

  1. Coerce subclasses of Grape::Entity

    The addition of a GrapeEntityCoercer to handle subclasses of
    Grape::Entity enables grape entity parameters to be specified without
    resulting in the coercing logic to mark them as invalid.
    Keith Pitty committed Apr 6, 2020
    Configuration menu
    Copy the full SHA
    789959e View commit details
    Browse the repository at this point in the history
  2. Handle grape entities with as:

    A grape entity can expose an attribute with a different key. So we need
    to handle that case as well.
    Keith Pitty committed Apr 6, 2020
    Configuration menu
    Copy the full SHA
    7d64431 View commit details
    Browse the repository at this point in the history
  3. Handle an array of grape entities

    Validation of grape entities now handles an array. However, we still
    need to ensure that the coerced values are returned.
    Keith Pitty committed Apr 6, 2020
    Configuration menu
    Copy the full SHA
    3d530b7 View commit details
    Browse the repository at this point in the history