Skip to content

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

@khallaghi

Description

@khallaghi

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

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