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

Custom Entity options support #382

Open
pavelbabin opened this issue Mar 7, 2024 · 0 comments
Open

Custom Entity options support #382

pavelbabin opened this issue Mar 7, 2024 · 0 comments

Comments

@pavelbabin
Copy link

pavelbabin commented Mar 7, 2024

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant