Skip to content

Grape::ContentTypes::CONTENT_TYPES is not available anymore. #941

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

Closed
khallaghi opened this issue Sep 19, 2024 · 4 comments
Closed

Grape::ContentTypes::CONTENT_TYPES is not available anymore. #941

khallaghi opened this issue Sep 19, 2024 · 4 comments

Comments

@khallaghi
Copy link

Hi everyone,
While reviewing the ProducesConsumes class, I came across a reference to Grape::ContentTypes::CONTENT_TYPES. In the newer version of Grape, this has been replaced by Grape::ContentTypes::DEFAULTS, as highlighted in the diff below:
Diff of lib/grape/content_types.rb
Additionally, here is the faulty code that caused our workflows to break:

args.flatten.map { |x| Grape::ContentTypes::CONTENT_TYPES[x] || x }.uniq

@theonegri
Copy link

theonegri commented Sep 20, 2024

This is a breaking change and it triggers the following error when trying to access the documentation url:
uninitialized constant Grape::ContentTypes::CONTENT_TYPES

@dblock
Copy link
Member

dblock commented Sep 21, 2024

Resolved in #940.

@dblock dblock closed this as completed Sep 21, 2024
@dblock
Copy link
Member

dblock commented Sep 21, 2024

I released 2.1.1.

@theonegri
Copy link

Thank you!

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

3 participants