Skip to content

Grape 3.1.0 breaks compatibility w/ grape-swagger 2.1.3 #971

Closed

Description

@wgwz

Grape 3.1.0 breaks compatibility w/ grape-swagger

I.e.

NoMethodError (undefined method `success' for nil:NilClass):

grape-swagger (2.1.3) lib/grape-swagger/endpoint.rb:158:in `produces_object'
grape-swagger (2.1.3) lib/grape-swagger/endpoint.rb:121:in `method_object'
grape-swagger (2.1.3) lib/grape-swagger/endpoint.rb:105:in `block in path_item'
grape-swagger (2.1.3) lib/grape-swagger/endpoint.rb:99:in `each'
grape-swagger (2.1.3) lib/grape-swagger/endpoint.rb:99:in `path_item'
grape-swagger (2.1.3) lib/grape-swagger/endpoint.rb:85:in `block in path_and_definition_objects'
grape-swagger (2.1.3) lib/grape-swagger/endpoint.rb:84:in `each_value'
grape-swagger (2.1.3) lib/grape-swagger/endpoint.rb:84:in `path_and_definition_objects'
grape-swagger (2.1.3) lib/grape-swagger/doc_methods.rb:52:in `output_path_definitions'
grape-swagger (2.1.3) lib/grape-swagger/doc_methods.rb:105:in `block in setup'
grape (3.1.0) lib/grape/endpoint.rb:202:in `bind_call'
grape (3.1.0) lib/grape/endpoint.rb:202:in `block in execute'
activesupport (7.2.3) lib/active_support/notifications.rb:210:in `block in instrument'
activesupport (7.2.3) lib/active_support/notifications/instrumenter.rb:58:in `instrument'
activesupport (7.2.3) lib/active_support/notifications.rb:210:in `instrument'
grape (3.1.0) lib/grape/endpoint.rb:201:in `execute'
grape (3.1.0) lib/grape/endpoint.rb:179:in `block in run'
activesupport (7.2.3) lib/active_support/notifications.rb:210:in `block in instrument'
activesupport (7.2.3) lib/active_support/notifications/instrumenter.rb:58:in `instrument'
activesupport (7.2.3) lib/active_support/notifications.rb:210:in `instrument'
grape (3.1.0) lib/grape/endpoint.rb:161:in `run'
grape (3.1.0) lib/grape/endpoint.rb:355:in `block in build_stack'
grape (3.1.0) lib/grape/middleware/base.rb:26:in `call!'

Whereas 3.0.1 works fine.

Activity

  1. numbata commented on Jan 27, 2026

    @numbata
    Contributor

    Thanks for the report @wgwz, and for including the full stack trace and version details - very helpful!
    I'll investigate the Grape 3.1.0 changes and get back with a fix.

  2. wgwz commented on Jan 27, 2026

    @wgwz
    Author

    I can add more context if helpful, it's a pretty minimal configuration I'm using.

  3. added a commit that references this issue on Jan 27, 2026
    432c72c
  4. added 2 commits that reference this issue on Jan 28, 2026
    4823e21
    86d60cf
  5. added a commit that references this issue on Jan 29, 2026
    4ec0cac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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