Skip to content

Custom Entity options support #382

@pavelbabin

Description

@pavelbabin

It would be great to be able to provide custom options for entity exposure like:

expose :name, custom: { key: 'value' }

Not only option named custom but any other name as well. It might be helpful sometimes

Now such custom options not allowed ant an exception is throwing:

/gems/grape-entity-1.0.0/lib/grape_entity/entity.rb:624:in `block in valid_options': :custom is not a valid option. (ArgumentError):

 raise ArgumentError, "#{key.inspect} is not a valid option." unless OPTIONS.include?(key)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions